Greetings Androidians,
I would like to have a special control that behaves like an
AutoCompleteTextView but does not allow the user to type any
characters that would not cause the AutoCompleteTextView to bring up
values in its list.
Put another way, I have a list of 400+ states and countries for
the user to choose from, and I don't want to have the user scroll down
400 items to get to Zambia. AutoCompleteTextView is useful because
hitting Z brings up New Zealand, Zambia, Zimbabwe, etc. The problem
with the AutoCompleteTextView is that it also allows for values not in
the list to be typed in, and I would prefer a UI where I can prevent
the user from doing this.
Ideally I would use setThreshold with 0 or 1 and ignore any
keystrokes that would cause the AutoCompleteTextView to not narrow-in
on an entry, but coding this myself explicitly seems tedious and not-
so-elegant.
Is there another control that does what I want, like some kind of
Spinner that accepts keyboard input to zero-in on entries? Or do I
need to do something with AutoCompleteTextView.Validator?
Thanks in advance,
/d42
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en