ScrollView——滚动条

用于内容显示不全,可提供滚动条下来形式,显示其余内容。

ScrollView和HorizontalScrollView是为控件或者布局添加滚动条

特点如下:

  1.只能有一个子控件

  2.两个控件可以互相嵌套

  3.ScrollView派生子FrameLayout

  4.ScrollView——垂直滚动条;HorizontalScrollView——水平滚动条

  5.属性scrollbars 可以设置滚动条的方向:但ScrollView设置为horizontal/none效果相同,HorizontalScrollView设置为vertical和none的效果相同

实例如下:

<HorizontalScrollView 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"
tools:context=".MainActivity" > <LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" > <TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="0001" /> <TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="0001" /> //足够多控件
....... </HorizontalScrollView>

允许效果:略

需要看ScrollView效果需将布局文件内容跟标签更改为“ScrollView”,同时修改线性布局控件的布局方式为垂直,即可......

最新文章

  1. 深入理解 JavaScript,以及 Linux 下的开发调试工具
  2. DevExpress v16.1.5图表、Dashboard等多个控件API发生变化
  3. c++打开浏览器
  4. json转类
  5. Mockups Mockplus 网页原型设计
  6. JavaScript进阶(三)之对象
  7. debug实战:Unmanaged High Memory非托管高内存
  8. 20145222黄亚奇《Java程序设计》课程总结
  9. 读loadBalance技术的一些笔记
  10. Linux内核加载全流程
  11. 在百万数据中找出重复的数据sql
  12. CentOS 6.5 伪分布式 安装 hadoop 2.6.0
  13. 第二天(CSS 选择器)
  14. Motrix for Mac(百度网盘加速/全能下载软件) v1.3.7最新版!
  15. nginx~为docker容器添加负载均衡
  16. block,inline,inline-block区别
  17. selenium新手常遇到的坑
  18. 在centos7 部署bbr
  19. SpringMVC Get请求传集合,前端&quot;异步&quot;下载excel 附SpringMVC 后台接受集合
  20. 单源最短路径算法——Bellman-ford算法和Dijkstra算法

热门文章

  1. jqueryIFrame框架内元素操作
  2. UI学习笔记---第十四天数据持久化
  3. 11. Container With Most Water
  4. web标准的可用性和可访问性
  5. ZOJ-3946 Highway Project (最短路)
  6. 越狱Season 1-Episode 9: Tweener
  7. C++虚函数、赋值兼容原则
  8. Twsited异步网络框架
  9. rac 11g_第二个节点重启后无法启动实例:磁盘组dismount问题
  10. 使用seajs来引入js代码