android soft keyboard pops up from the top view of the bottom of the problem

android: windowSoftInputMode this property, this property detail below:
 
 
Description windowSoftInputMode property settings.
 
<activity android:windowSoftInputMode=["stateUnspecified",
 
                                    "stateUnchanged", "stateHidden",
 
                                    "stateAlwaysHidden", "stateVisible",
 
                                    "stateAlwaysVisible", "adjustUnspecified",
 
                                    "adjustResize", " …… >
 
</activity>
 
attributes:
 
android:windowSoftInputMode
 
How the main window contains soft keyboard activities and interactive window on the screen. Setting this property will affect two things
:
 

Soft keyboard status - whether it is hidden or display - When activity
(Activity) become the focus of the user.
 

Main window adjustment activities - current focus of its contents when it is covered with a soft keyboard is to reduce the active size of the main window to make room for the soft keyboard or discharge if the active window when the part is visible.
 
It must be a value set in the following list, or a  
"State ..." value plus a
"Adjust ..." combination of values. In any set of a plurality of values ​​- a plurality of
"State ..." values, such as &
mdash have undefined results. A value between the respective  
| Apart. E.g  
: <activity android:windowSoftInputMode="stateVisible|adjustResize" . . . >
 
In this set of values
(except
"stateUnspecified"和
"adjustUnspecified"以外
) Will override the value set in the topic
 
value
 
description
 
"stateUnspecified"
 
Soft keyboard state:
(Whether it is hidden or visible
) Is not specified. The system will choose an appropriate state or set dependent on the subject matter. This behavior is for the software disc default settings.
 
"stateUnchanged"
 
Soft keyboard is held, whether it was the last state, whether visible or hidden, when the main window appears on the front.
 
"stateHidden"
 
When the user selects the  
Activity, the soft keyboard is hidden - that is, when a user navigates to determine the
Activity time, instead of returning it to another due to leave
Activity。
 
"StateAlwaysHidden"
 
Soft keyboard is always hidden, when the
Activity main window gets focus.
 
"stateVisible"
 
Soft keyboard is visible, that is normal when the right time
(When a user navigates to
When the main window Activity
)。
 
"StateAlwaysVisible"
 
When the user selects this
Activity, the soft keyboard is visible - that is, that is, when a user navigates to determine the
Activity time, instead of returning it to another due to leave
Activity。
 
"adjustUnspecified"
 
It is not specified whether the
Activity resize the main window to allow space soft keyboard, or whether the contents of the window obtain the current focus on the screen is visible. The system will automatically select these modes depends on whether the content is a major window has any layout views can scroll their contents. If there is such a view, the window is resized, the assumption can scroll the window contents in a smaller area visible. The main window is the default setting behavior.
 
"adjustResize"
 
That
Activity main window always adjust the size of the screen in order to leave room for the soft keyboard
 
"adjustPan"
 
That
Activity main window does not resize the screen to make room soft keyboard. Instead, the contents of the current window will automatically move to the current focus is never keyboard overlay and the user can always see the part of the input content. This is generally not desirable than resizing, because the user may close the soft keyboard in order to achieve interoperability with the contents covered.

Reproduced in: https: //my.oschina.net/dminter/blog/205051

Guess you like

Origin blog.csdn.net/weixin_34246551/article/details/91888841