How to refresh ListView so that the selected item becomes fully visible when a footer appears and overlaps it?
<p>I have a <code>ListView</code> with a few checkboxes and a footer that I have to show when one of these checkboxes is checked.</p>

<p>What I'm trying to achieve is that if I click on an item that would be overlapped by this footer, the <code>ListView</code> would scroll automatically to show this item. Note that the <code>ListView</code> is laid correctly and can be further scrolled.</p>

<p>I've tried this in the onItemClicked function and it hasn't worked so far:</p>

<pre><code>if (mFooterView.getVisibility() != View.VISIBLE) {
    mFooterView.setVisibility(View.VISIBLE);

    mImagesListView.smoothScrollToPosition(position);
}
</code></pre>

<p>The problem seems to be that smoothScrollToPosition uses the current measurement, which gets invalidated by <code>mFooterView.setVisibility(View.VISIBLE)</code>. The new measurements, however, don't seem to be available until the next redraw.</p>

<p>Is there anyway I can achieve this effect? Thanks a lot.</p>
