When the input box is too large in the layout design of Android, the input box below will be partially blocked by the software disk when the soft keyboard is entered, so the focus input cannot be obtained.
The following three solutions are available:
method One: in your activity in the corresponding Java file OnCreate in Setcontentview before writing this code GetWindow (). Setsoftinputmode ( WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN);
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/53/C0/wKioL1Ru5UbhlbzMAAE50gyiomg583.jpg "title=" Untitled. png "alt=" wkiol1ru5ubhlbzmaae50gyiomg583.jpg "/> This method is the simplest
method Two: in the project's Androidmanifest.xml file interface corresponding to the <activity> add android:windowsoftinputmode= "statevisible| Adjustresize ", this will make the screen move up the whole. If you add a android:windowsoftinputmode= "Adjustpan", the keyboard will overwrite the screen.
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/53/C0/wKioL1Ru5e6wd3w-AAKybsfW-T4122.jpg "title=" Untitled. png "alt=" wkiol1ru5e6wd3w-aakybsfw-t4122.jpg "/>
method Three: replace the top layout with ScrollView, or add a layer of ScrollView to the top layout. This will roll the soft keyboard and the input box together, and the soft keyboard will always be at the bottom.
Add ScrollView outside of our linearlayout layout
This article is from the "Dapeng Wings" blog, please be sure to keep this source http://4812587.blog.51cto.com/4802587/1580907
Solve the problem of the Android soft keyboard blocking the input box