0

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

1 Answers1

0

Sure. What form of data do you have in your adapter ? The steps are basically:

  1. Set an adapter with no data or no adapter to your listview
  2. When the users enter 3 chars, filter your raw data.
  3. Set the data of your adapter to the filtered data.
  4. 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