Friday, 15 August 2014

Does an Android class exist with similarities to both Spinner and AutoCompleteTextView? -


I'm trying to get AutoCompleteTextView and, a OnListItemClickListener To return the ID from a database to be more specific, I want to be able to type something to a user, click on an option that pops up, and then, instead of completing the typed word, Click the ID associated with that term from that user.

I know that, through a custom adapter, I can return an ID through a spinner , but I want the user to be able to type in it Be what they are watching. Is there a way to do this through AutoCompleteTextView , or is there another class where I can do this?

Thank you!

There is no such class with both types of AFICs.

You can try the following code that is ...

last automatic full text visit mAutoCompleteTextView; Last Array Adapter & lt; String & gt; MAdapter = new array adapter & lt; String & gt; (GetActivity (), Android R. Outout. Simple_DropDown_tim_1 line, gate resorts (). GetStringArray (R. Nightly Articles)); MAutoCompleteTextView = (see Autocomplete text) view.findViewById (R.id.name_txt); MAutoCompleteTextView.setAdapter (mAdapter); Mouto ComplextextWave .SetOneClickListor (new view .OnclickList () {@ Override Public Wide Onclick (Final View RGEL) {Mato Complettech Viv. Showworld DopDown ();}});

No comments:

Post a Comment