0

I'm building a zip code search page for my Android app so I want to force the user to enter 5 numeric digits. I've searched everywhere and I don't see any way to for the Search Dialog. I know that text entry fields can be set to a numeric type, how do I do that for the Search Dialog?

Alan Moore
  • 6,525
  • 6
  • 55
  • 68

2 Answers2

1

In the searchable that you have defined, you can set the input type.

For more info refer here:

http://developer.android.com/guide/topics/search/searchable-config.html

Hope this helps!

Dimitris Makris
  • 5,183
  • 2
  • 34
  • 54
1

You can use Searchable Configuration

In That you can Specify

android:inputType="inputType"
android:imeOptions="imeOptions"

For more information

http://developer.android.com/guide/topics/search/searchable-config.html

Vipul
  • 27,808
  • 7
  • 60
  • 75