Android - Access child of gridview that is not on screen
<p>Is it possible to access a child view of a <em>gridview</em> that is not on screen and change it?</p>

<p>I have tried using <em>getCount()</em> when iterating over the gridview, but when it reaches the children that are not visible(on screen display) they lose their type (they should be ImageViews) and I can not do anything with them; I want to change their image.</p>

<p>An snippet of code;</p>

<pre><code>GridView gridView = (GridView) findViewById(R.id.grid_view);
Integer items = gridView.getCount();
Log.d(TAG, "1)child count::"+((ViewGroup)gridView).getChildCount());
Log.d(TAG, "2)get count::"+items);
for (int i=0; i &lt; items; ++i) {
    View nextChild = ((ViewGroup)gridView).getChildAt(i);
    if (nextChild instanceof ImageView) {
        Log.i(TAG, i+" is imageview");
        ((ImageView) nextChild).setImageResource(R.drawable.arrow2);
    } else {
        Log.i(TAG, i+" is NOT imageview");
    }
}
</code></pre>
