方法一:

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. How to Check some table was locked

    select * from sys.sysprocesses where blocked<>0  看看waittime是不是很大  kill spid

  2. 通过Navicat for MySQL远程连接的时候报错mysql 1130 的解决方法

    用Navicat连接远程MYSQL,提示如下错误,我以为是自己的防火墙问题,但是关了,依然不行. ERROR 1130: Host '192.168.1.3' is not allowed to co ...

  3. vue相关知识点

    1.el-date-picker输入的时间范围需要两点 A.禁用键盘输入 :editable=false,否则虽然禁用,但是输入框还能输入 B.指定时间范围::picker-options=" ...

  4. Android高级控件(三)——&#160;使用Google ZXing实现二维码的扫描和生成相关功能体系

    Android高级控件(三)-- 使用Google ZXing实现二维码的扫描和生成相关功能体系 摘要 如今的二维码可谓是烂大街了.到处都是二维码.什么都是二维码,扫一扫似乎已经流行到习以为常了,今天 ...

  5. 使用Cocos studio创建一个简单的project

    前不久我接到了一个项目,项目要求使用Cocos2d-X的最新版本号,Cocos2d-X3.4.对于一直在陶醉在Cocos2d-X2.2.3的世界中的我开说,使用Cocos2d-X3.4忽然认为有点不适 ...

  6. 固态硬盘(SSD) 和机 械硬盘(HDD) 优缺点比較

    Attribute SSD (Solid State Drive) HDD (Hard Disk Drive) Power Draw / Battery Life (功耗/电池寿命) Less pow ...

  7. es快照和备份

    注册前要注意配置文件加上 path.repo: ["/data/es_backup"] 然后重启es 不然会报错doesn't match any of the locations ...

  8. IIS 下 部署nodejs 使用反向代理

    目标服务器:targetServer 配置反向代理的服务器:reveseProxServer iis应该是iis7及以上版本,才可以. 1.确定最终访问的网址:比如www.baidu.com  .ww ...

  9. [译]GLUT教程 - 整合代码4

    Lighthouse3d.com >> GLUT Tutorial >> Pop-up Menus >> The Code So Far IV 以下代码使用了位图字 ...

  10. C和C++格式转换

    一.引用参数和指针的转换 标准C不支持引用参数,对此需进行转换.下面以bo1-1.cpp和bo1-1.c中DestroyTriplet()函数为例来说明这种转换. bo1-1.cpp中含有引用参数的函 ...