sups
sups

Reputation: 113

Text filter for spinner

how to achieve setTextFilterEnabled(true) like this thing on spinner? In my spinner 54 items r there I would like when the user types any letter the spinner analysis shows the products that begin with that letter. Any idea how to do this? or any other suggestions? ... Thanks in advance ... Plz help

Upvotes: 0

Views: 1050

Answers (1)

Shailendra Singh Rajawat
Shailendra Singh Rajawat

Reputation: 8242

If you are expecting platform support for this, i guess you will get nothing .

so go through this way :

  1. show soft keyboard
  2. add key listener and save user input .
  3. inside spinner listener check input string and reset adapter with filtered values . for this you need to implement a custom adapter which can filter its values .

Upvotes: 4

Related Questions