You can limit the height of the TextView
to match the number of lines you want to see, and then just enter the TextView
in the ScrollView
I made a simple example to demonstrate this ...
<ScrollView android:layout_height="30dp" android:layout_width="match_parent"> <TextView android:layout_width="match_parent" android:layout_height="30dp" android:textSize="16sp" android:id="@+id/tv1" /> </ScrollView>
source share