Android中TextView内容过长 添加滚动条进行展示

来源:互联网 发布:雪梨开的淘宝店网址 编辑:程序博客网 时间:2024/06/10 01:06
<TextView        Android:id="@+id/tv"         android:layout_width="fill_parent"        android:layout_height="fill_parent"        android:textColor="#000000"        android:scrollbars="vertical"        android:singleLine="false"  />

tv = (TextView) findViewById(R.id.tv);// 设置当前textView内容过多的时候可以滚动tv.setMovementMethod(ScrollingMovementMethod.getInstance());
1 0
原创粉丝点击