More than a year, has been learning, to never neglect to tidy up, make the knowledge point good messy, it is time to start to do a summary, step by step, from the basis of deep bar.
Today to explain the Android soft keyboard Windowsoftinputmode properties: including Adjustxx a total of 5 Statexx a total of 6, add up is 10;
Adjustxx This series of properties is found in the test by adjusting certain properties in the form/form to display the software disk . Note: This series of patterns is only
The soft keyboard pops up when the input is necessary
adjustresize: The activity is always resized to ensure that the soft keyboard is visible and does not necessarily care about the current focus
and the input content is visible , the activity is opened by default when the first edittext get focus, pop-up keyboard ;
1, the current activity does not use vertical sliding control pieces time, if you get the focus edittext the soft keyboard pops up where it can be covered, the current activity
Will set aside enough space for the soft keyboard display, but the current focus and input is not visible,
See, the 9th GE EditText's height has been adjusted, compressed.
2, the Current activity has the use of vertical sliding control , if the focus of the EditText in the soft keyboard pop-up can cover the place, Current Activity
No but the resizing makes room to display the soft keyboard, and the current focus and input are visible ,
Adjustpan: The current activity does not adjust the activity size to ensure the display of the soft keyboard, but rather by adjusting the layout to ensure get focus and input is visible,
When you open the activity, the default first edittext gets the focus, but the soft keyboard does not open automatically;
1, when there is no vertical scrolling layout, will be the current focus above the layout top up, to ensure that the focus is visible;
2, when using a vertical scrolling layout, will be the current focus above the layout top up, and sometimes by sliding to see the above layout , and sometimes can be seen by sliding
Focus on the layout (this is the effect of my millet test);
The first one has no scrolling layout, second, three has a scrolling layout (the second one can slide up and the third one can slide)
Adjustunspecified: The default mode of the soft keyboard, in the literal sense is not to specify the display and hide mode, in this case the activity will be based on
Different situations to choose the display mode of the soft keyboard;
1, when there is no vertical sliding control, the activity of the soft keyboard display select Adjustpan mode, in the absence of vertical scrolling control when the soft keyboard display mode and
Adjustpan situation (1) No scrolling control is the same as the top of the layout, will not eject the software disk;
2, when there is a vertical scrolling control, the activity of the soft keyboard display select Adjustresize mode, and Adjustresize (2) when the scroll control
is the same, and will eject the software disk, Note that in the case of the next popup software disk ;
Adjustnothing: After selecting this mode, it will be found that the pattern found to be equivalent to or is actually a soft keyboard in the layout of a layer blocked
The layout does not change the properties of the layout, and the soft keyboard does not care whether the focus is visible, regardless of whether the control is scrolled or not. Nor does it default
Eject the software disk.
Statexx This series is by renaming the state to control the display of the software disk hidden, Note: The pattern of this series is visible in relation to the current focus, i.e.
Soft Keyboard when it bounces out, does not obscure the focus
Statehidden: As the name implies is hidden software soft keyboard, and regardless of whether the previous interface has open software software, in the current interface open
It also hides the soft keyboard, and
Statealwayshidden: In any case will hide the soft keyboard, the truth that this really did not see and Statehidden have what is not the same, hope
There's a man pointing.
statevisible: This mode no matter what the situation dialog forcibly eject the software disk, regardless of whether there is an input box, function only in the current interface , such as:
statealwaysvisible: This mode no matter what the situation of the dialog forcibly eject the software disk, regardless of whether there is an input box, and if jump to the next interface
, the next interface does not have the input box, the soft keyboard will not disappear, that is, its role is not only in the current page
Stateunchanged: This mode does not change the state of the soft keyboard, if the software is in the previous/next interface state, to the current
The interface still retains the past interface of the soft keyboard state, the hidden continues to hide, the display continues to display
Stateunspecified: The literal meaning is not specified, by default this method is used for interaction, if the current interface does not enter the necessary
(no input control) or when there is an input control but no time to scroll the control, the soft keyboard will not display, if two conditions are satisfied, the display
Soft keyboard.
if there's any other way of thinking or a more accurate understanding, please advise
Android Soft Keyboard Basics Summary (i)