The app UI has multiple views, including edittext. after entering the interface, the focus automatically falls on the first edittext and a soft keyboard is displayed.
There are two ways to solve this problem:
1. Transfer the focus to another view: in the XML file, add the following two rows to the attribute of the target view,
Android: focusable = "true" Android: focusableintouchmode = "true"
In this way, the focus is not on edittext, and the soft keyboard will not pop up.
2. Hide the keyboard so that it does not pop up automatically: in the manifest file, add the following settings to the corresponding acitivity attribute,
Android: windowsoftinputmode = "statealwayshidden"
In this way, you can see that the focus is still on edittext, but the soft keyboard does not pop up. Click edittext by hand. The soft keyboard will pop up normally.
Summary: if you do not want the initial focus to be displayed on edittext or the soft keyboard to be displayed, you can use method 1. If you want the prompt initialization focus to remain on edittext, but do not bring up the soft keyboard, method 2 is available. If you only want to suppress the automatic pop-up of the soft keyboard, either of them can be used.