ListView with TextFilter

by vincent.gann...@gmail.com » Fri, 06 Mar 2009 22:00:30 GMT


Sponsored Links
 Hi all,

I have a ListView with the text filter enabled plus an
OnItemClickListener. I don't understand how to find out which item
from my initial list was clicked because in void onItemClick
(AdapterView <?> parent, View v, int position, long id) position gives
the current position of the clicked item (after filtering) which is
NOT the initial position of this item in the list.

Any way to do it? I would be disapointed if we should do the filtering
ourselves in the same time in the corresponding ListAdapter...

Thanks.
--~--~---------~--~----~------------~-------~--~----~



ListView with TextFilter

by Romain Guy » Sat, 07 Mar 2009 00:44:33 GMT


 Filtering happens in the adapter at the same time. All you have to do
is use the position parameter to ask the adapter for the item at that
position.

On Fri, Mar 6, 2009 at 6:00 AM, vincent.gann...@gmail.com





-- 
Romain Guy
Android framework engineer
romain...@android.com

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

--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


ListView with TextFilter

by vincent.gann...@gmail.com » Sat, 07 Mar 2009 00:54:32 GMT


 It works! Great! Thanks Romain :-)
--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Force a full screen Activity to remeasure/redraw on resume?

The app I'm working on is set to NoTitleBar and Fullscreen, and the
activities are all in landscape mode. Sometimes when I return to the
application after it has been paused, the Activity looks as if it's
shifted down to make space for the title bar. If I navigate to another
Activity or even do some action that pops up a dialog, it quickly
corrects itself - the activity jumps up to full screen and remeasures
all the child views. I would like to do something like this by default
when the Activity resumes.  Is there a method in Activity that I can
call to manually retrigger the measure/layout process and possibly
applying the NoTitleBarFullScreen theme?  And if so, are there any
possible issues with doing this manually?

-- 

2. (WTCurhat) Pusing cari gadget...

bener kata om yopie sama om bernard
tambah dikit lg dapet desire tuh :D
klo saya pribadi seh lebih suka produk HTC
dari segi kualitas dan performa lebih bagus dari motorola

-- 
===============
"

3. [WTA] samsung galaxy s vibrant

4. Mau tanya tentang Android yang entry level tapi yg lumayan bagus

5. how to change webview's transparency

6. live wallpaper write access for sdcard

7. BroadcastReceiver onReceive startActivity Issue