android textview内容超长滚动视图
16lz
2021-12-04
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())
更多相关文章
- android —— 自定义控件 最简单下拉刷新,Google最新(可刷新任何控
- android 设置中添加首选项 通过Intent调第三方应用
- [置顶] Android(安卓)Studio设置Android(安卓)SDK、Android(安卓
- android将控件设置为透明色
- Android(安卓)5.1 API 22 所有sdk文件下载地址
- 自定义Ratingbar,星星“流泪了”解决办法
- android使用xml布局文件设计提示对话框
- android radiogroup样式(设置切换背景与文字颜色)
- Android5.0 SDK 相关资源下载地址