方法一:

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. mysql中show processlist过滤和杀死线程

    select * from information_schema.processlist where HOST LIKE '%192.168.1.8%'; kill ID列

  2. 2、cas4.0 单点登录 之 cas-client

    cas4.0 单点登录 之 cas-client cas4.0 单点登录 之 https证书已经做好了证书的准备工作.如今结合cas-server来配置单点登录: 一.安装cas服务端(cas-ser ...

  3. SQL语句练习手册--第四篇

    一.变量那点事儿 1.1 局部变量 (1)声明局部变量 DECLARE @变量名 数据类型 ) DECLARE @id int (2)为变量赋值 SET @变量名 =值 --set用于普通的赋值 SE ...

  4. chown将指定文件的拥有者改为指定的用户或组(转)

    chown将指定文件的拥有者改为指定的用户或组,用户可以是用户名或者用户ID:组可以是组名或者组ID:文件是以空格分开的要改变权限的文件列表,支持通配符.系统管理员经常使用chown命令,在将文件拷贝 ...

  5. 2015级C++第7周项目 友元、共享数据保护、多文件结构

    [项目1-成员函数.友元函数和一般函数有差别]參考解答 (1)阅读以下的程序,体会凝视中的说明(要执行程序,请找到课程主页并复制代码) //例:使用成员函数.友元函数和一般函数的差别 #include ...

  6. 【BIEE】05_启动BIEE时,无法启动BI_SERVER

    本地修改资料库后,重新启动BIEE,结果报错: 点击[查看日志信息]后 从这里是没看出是什么问题造成的,那么我们就要去查询启动日志了 问题解决 找到日志路径:D:\obiee\instances\in ...

  7. asp.net中UpdatePanel数据加载成功后回调

    //添加UpdatePanel加载成功后执行的js方法 Sys.WebForms.PageRequestManager.getInstance().add_pageLoaded(onPageLoade ...

  8. <转>Windows平台下Makefile学习笔记(一)

    本文转自:http://blog.csdn.net/clever101/article/details/8147352 决心学习Makefile,一方面是为了解决编译开源代码时需要跨编译平台的问题(发 ...

  9. Ubuntu 12.04 的IP 设置

      通过访问 /etc/network/interfaces 实现动态IP 或者静态IP 的设置. vim /et/network/interfaces 1.设置动态IP auto lo iface ...

  10. 转Python 标准库 urllib2 的使用细节

    Python 标准库中有很多实用的工具类,但是在具体使用时,标准库文档上对使用细节描述的并不清楚,比如 urllib2 这个 HTTP 客户端库.这里总结了一些 urllib2 库的使用细节. 1 P ...