How to refresh android GridView
<p>I'm doing GridView activity that first show default image, then i start a new thread for netowrk task to download image from datatbase, and i would like that after the thread is finished, the GridView will automatically refresh the images in grid.</p>

<p><a href="http://stackoverflow.com/questions/8053919/how-can-i-dynamically-add-images-to-a-gridview">from this question</a> i took the following code:</p>

<pre><code>ImageAdapter adapt = (ImageAdapter)gridView.getAdapter();
adapt.setBitmap(bitmaps);
adapt.notifyDataSetChanged();
</code></pre>

<p>which update the adapter of the grid.
I'm doing this 3 lines inside the onResume() method but after the thread finish i need to call the onResume() method somehow (by pausing the activity or somthing simillar).</p>

<p>now if i'm moving to another acitivity (like one of the grid images) and then press the back button i can see the grid view image that i just downloaded from the database. (because it calls onPause() method and then onResume() )</p>

<p>Doe's anyone have a solution to this problem?</p>

<p>Thanks</p>

<p>Edit:
The thread is running through AsyncTask</p>
