• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Force user to use one of the autocomplete options

ScotDiddle

Lurker
Hello All,

My business app requires specific items to be entered into EditText Fields. (Zip codes for the state of Virginia only, for example.) I am using an AutoCompleteTextView, and it is working as advertised. How do I ensure that only one of the items shown in the auto-complete drop-down list are allowed in the edit box field.

Thanks,

Scot L. Diddle, Richmond VA
 
jonbonazza, Thanks for the reply, but a spinner would be impractaical. Virginia has a lot of zip codes... Also, I have a bunch of String[] arrays where the AutoComplete value might be up to 80 characters or more... Spinner display would look awful and be hard to navigate in both instances.
Any way to do what I want ?

Thanks again.

Scot L. Diddle, Richmond VA
 
jonbonazza,

Thanks, that's what I figured. Maybe after I become proficient in Java I will write my own extended class :)

I am validating before using user-supplied values... Just good programming practice, and I have been practicing since 1980.

Scot
 
Back
Top Bottom