Skip to content

Most visited

Recently visited


Handling Keyboard Input

Dependencies and prerequisites

  • Android 1.6 (API Level 3) or higher

The Android system shows an on-screen keyboard—known as a soft input method—when a text field in your UI receives focus. To provide the best user experience, you can specify characteristics about the type of input you expect (such as whether it's a phone number or email address) and how the input method should behave (such as whether it performs auto-correct for spelling mistakes).

In addition to the on-screen input methods, Android also supports hardware keyboards, so it's important that your app optimize its user experience for interaction that might occur through an attached keyboard.

These topics and more are discussed in the following lessons.


Specifying the Input Method Type
Learn how to show certain soft input methods, such as those designed for phone numbers, web addresses, or other formats. Also learn how to specify characteristics such as spelling suggestion behavior and action buttons such as Done or Next.
Handling Input Method Visibility
Learn how to specify when to show the soft input method and how your layout should adjust to the reduced screen space.
Supporting Keyboard Navigation
Learn how to verify that users can navigate your app using a keyboard and how to make any necessary changes to the navigation order.
Handling Keyboard Actions
Learn how to respond directly to keyboard input for user actions.
This site uses cookies to store your preferences for site-specific language and display options.

Get the latest Android developer news and tips that will help you find success on Google Play.

* Required Fields


Follow Google Developers on WeChat

Browse this site in ?

You requested a page in , but your language preference for this site is .

Would you like to change your language preference and browse this site in ? If you want to change your language preference later, use the language menu at the bottom of each page.

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a short survey?
Help us improve the Android developer experience. (Dec 2017 Android Platform & Tools Survey)