更新时间:2023-12-04 14:15:22
您可以限制的TextView
的高度来匹配你的用户希望看到的行数,然后简单地把你的的TextView
在滚动型
You can limit the Height of TextView
to match the number of lines you user wants to see, then simply put your TextView
in a ScrollView
我做了一个简单的例子来证明这一点......
I had done 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>