How to force a ListView to rebuild/repaint itself

by n179911 » Thu, 17 Sep 2009 08:13:11 GMT


Sponsored Links
 Hi,

Is there anyway to force ListView to rebuild/repaint itself?
i.e. re-get item from the ListAdapter (it can be a CursorAdapter or
ArrayAdapter) and then repaint the all the list view which are
visible?

Thank you.

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



How to force a ListView to rebuild/repaint itself

by Mark Murphy » Thu, 17 Sep 2009 08:18:45 GMT


 


For ArrayAdapter, modify the contents of the list through the adapter
itself (e.g., call add() on the ArrayAdapter), and it will automatically
update the UI.

For CursorAdapter, requery() the underlying Cursor, and it will
automatically update the UI.

-- 
Mark Murphy (a Commons Guy)
 http://commonsware.com  |  http://twitter.com/commonsguy 

_Android Programming Tutorials_ Version 1.0 In Print!

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


Sponsored Links


Other Threads

1. absen dulu

Salam kenal juga, saya juga pemula.
-- 
Sent from my Android phone with K-9 Mail. Please excuse my brevity.




salam kenal utk anggota id android saya pemula mohon diberi bimbingan thanks 
eddy -- ===============  

-- 
"

2. Fwd: WTS : [Pre-Order] High Quality Accessories From Korea (LG Optimus 2X, Nexus S, Atrix 4G, Galaxy Ace, dll)

alo all


Jual juga segala macem asesoris import dari Korea dengan system pre
order... Semua ada di web http://www.zigma-acc.com.. Jika asesoris yg
dicari tidak ada belum ada silahkan request asesoris yg dibutuhkan
selama emg tersedia di Korea kita bisa bantu..

Untuk tanya2 dan request harap lgs japri ke sa...@zigma-acc.com (jgn
reply ke email ini karena takut terlewat)

Reseller Welcome!

Thanks Mods for the bandwidth

--

Interested? See us at www.zigma-acc.com OR email at sa...@zigma-acc.com

-- 
"

3. Capture keyEvent from view displayed by WindowManager.addView()

4. Backward compatibility when compiling.

5. ANDROID IMAGE TRANSMISSION IN A LOOP CONTINUOUSLY

6. Running application in Portrait mode on HoneyComb

7. SQLiteDatabase