How to change ListView item before it is rendered
<p>I have following code that works fine when my ListView is already rendered (eg. when fired by onClick events, etc.)</p>

<pre><code>TextView tv = (TextView)list.getChildAt(position);  //list is my ListView
if (tv!=null) {
    tv.setPaintFlags(tv.getPaintFlags() | Paint.STRIKE_THRU_TEXT_FLAG);
}
</code></pre>

<p>However, sometimes I need to apply this STRIKE_THRU_TEXT_FLAG flag to some items of ListView when activity is being restored (after rotation, restart...). If I try to run this code in <strong>onCreate</strong> or <strong>onStart</strong> methods then <code>list.getChild(position)</code> returns <strong>null</strong> because no ListView item is visible yet (in fact screen is black at this time and actual drawing seems to be done in some later function). <br><br>
Is there any easy way how to get around this? Maybe <strong>getChild</strong> function is not the best for this case...Or would you override rendering function of the ListView to make it work (seems like overkill to me)? Thanks</p>
