方法一:

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>

Android TextView文字过多时通过滚动条显示多余内容的更多相关文章

  1. Android TextView文字超出一屏不能显示其它的文字 解决方案

    在android上面让TextView 过多的文字实现有滚动条,之前想简单了以为设置TextView的属性就可以实现,结果还是需要ScrollView配合使用,才能达到滚动条的效果有两种方式实现, 一 ...

  2. Android:TextView文字跑马灯的效果实现

    解决TextView文字显示不全的问题. 简单设置跑马灯的效果: <TextView android:id="@+id/textView" android:layout_wi ...

  3. Android TextView 文字居中

    有2种方法可以设置TextView文字居中: 一:在xml文件设置:android:gravity="center" 二:在程序中设置:m_TxtTitle.setGravity( ...

  4. Android TextView文字描边的实现!!

    Android开发:文字描边 转自:http://www.oschina.net/code/snippet_586849_37287 1. [代码][Java]代码 1 2 3 4 5 6 7 8 9 ...

  5. Android TextView文字横向自动滚动(跑马灯)

    TextView实现文字滚动需要以下几个要点:   1.文字长度长于可显示范围:android:singleLine="true"   2.设置可滚到,或显示样式:android: ...

  6. Android—— TextView文字链接4中方法

    转自:http://ghostfromheaven.iteye.com/blog/752181 Android 的实现TextView中文字链接的方式有很多种. 总结起来大概有4种: 1.当文字中出现 ...

  7. Android TextView文字透明度和背景透明度设置

    textview1.setTextColor(Color.argb(255, 0, 255, 0)); //文字透明度 控件设为半透明: 控件名.getBackground().setAlpha(in ...

  8. android TextView 文字垂直的设置

    <TextView android:id="@+id/tv_status" android:layout_width="wrap_content" and ...

  9. Android TextView文字空格

     表示全角空格, <string name="aaa">你好      啊</string> http://stackoverflow.com/questi ...

随机推荐

  1. Android中Activity的生命周期图

  2. python的偏函数(partial)

    偏函数就是固定原函数的某个参数,比如newadd就是固定了add方法的第一个参数,让a=3,这样对newadd方法只要传入参数B就可以实现add方法了,刚看偏函数的写法可能会不适应,因为partial ...

  3. zxing学习笔记 android入门

    对于刚开始学习android开发的童鞋们来说,若有一个简单而又全面的android工程能来剖析,那就是再好不过了,zxing就是不错得例子.    zxing的源码可以到google code上下载, ...

  4. Hibernate学习之双向一对多映射(双向多对一映射)

    © 版权声明:本文为博主原创文章,转载请注明出处 1.双向映射与单向映射 - 一对多单向映射:由一方(教室)维护映射关系,可以通过教室查询该教室下的学生信息,但是不能通过学生查询该学生所在教室信息: ...

  5. Spring学习一----------Spring概况

    © 版权声明:本文为博主原创文章,转载请注明出处 Spring概况 Spring是为了解决企业应用开发的复杂性而创建的. Spring是一种轻量级的控制反转(IOC)和面向切面(AOP)的容器框架. ...

  6. Atitit. Atiposter 发帖机版本历史 编年史

    Atitit. Atiposter 发帖机版本历史 编年史 V1  初步实现sina csdn cnblogs V2  实现qzone sohu 的发帖功能  顺便重构接口实现分离 V3多文件循环发帖 ...

  7. 快速自检电脑是否被黑客入侵过(Linux版)

    前言 严谨地说, Linux只是一个内核, `GNU Linux`才算完整的操作系统, 但在本文里还是用通俗的叫法, 把`Ubuntu`,`Debian`,`RedHat`,`CentOS`,`Arc ...

  8. ”非常危险“的Linux命令

    Linux命令是一种很有趣且有用的东西,但在你不知道会带来什么后果的时候,它又会显得非常危险.所以,在输入某些命令前,请多多检查再敲回车. rm –rf rm –rf是删除文件夹和里面附带内容的一种最 ...

  9. u-boot README--linux support

    Linux HOWTO:============ Porting Linux to U-Boot based systems:------------------------------------- ...

  10. Sphinx(Coreseek)安装和使用指南

    1.安装 1.1安装mmseg ./bootstrap # 必须执行,不然安装会失败 ./configure --prefix=/usr/local/mmseg- #指定安装目录 make make ...