I have created a list view in android and I want to add edit text above the list and when the user enter text the list will be filtered according to user input But i want the list to be hidden at the first time and when the user inters 3 chars the data appears can anyone tell me please if there is a way to filter the list adapter in android ? thanks
Asked
Active
Viewed 47 times
1 Answers
0
Sure. What form of data do you have in your adapter ? The steps are basically:
- Set an adapter with no data or no adapter to your listview
- When the users enter 3 chars, filter your raw data.
- Set the data of your adapter to the filtered data.
- Ask your adapter to draw itself or add the adapter to your listview.

Gordak
- 2,060
- 22
- 32
-
thank you for answering am beginner so your comment could be difficult for me i am going to explain more : am trying to display a large number of strings from xml (16.000) so i get a black screen that's why i want it to be hidden at the first time – Jul 10 '15 at 08:47