ScrollView垂直滚动
来源:互联网 发布:淘宝店铺装修宝贝 编辑:程序博客网 时间:2024/06/15 20:50
Android容器:ScrollView
ScrollView可以实现界面的垂直滚动,滚动的内容为它包含的View,需要注意的是:ScrollView只能包含一个子视图或视图组,一般情况,通常使用一个垂直的LinearLayout。
<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent"> <ScrollView android:layout_width="match_parent" android:layout_height="match_parent"> <LinearLayout android:orientation="vertical" android:layout_width="match_parent" android:layout_height="wrap_content"> <TextView android:text="第1行内容" android:textSize="48dp" android:layout_width="wrap_content" android:layout_height="wrap_content" /> <TextView android:text="第2行内容" android:textSize="48dp" android:layout_width="wrap_content" android:layout_height="wrap_content" /> <TextView android:text="第3行内容" android:textSize="48dp" android:layout_width="wrap_content" android:layout_height="wrap_content" /> <TextView android:text="第4行内容" android:textSize="48dp" android:layout_width="wrap_content" android:layout_height="wrap_content" /> <TextView android:text="第5行内容" android:textSize="48dp" android:layout_width="wrap_content" android:layout_height="wrap_content" /> <TextView android:text="第6行内容" android:textSize="48dp" android:layout_width="wrap_content" android:layout_height="wrap_content" /> <TextView android:text="第7行内容" android:textSize="48dp" android:layout_width="wrap_content" android:layout_height="wrap_content" /> <TextView android:text="第8行内容" android:textSize="48dp" android:layout_width="wrap_content" android:layout_height="wrap_content" /> <TextView android:text="第9行内容" android:textSize="48dp" android:layout_width="wrap_content" android:layout_height="wrap_content" /> <TextView android:text="第10行内容" android:textSize="48dp" android:layout_width="wrap_content" android:layout_height="wrap_content" /> <TextView android:text="第11行内容" android:textSize="48dp" android:layout_width="wrap_content" android:layout_height="wrap_content" /> <TextView android:text="第12行内容" android:textSize="48dp" android:layout_width="wrap_content" android:layout_height="wrap_content" /> <TextView android:text="第13行内容" android:textSize="48dp" android:layout_width="wrap_content" android:layout_height="wrap_content" /> <TextView android:text="第14行内容" android:textSize="48dp" android:layout_width="wrap_content" android:layout_height="wrap_content" /> <TextView android:text="第15行内容" android:textSize="48dp" android:layout_width="wrap_content" android:layout_height="wrap_content" /> </LinearLayout> </ScrollView></LinearLayout>
阅读全文
1 0
- ScrollView垂直滚动
- Android添加垂直滚动ScrollView
- Android添加垂直滚动ScrollView
- ScrollView 控件支持垂直滚动
- Android HorizontalScrollView和ScrollView 水平滚动 垂直滚动
- [一个星期自学安卓]垂直滚动条ScrollView
- android 图片垂直方向( ScrollView) ,水平方向HorizontalScrollView 滚动
- Android 垂直与水平滚动条:Scrollview与HorizontalScrollView
- Android项目笔记一:TextView+ScrollView 实现垂直滚动条
- Android 垂直与水平滚动条:Scrollview与HorizontalScrollView
- 【Android 开发】:UI控件之 ScrollView垂直滚动控件 和 HorizontalScrollView水平滚动控件的使用
- 安卓编程应用-ScrollView垂直滚动和HorizontalScrollView水平滚动。
- [Android] ScrollView 垂直滚动控件和 HorizontalScrollView 水平滚动控件的使用
- scrollview滚动
- 安卓控件使用系列22:ScrollView垂直滚动控件的使用方法
- richedit垂直滚动条滚动
- 垂直滚动公告板
- 垂直滚动信息板
- 二叉练习代码
- jsoup 多个 class Selector 怎么写?
- java Dubbo框架的时候报错BindingException
- windows 安装python3.5启动报错:api-ms-win-crt-runtime-l1-1-0.dll丢失
- python
- ScrollView垂直滚动
- Power2Go Platinum(威力酷烧)官方破解版V11.0.2330下载 | power2go 11 破解版含威力酷烧11 激活方法
- Android TV 焦点与按键事件分析
- Zookeeper基本原理
- 删数游戏
- 剑指offer—把二叉树打印成多行
- 小的疑问
- 获取app相关路径下所有文件大小
- MyCat介绍