The use of soft keyboard in Android is very much, the following is commonly used in soft keyboard settings;
1, Horizontal screen, click the input box appears the full keyboard solution: In EditText, Searchview and other controls to add
2, vertical screen, Android will appear half screen.
CASE1: Your input box is in the lower position, so the keyboard may block the input box. WORKAROUND: Set the activity in manifest
Android:windowsoftinputmode= "Adjustresize"
This activity's main window will always resize to provide space for the keyboard.
CASE2: Your input box is on the top, normally this will not be a problem, but if you use the vertical aspect of the interface is layout_weight that is the specific gravity to distribute the page,
The software tray compresses the entire window , causing the input box to be partially compressed. WORKAROUND: Set the activity in manifest
Android:windowsoftinputmode= "Adjustpan"
This way the keyboard does not compress the original window, only the following part of the content is obscured. This way the input box is not compressed.
3, just enter an activity, will focus input box, this will be active pop-up soft keyboard, if you do not want to automatically eject, then you can let other unimportant control to get focus, and then a timer
Let EditText get the focus again!
4. Determine if the soft keyboard is currently in a popup state
if (GetWindow (). GetAttributes (). softinputmode==windowmanager.layoutparams.soft_input_state_visible)
5. Manually hide the soft keyboard
6. Manually eject the soft keyboard
((Inputmethodmanager) Getsystemservice (Input_method_service)). Togglesoftinput (0,inputmethodmanager.hide_not_ Always);
Android Soft keyboard popup hidden extrusion interface and other issues