tags:

views:

89

answers:

2

hi, I have a ListView that contains some data from sqllite table. the table is updated by some other process, and I would like to refresh it's data.

I tried invalidate, tried doing setAdapter() again and again, nothing helped. it does not reload. Should I close the adapter somehow and re-open it?

The strange thing is that if I open another activity, then go back - it WILL refresh itself.

+2  A: 

You could try the Adapter.notifyDataSetChanged() function. It might work.

aniait
+2  A: 

if you are using a SimpleCursorAdapter, calling requery() on the cursor attached to the adapter will automatically refresh the adapter and attached view.

QRohlf