Summary of various problems such as pop-up hidden extrusion interface of Android soft keyboard

There are many soft keyboards in Android. The following are common settings for soft keyboards;

1. When the screen is horizontal, click the input box to display the full keyboard solution: add in EditText, searchview and other controls

2. When the screen is vertical, Android will appear half screen.

Case1: your input box is in the middle and lower position. In this case, the keyboard may block the input box. Solution: set the activity in the manifest

In this way, the main window of the activity always resizes to provide space for the keyboard

Case2: your input box is on the upper side. Generally, there will be no problem, but if you use layout in the vertical aspect of your interface_ If you distribute pages by weight, the software disk will compress the whole window, resulting in the compression of the input box. Solution: set the activity in the manifest

In this way, the keyboard will not compress the original window, but will cover the following part of the content. In this way, the input box will not be compressed.

3. Just after entering an activity, the focus input box will pop up. If you don't want to pop up automatically, you can first let other unimportant controls get the focus, and then a timer and then let EditText get the focus!

4. Judge whether the soft keyboard is currently in the pop-up state

5. Manually hide the soft keyboard

6. Manual pop-up soft keyboard

The above is a summary of the Android soft keyboard pop-up hidden extrusion interface and other problems introduced by Xiaobian. I hope it will be helpful to you. If you have any questions, please leave me a message and Xiaobian will reply to you in time. Thank you very much for your support for the programming tips website!

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>