Android的ScrollView和HorizontalScrollView-android学习之旅(四十一)
来源:互联网 发布:腾讯视频数据分析 编辑:程序博客网 时间:2024/06/03 09:24
HorizontalScrollView和ScrollView简介
ScrollView和HorizontalScrollView都继承于FrameLayout组件,两个都是容器,前者为里面的组件添加竖直的滚动条,后者是水平的滚动条。
代码示例
<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" > <ScrollView android:layout_width="fill_parent" android:layout_height="fill_parent"> <HorizontalScrollView android:layout_width="fill_parent" android:layout_height="fill_parent"> <LinearLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:orientation="vertical"> <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="hehhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh" android:textSize="60dp"/> <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="hehhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh" android:textSize="60dp"/> <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="hehhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh" android:textSize="60dp"/> <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="hehhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh" android:textSize="60dp"/> <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="hehhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh" android:textSize="60dp"/> <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="hehhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh" android:textSize="60dp"/> <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="hehhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh" android:textSize="60dp"/> <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="hehhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh" android:textSize="60dp"/> <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="hehhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh" android:textSize="60dp"/> <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="hehhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh" android:textSize="60dp"/> <TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="hehhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh" android:textSize="60dp"/> </LinearLayout> </HorizontalScrollView> </ScrollView></LinearLayout>
效果图
0 0
- Android的ScrollView和HorizontalScrollView-android学习之旅(四十一)
- android ScrollView 和 HorizontalScrollView 的使用
- android ScrollView 和 HorizontalScrollView 的使用
- Android开发UI之──HorizontalScrollView和ScrollView
- Android的Notification的简介-android学习之旅(四十一)
- Android中HorizontalScrollView和Scrollview的配置与使用
- 【Android 开发】:UI控件之 ScrollView垂直滚动控件 和 HorizontalScrollView水平滚动控件的使用
- android开发学习笔记系列(3)--ScrollView与HorizontalScrollView
- Android ScrollView, HorizontalScrollView
- android控件:ScrollView/HorizontalScrollView
- Android UI系列-----ScrollView和HorizontalScrollView
- Android UI系列-----ScrollView和HorizontalScrollView
- Android—ScrollView和HorizontalScrollView使用
- Android中ScrollView和HorizontalScrollView使用详解.
- Android UI系列-----ScrollView和HorizontalScrollView
- Android:ScrollView/HorizontalScrollView常用技巧
- Android HorizontalScrollView ScrollView 消除阴影
- android 水平滚动ScrollView: HorizontalScrollView
- hdu 2795 Billboard 线段树 点更新
- 工程Makefile实例
- Microsoft Visual Studio 2010 如何添加控制台调试信息
- GreenDao官方文档翻译
- Hadoop文件解压缩
- Android的ScrollView和HorizontalScrollView-android学习之旅(四十一)
- mysql 架构与概念
- Structs 整合Spring
- zerglurker的C语言教程001——开发环境搭建
- Android实现回退
- Timer和TimerTask详解——(转)
- 解决RecyclerView 在XML文件中,不能preview
- Contiki网络协议栈uIP和rime
- Android开发中完全退出程序的三种方法