listview search

by manigault » Wed, 02 Sep 2009 16:25:08 GMT

Sponsored Links
 I have a listview with cursor adapter and i want to be able to search
in the list view. I implemented my own search : i implement
TextWatcher interface and when the text is changed i make a new query
to the db to obtain a new cursor and than refresh the listview content
it works but it is too slow and its not the android way :). There is
also another way to implement Filtarable in the adapter for the
listview on than setTextFilterEnabled(true) but i think the
performance will be the same. So the question is what is the best way
to implement search for a listview and can i use the default search
( in contacts listview for example with the scrollbar that shows the
Thanks in advance.

listview search

by sweet » Thu, 03 Sep 2009 02:20:16 GMT

 check that %E2%80%99une-recette-avec-autocompletion/


Sponsored Links

listview search

by sweet » Thu, 03 Sep 2009 02:25:37 GMT

 I don't think that contact listview is better because it's juste a
search about one letter but i know tuto of autocomplet search. Check
that it may interess you
(and if you want i can see your code)

the tuto: %E2%80%99une-recette-avec-autocompletion/


listview search

by Dianne Hackborn » Thu, 03 Sep 2009 02:58:30 GMT

 Contacts has three ways to search:

- By jumping through letters with the thumb.
- By typing lettings on the keyboard to filter.
- By pressing the search key to invoke the search UI and show the filter
results there.

These are all standard parts of the platform, and ideally would be
implemented by any list view with a significant amount of data.

Dianne Hackborn
Android framework engineer

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.


listview search

by manigault » Thu, 03 Sep 2009 16:22:55 GMT

 Thanks for the reply. How can i implement the search scrollbar that
shows the first letter of the item in the listview.


Other Threads

1. Rogers HTC Magic

Will google be offering a work around to rogers no update policy? it
would be great to get 1.6 or even 2... And i would prefer to avoid
rooting my phone.


2. how to create int[] array containing blading colors


i need to create int array containing two blading colors - e.g. for
green and red:

arr[0] == 0xff00ff00 // green
arr[1] == 0xff11ee00
arr[2] == 0xff22dd00
arr[3] == 0xff33cc00
arr[arr.length - 1] == 0xffff0000 // red

i couldn't find any API for creating such an array, so i used

created GradientDrawable, set its bounds to setBounds(0, 0, 100, 1)
then created Bitmap 100 x 1, drew GradientDrawable on this Bitmap and
finally gotPixels() from Bitmap

is there any more simple way?



3. Alarm Wake Lock and Services

4. Nasib Roger Dream dan Magic

5. How to use the dpad button to pause and play audio while the device is locked

6. Select image resource dynamically

7. Upgrade official Magic