I’m displaying some text with a TextView inside a ScrollView. The activity changes the text (when user hits nav arrow), but the ScrollView doesn’t alter its height for changed text length. As a result, it won’t scroll down all the way down for text longer than the original.
To be clear, I don’t want the views to lengthen on the screen, but just the scrollable length to lengthen (or shorten). Btw, what is the name of this attribute?
Here’s one attempt:
ScrollView vscr = (ScrollView) findViewById(R.id.scroller);
vscr.requestLayout();
I’ve also tried vscr.computeScroll(); and vscr.recomputeViewAttributes(findViewById(R.id.content));, though maybe I’m using them wrongly (I’m rather new at this).
Can anyone tell me how to get the ScrollView to lengthen itself when the contained text becomes longer?
did you set the height of your layouts to wrap_content?