Disable access to activity. The keyboard is automatically displayed.

Source: Internet
Author: User
Disable access to activity automatically pop-up keyboard to set activity attributes in manifest. xml

 

  1. Android: windowsoftinputmode = "statehidden | stateunchanged"

Related attributes:


  1. 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.
  2. The "stateunchanged" keypad is kept visible or hidden no matter what the last time it was, when the main window appears in front.
  3. "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.
  4. The "statealwayshidden" keypad is always hidden when the focus of the activity main window is obtained.
  5. "Statevisible" is visible on the keyboard. When the keyboard is normal (when you navigate to the main activity window ).
  6. "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.
  7. "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.
  8. "Adjustresize" the main activity window is always adjusted to the screen size so as to leave space for the soft keyboard.
  9. "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.

 

  1. Android: focusableintouchmode = "true"

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.