unable to search using custom Array Adapter in Android?

前端 未结 2 1469
礼貌的吻别
礼貌的吻别 2021-01-29 06:48

I am unable to search from listview, i tried various ways, but its not working for me(No Errors). I have other way to search but i want to make this way possible.

相关标签:
2条回答
  • 2021-01-29 07:20

    i have to switch another way of searching by Implementing Filterable Class

    Please see similar answer given by me

    0 讨论(0)
  • 2021-01-29 07:41

    1) Call mListview.setTextFilterEnabled(true); on the ListView to enable filtering

    2) Create a relevant constructor for your CustomAdapter class. You'll need to pass it context as well as various resources/data. Read up on it: http://developer.android.com/reference/android/widget/ArrayAdapter.html

    OR

    Use a TextWatcher linked here.

    0 讨论(0)
提交回复
热议问题