向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》

Last modification:May 9, 2014
如果觉得我的文章对你有用,请随意赞赏