Android Soft Keyboard Popup When layout specified content up-move implementation and problem resolution

Source: Internet
Author: User

The Android SDK currently offers only two soft keyboard pop-up mode interfaces: one is to eject when the auto-flush interface will be all elements on top, one is to not redraw the interface, directly cover the control elements,   no other mode, if you want to achieve other effects, light using the system interface is not possible.   Workaround:   The first step: nesting a ScrollView for what you want to be top-up:   <scrollview android:layout_width= "Match_parent" android:layout_height= "0DP" android:layout_weight= "1" android:scrollbars= "None" >      ... Want to be top up content ...      </ScrollView>   Step Two: Set android:windowsoftinputmode= "Adjustresize" to the corresponding Activity in the file   Some of the models here have been solved!   Some models will appear click over EditView it gets the focus also pops up the soft keyboard, But after recovering the soft keyboard, then click on the EditView will appear to be obscured by the soft keyboard, Point Other EditView, then to point the EditView and return to normal is no longer obscured, To resolve this issue see the following:   Step Three:The problem is solved after discovering that the android:scrollbars= "none" attribute is removed from ScrollView! but the scroll bar will appear, so this property cannot be removed, just follow the Setcontentview method in the activity's OnCreate event handler and write   GetWindow (). Setsoftinputmode (WindowManager.LayoutParams.SOFT_INPUT_ADJUST_RESIZE);   You can fix this problem!

Android Soft Keyboard Popup When layout specified content up-move implementation and problem resolution

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.