Solution of automatic pop-up of Android shielding soft keyboard
Problem overview
The soft keyboard will pop up when inputting content in the edit box, and the limited screen area of the mobile phone often covers the input interface. Let's take a look at the problem rendering first:
When entering the user name and password, the system will pop up the keyboard, causing the problem that the system keyboard will block the text box, as shown in the figure:
When entering the password, the input box is blocked by the system keyboard, which greatly reduces the user operation experience. This is a very common problem of soft keyboard blocking in development. How to solve it?
Simple solution
Method 1:
Write this code before setcontentview in oncreate in your activity
Method 2:
Add the following to the EditText property:
As follows:
The above is the solution of Android shielding soft keyboard automatic pop-up introduced by Xiaobian. I hope it will help 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!