Android控件之ScrollView(滑动控件)探究
来源:互联网 发布:java爬虫爬取图片 编辑:程序博客网 时间:2024/05/22 06:33
ScrollView滚动视图是指当拥有很多内容,屏幕显示不完时,需要通过滚动跳来显示的视图。ScrollView只支持垂直滚动。只能有一个子View
下面为实例:
main.xml布局文件:
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:scrollbars="vertical">
<LinearLayout android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<ImageView android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/p1"
android:layout_gravity="center_horizontal"/>
<ImageView android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/p1"
android:layout_gravity="center_horizontal"/>
<ImageView android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/p1"
android:layout_gravity="center_horizontal"/>
<ImageView android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/p1"
android:layout_gravity="center_horizontal"/>
<ImageView android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/p1"
android:layout_gravity="center_horizontal"/>
<ImageView android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/p1"
android:layout_gravity="center_horizontal"/>
<ImageView android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/p1"
android:layout_gravity="center_horizontal"/>
<ImageView android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/p1"
android:layout_gravity="center_horizontal"/>
<ImageView android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/p1"
android:layout_gravity="center_horizontal"/>
</LinearLayout>
</ScrollView>
效果图:
- Android控件之ScrollView(滑动控件)探究
- Android控件之ScrollView探究
- Android控件之ScrollView探究
- Android控件之ScrollView探究
- Android控件之ScrollView探究
- 【android基础】之Android控件之ScrollView探究
- android控件之ScrollView
- android之用scrollview实现控件滑动固定效果
- Android控件-ScrollView 和WebView之见滑动冲突解决
- Android控件-ScrollView 和WebView之见滑动冲突解决
- Android之解决scrollview总是优先滑动,导致在scrollview内的控件不滑动问题
- Android之解决scrollview总是优先滑动,导致在scrollview内的控件不滑动问题
- android scrollview滑动时悬浮部分控件
- scrollView滑动控件
- ScrollView中滑动控件
- Android控件之ImageView探究
- Android控件之ProgressBar探究
- Android控件之TabHost探究
- Linux inotify功能及实现原理
- UVA_10245_ The Closest Pair Problem
- 在JS中如果函数名与变量名冲突,JS是怎么执行的?
- GET,POST,PUT,DELETE的区别
- Ubuntu Mate +Apache2 配置www服务的一些相关
- Android控件之ScrollView(滑动控件)探究
- java中序列化和反序列化
- JAVA静态
- iOS原生项目中集成React Native
- Xcode:崩溃堆栈符号化,定位崩溃
- POJ-3252 Round Numbers
- 分享前端开发中通过js设置cookie的一组方法
- LoadRunner性能测试结果分析样例
- 数据结构中的栈,在解决很多问题都有用处,比如括号匹配,迷宫求解,表达式求值等等 java中有封装好的类,可以直接调用。