让TextView 有滚动条的效果
来源:互联网 发布:七天精通js 编辑:程序博客网 时间:2024/05/17 04:42
网上搜了好几页都不够详细,最直接的方法就是在ScrollView 里面嵌套上TextView,关键属性设置是:
android:fadeScrollbars="true" 滚动条自动隐藏和显示,隐藏还是显示取决于内容的多少;
android:scrollbars="vertical" > 滚动条垂直方向
还有一个就是用相对布局,把TextView 定位到顶部,把菜单按钮固定在底部,如果把
android:fadeScrollbars="true" 滚动条自动隐藏和显示,隐藏还是显示取决于内容的多少;
android:scrollbars="vertical" > 滚动条垂直方向
还有一个就是用相对布局,把TextView 定位到顶部,把菜单按钮固定在底部,如果把
TextView 替换成其他内容就是一个现在流行的界面了,比如,膜拜的地图,淘宝的列表等待
<?xml version="1.0" encoding="utf-8"?><RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/RelativeLayout1" android:layout_width="match_parent" android:layout_height="match_parent" > <ScrollView android:layout_width="fill_parent" android:layout_height="match_parent" android:fadeScrollbars="true" android:scrollbars="vertical" > <TextView android:id="@+id/textView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentTop="true" android:padding="30px" android:textColor="#000000" android:textSize="40px"/> </ScrollView> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentBottom="true" android:layout_centerHorizontal="true" android:radius="5dip" android:background="#ccc" android:focusable="false" android:text="开始" /> </RelativeLayout>
阅读全文
0 0
- 让TextView 有滚动条的效果
- textview滚动条效果的text
- 在android上面让TextView 过多的文字实现有滚动条
- 在android上面让TextView 过多的文字实现有滚动条 scrollview
- 让表格有滚动条的实现
- 让TextView 自带滚动条
- 让TextView 自带滚动条
- 让 TextView 自带滚动条
- 让 TextView 自带滚动条
- 让TextView 自带滚动条
- 让TextView 自带滚动条
- 让 TextView 自带滚动条
- 让TextView 自带滚动条
- 让TextView 自带滚动条
- 让TextView 自带滚动条
- 让 TextView 自带滚动条
- android 让TextView自带滚动条
- 实现Textview 有垂直滚动条
- 大数据竞赛平台——Kaggle 入门
- JAVA 通过网络传输对象(对象序列化)简单示例
- 人脸识别 | 如何解析URL,并给出人脸检测结果
- Google's BigTable 论文(中文翻译)
- react-navigation 使用详解
- 让TextView 有滚动条的效果
- SQL中代替Like语句的函数charindex
- context:component-scan,spring注入
- 怎么做才能学好前端
- React Native Splashscreen实现
- 算法练习(二)
- [文件时间]_[Windows-macOS]_[修改文件的创建时间-修改时间]
- 第三方分享(友盟)
- SAP S/4 HANA的SMARTFORMS如何切换到非word编辑器