1、首先xml文件TextView配置  

  <TextView
    android:id="@+id/tv"
    android:layout_width="500dp"
    android:layout_height="fill_parent"
    android:layout_marginLeft="30dp"
    android:layout_marginTop="30dp"
    android:layout_marginBottom="20dp"
    android:textSize="22sp"
    android:textColor="#000000"
    android:scrollbars="vertical"
    android:background="#C0C0C0"/>

2、然后代码设置

  tv = (TextView)this.findViewById(R.id.tv);

  tv.setMovementMethod(ScrollingMovementMethod.getInstance())

更多相关文章

  1. android —— 自定义控件 最简单下拉刷新,Google最新(可刷新任何控
  2. android 设置中添加首选项 通过Intent调第三方应用
  3. [置顶] Android(安卓)Studio设置Android(安卓)SDK、Android(安卓
  4. android将控件设置为透明色
  5. Android(安卓)5.1 API 22 所有sdk文件下载地址
  6. 自定义Ratingbar,星星“流泪了”解决办法
  7. android使用xml布局文件设计提示对话框
  8. android radiogroup样式(设置切换背景与文字颜色)
  9. Android5.0 SDK 相关资源下载地址

随机推荐

  1. eclipse 配置android sdk和maven
  2. Android(安卓)ProgressBar 各种样式大全
  3. Android之MotionLayout(六),如果使用Keyf
  4. android中的ellipsize设置(省略号的问题)
  5. android:configChanges 屏幕横竖屏切换
  6. Android:EditText屏蔽输入法弹窗
  7. android Context错误使用引发的内存泄露
  8. Android开发资料推荐之安卓巴士Android开
  9. 学习心得(二)
  10. Android启示录——开始Android旅途