Scrolling TextView

I am having a problem with a text view embedded in a scroll. When the text becomes 4 lines or so, I cannot scroll the top line of text - although I can scroll one line after the last line of text.

Here's the layout:

    <ScrollView android:layout_width="wrap_content"
        android:layout_height="90sp" 
        android:scrollbars="vertical">
        <TextView android:id="@+id/display_english"
            android:layout_width="wrap_content" android:layout_height="wrap_content"
            android:paddingLeft="10dp" android:layout_gravity="center_vertical|center_horizontal"
            android:textSize="30sp" android:textColor="@color/text_color" />
    </ScrollView>

Any thoughts?

+3
source share
2 answers

If you're just trying to scroll through a TextView, then you don't need to embed it in ScrollView. I would choose this solution .

+4
source

After a detailed review of this problem in code and on the Internet, the only viable solutions currently allowing you to scroll vertically within a TextView inside a ScrollView are:

1) , ScrollView HorizontalScrollView ( TextView) . , HorizontalScrollView TextView.

2) - , TextView ScrollView. TextView "WRAP_CONTENT", , TextView . , , ScrollView.

0

All Articles