Activity main window and soft keyboard interaction mode, can be used to avoid Input Panel occlusion problem, after Android1.5 a new feature.

Source: Internet
Author: User

Android:windowsoftinputmode

Activity main window and soft keyboard interaction mode, can be used to avoid Input Panel occlusion problem, after Android1.5 a new feature.

This genus affects two things:

"One" when the focus is generated, the soft keyboard is hidden or displayed

"Two" reduces the active main window size to make room for the soft keyboard

it must be set to a value in the list below, or a " State ..."value plus one "adjust ..." a combination of values. Set multiple values in either group-multiple "state ..." values , such as &mdashthere are undefined results. Each value is used between|separate. For example: <activity android:windowsoftinputmode= "Statevisible|adjustresize" ... >

The value set in this(except"Stateunspecified"and the"Adjustunspecified"outside)overrides the value set in the theme


Meaning of each value:

"A" stateunspecified: the state of the soft keyboard is not specified and the system will select an appropriate state or a theme-dependent setting

"B" stateunchanged: When this activity appears, the soft keyboard will remain in the previous activity, whether it is hidden or displayed

"C" Statehidden: When the user chooses activity, the soft keyboard is always hidden

"D" Statealwayshidden: When the Activity main window gets the focus, the soft keyboard is always hidden

"E" statevisible: Soft keyboard is usually visible

"F" statealwaysvisible: The state that the soft keyboard always displays when the user chooses activity

"G" adjustunspecified: The default setting, which is usually determined by the system to hide or show itself

"H" adjustresize: The activity always adjusts the size of the screen to allow space for the soft keyboard

"I" Adjustpan: The contents of the current window will automatically move so that the current focus is never covered by the keyboard and the user can always see the part of the input content

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.