設定textview
<TextView
android:id="@+id/content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scrollbars="vertical"
android:fadeScrollbars="false"/>
需要注意的是 在Activity中設定一行代碼:
textview.setMovementMethod(ScrollingMovementMethod.getInstance());
此時textview滑動有滾動條 如果想不存在滾動條,就把
android:scrollbars="vertical"
改為
android:scrollbars="none"
或者就把這個屬性去掉;