只要在你的布局的xml文件中设置你的TextView的属性:
android:maxLines = "AN_INTEGER"
android:scrollbars = "vertical"
然后在你的代码中用:
yourTextView.setMovementMethod(new ScrollingMovementMethod())
它可以自由的滚动了。
2、加ScrollView
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/background"
android:orientation="vertical" >
<ScrollView
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<TextView
android:id="@+id/result"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@android:color/black"
android:textSize="25dp" />
</ScrollView>
</LinearLayout>