Disable access to activity automatically pop-up keyboard to set activity attributes in manifest. xml
- Android: windowsoftinputmode = "statehidden | stateunchanged"
Related attributes:
- The "stateunspecified" keypad status (whether it is hidden or visible) is not specified. The system selects an appropriate status or topic-dependent setting. This is to set the default behavior of the software disk.
- The "stateunchanged" keypad is kept visible or hidden no matter what the last time it was, when the main window appears in front.
- "Statehidden" when the user selects this activity, the keyboard is hidden-that is, when the user is sure to navigate to this activity, instead of returning it because it leaves another activity.
- The "statealwayshidden" keypad is always hidden when the focus of the activity main window is obtained.
- "Statevisible" is visible on the keyboard. When the keyboard is normal (when you navigate to the main activity window ).
- "Statealwaysvisible" when the user selects this activity, the soft keyboard is visible-that is, when the user is sure to navigate to this activity, instead of returning it because it leaves another activity.
- "Adjustunspecified" it is not specified whether the activity main window is adjusted to set aside space for the soft keyboard, or whether the content on the window is visible to the current focus on the screen. The system automatically selects one of these modes, depending on whether the content of the window has any layout view that can scroll their content. If there is such a view, the window will be adjusted. This assumption can make the content of the scrolling window visible in a small area. This is the default behavior settings for the main window.
- "Adjustresize" the main activity window is always adjusted to the screen size so as to leave space for the soft keyboard.
- "Adjustpan" the main activity window does not adjust the screen size to leave space for the soft keyboard. On the contrary, the content of the current window is automatically moved so that the current focus is not overwritten by the keyboard and the user can always see the part of the input content. This is usually not expected to be adjusted because the user may close the keyboard to obtain interaction with the covered content.
There is a problem in the application:
When both pages have edittext as the search box, the keyboard will not pop up after entering the second page.
You need to set attributes in the viewgroup containing edittext.
- Android: focusableintouchmode = "true"