Setting the activity's properties in Manifest.xml
Android:windowsoftinputmode="statehidden|stateunchanged"
Related properties:
"Stateunspecified"The state of the soft keyboard (whether it is hidden or visible) is not specified. The system will select an appropriate state or a theme-dependent setting. This is the default setting for the software disk behavior."Stateunchanged"The soft keyboard is persisted regardless of its last state, whether visible or hidden, when the main window appears in front."Statehidden"When the user chooses the activity, the soft keyboard is hidden-that is, when the user determines that the activity is navigated to, instead of returning to it due to leaving another activity."Statealwayshidden"The soft keyboard is always hidden when the activity main window gets focus."Statevisible"The soft keyboard is visible when that is normal (when the user navigates to the Activity main window)."statealwaysvisible When the user chooses this activity, the soft keyboard is visible-that is, when the user determines that the activity is navigated to, rather than returning to it due to leaving another activity. "adjustunspecified" Span style= "color: #000000;" It is not specified whether the Activity main window is resized to allow space on the soft keyboard, or if the contents of the window are visible on the screen where the current focus is. The system will automatically select one of these modes primarily depending on whether the contents of the window have any layout view that can scroll their content. If there is such a view, the window will be resized so that the contents of the scrolling window can be visible in a smaller area. This is the default behavior setting for the main window. "adjustresize" "adjustpan" The Activity main window does not adjust the size of the screen to allow space for the soft keyboard. Instead, the contents of the current window are automatically moved so that the current focus is never covered by the keyboard and the user can always see the part of the input. This is usually not expected than resizing, because the user may turn off the soft keyboard in order to get an interactive operation with the covered content.
A problem has been encountered in the application:
When you have EditText as the search box on all two pages, the keyboard always fails to eject when you enter the second page.
You need to set properties in ViewGroup that contain edittext
Android:focusableintouchmode="true
Android Disable entry to activity Auto Eject keyboard