方法一:

TextView文字过多,显示不全,怎么办?我们可以为Textview添加滚动条。

<TextView                android:id="@+id/bus_detail_content"                 android:layout_width="fill_parent"                android:layout_height="fill_parent"                android:textColor="#000000"                android:scrollbars="vertical"                android:singleLine="false"  />

Activity添加的代码为

busDetailContent=(TextView)findViewById(R.id.bus_detail_content);busDetailContent.setMovementMethod(ScrollingMovementMethod.getInstance());

方法二:

纯XML

<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"          android:layout_width="fill_parent" android:layout_height="fill_parent"    android:scrollbars="vertical" android:fadingEdge="vertical">          <TextView android:layout_width="fill_parent" android:layout_height="wrap_content"    android:id="@+id/text_view" android:textColor="#071907" android:paddingTop="5dip" />  </ScrollView> 

更多相关文章

  1. 浅谈Java中Collections.sort对List排序的两种方法
  2. Python list sort方法的具体使用
  3. python list.sort()根据多个关键字排序的方法实现
  4. Android(安卓)平铺背景图片
  5. Android倒计时 Android仿京东倒计时 Android商城倒计时
  6. android下的android.os.StrictMode$AndroidBlockGuardPolicy.onN
  7. 与Android的系统打交道
  8. android 6.0及以下获取wifi mac地址
  9. android琐碎笔记六

随机推荐

  1. AnsibleTower 之 模板
  2. 告别痛苦,快乐学习Pandas!开源教程《Joyful
  3. SpringCloud 服务的平滑上下线
  4. 快乐学习Pandas入门篇:Pandas基础
  5. 「网工小白必备」全网最详细的网络基础之
  6. 网工小白必备」全网最详细的网络基础之IC
  7. 一文讲解图像插值算法原理!附Python实现
  8. 「网工小白必备」全网最详细的网络基础知
  9. PHP接口与抽象类实例
  10. 李士杰做一个独立的人性之人