方法一:

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. openlayers对接百度地图新方法

    上次给大家提供的openlayers对接百度地图有些问题,是因为没有进行分辨率设置,也没有进行相应的平面坐标转换,获取getURL的方法还是没有变化的 getURL: function (bounds ...

  2. hdu 3667 /2010哈尔滨赛区H题 费用与流量为非线性关系/费用流

    题意: 在一般费用流题目改动:路过某路,每x单位流量须要花费 ai*x^2(ai为给定的系数). 開始的的时候,一看仅仅只是是最后统计费用上在改动罢了,一看例子.发现根本没那么简单(ps:以后每次写程 ...

  3. appium for mac 安装与测试ios说明

    一.安装 安装dmg,可以自己下载appium-1.4.0.dmg或者找rtx我要,文件过大不能添加附件. Appium提供了一个doctor,运行appium-doctor 如果有问题,Fix it ...

  4. SVN版本控制图标未显示或显示异常

    TortoiseSVN下载的文件和文件夹如果缺失了那些花花绿绿的状态小图标,很容易逼死某些强迫症患者,更何况这些小图标用处多多 接下来我会逐步展示从常规到非常规的一系列解决方案(不包括重装重启这一类) ...

  5. 匿名函数 invoke

    delegate string MyDele(string str); string MyFun(string str) { return str; } private void Form1_Load ...

  6. MySQL5.5中文支持

    1. /etc/my.cnf.d/client.cnf [client] #password = [your_password] port = 3306 socket = /tmp/mysql.soc ...

  7. linux 下mtime,ctime,atime分析

    一.atime.ctime与mtime atime是指access time,即文件被读取或者执行的时间,修改文件是不会改变access time的.网上很多资料都声称cat.more等读取文件的命令 ...

  8. Memcached的LRU和缓存命中率

    缓存命中率 命中:直接从缓存中读取到想要的数据. 未中:缓存中没有想要的数据,还需要到数据库进行一次查询才能读取到想要的数据. 命中率越高,数据库查询的次数就越少. 读取缓存的速度远比数据库查询的速度 ...

  9. 简洁的BP及RBF神经网络代码

    BP神经网络 function [W,err]=BPTrain(data,label,hiddenlayers,nodes,type) %Train the bp artial nueral net ...

  10. Django--基础补充

    render 函数 在Django的使用中,render函数大多与浏览器发来的GET请求一并出现,它的使用方法非常简单 例如:render(request,"xxx.html",{ ...