In Android, how to force resize of ScrollView?
<p>I am using a ScrollView to scroll on a vertical LinearLayout.  The LinearLayout resizes itself on user input.  When a resize occurs, I want to reposition the scroll location so that the same area of the LinearLayout is viewed.  This works fine, except for when the scroll is near the bottom of the page. When this happens, my svVerticalScroll.scrollTo(...) call seems to be ignored (I can tell based on debugging, that in this case svVerticalScroll.getScrollY() remains the same after the call).  I assume this is being ignored because the scrollTo(...) parameter is greater than the maximum scroll range, because scrollView has not resized.  So... How do I force the ScrollView to resize?</p>

<pre><code>float centerY = svVerticalScroll.getScrollY() + m_ScreenHeight / 2;

m_CurrentScale = m_CurrentScale * delta;

myLinearLayout.doResize(m_CurrentScale);    

myLinearLayout.requestLayout();

svVerticalScroll.invalidate();
svVerticalScroll.requestLayout();

float newcenterY = centerY * delta;

svVerticalScroll.scrollTo(0, (int) (newcenterY - m_ScreenHeight / 2));
</code></pre>
