Android TextView添加滚动条

samool 发布暂无评论13270 阅读

AI摘要

本文介绍了在Android中为TextView添加滚动条的方法。通过在TextView外层添加一个ScrollView布局,可以实现滚动功能。具体代码示例包括ScrollView和TextView的属性设置。

向android TextView添加滚动条,在网上查了一下,有两种方法,直接添属性和代码的不行,只有增加布局这个经测试是OK,增另一个Scrollview就可以了。

《ScrollView

android:layout_width="fill_parent"  
android:layout_height="wrap_content" 》   
《TextView  
    android:layout_width="fill_parent"  
    android:layout_height="wrap_content"  
    android:textSize="50dp"  
    android:text="a\na\na\na\na\na\na\na\na\na\na\na\na\na\n" /》

《/ScrollView》

  1. 01android平台获取手机IMSI、IMEI 、序列号和手机号的方法2016-01-07
  2. 02Android TextView换行问题2014-03-25
  3. 03android 删除文件2013-07-26
  4. 04android bitmap的放大缩小2013-07-26
  5. 05Android MediaPlayer使用方法2013-02-16
  6. 06Android软件图标的几种大小2013-01-07
  7. 07delphi中webBrowser控件滚动条自动滚动2012-12-27
  8. 08谷歌发布Android 4.2系统2012-10-30
  9. 09Android 4.1.2源码今天将发布2012-10-10
  10. 10Android打开系统设置界面 2012-04-12
COMMENTS / 一纸留言

读者留言 0 条

一纸留言,便是山水间的一次相逢。

还没有留言,欢迎写下第一段交流。

WRITE A COMMENT

写下你的留言