android学习笔记11——ScrollView
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”,同时修改线性布局控件的布局方式为垂直,即可......
android学习笔记11——ScrollView的更多相关文章
- Android学习笔记(11):线性布局LinearLayout
线性布局LinearLayout是指在横向或是竖向一个接一个地排列.当排列的组件超出屏幕后,超出的组件将不会再显示出来. LinearLayout支持的XML属性和相应方法如表所看到的: Attrib ...
- 【转】Pro Android学习笔记(二三):用户界面和控制(11):其他控件
目录(?)[-] Chronometer计时器控件 倒计时CountDownTimer Switch控件 Space控件 其他控件 Android提供了很多控件,基本上都是view的扩展. Chron ...
- Android学习笔记之JSON数据解析
转载:Android学习笔记44:JSON数据解析 JSON(JavaScript Object Notation)是一种轻量级的数据交换格式,采用完全独立于语言的文本格式,为Web应用开发提供了一种 ...
- Android学习笔记36:使用SQLite方式存储数据
在Android中一共提供了5种数据存储方式,分别为: (1)Files:通过FileInputStream和FileOutputStream对文件进行操作.具体使用方法可以参阅博文<Andro ...
- Pro Android学习笔记 ActionBar(1):Home图标区
Pro Android学习笔记(四八):ActionBar(1):Home图标区 2013年03月10日 ⁄ 综合 ⁄ 共 3256字 ⁄ 字号 小 中 大 ⁄ 评论关闭 ActionBar在A ...
- 【转】 Pro Android学习笔记(五七):Preferences(1):ListPreference
目录(?)[-] 例子1ListPreference小例子 定义一个preferences XML文件 继承PreferenceActivity 用户定制偏好的读取 第一次运行时设置缺省值 设置Cat ...
- Android 学习笔记之Volley(七)实现Json数据加载和解析...
学习内容: 1.使用Volley实现异步加载Json数据... Volley的第二大请求就是通过发送请求异步实现Json数据信息的加载,加载Json数据有两种方式,一种是通过获取Json对象,然后 ...
- Android学习笔记进阶之在图片上涂鸦(能清屏)
Android学习笔记进阶之在图片上涂鸦(能清屏) 2013-11-19 10:52 117人阅读 评论(0) 收藏 举报 HandWritingActivity.java package xiaos ...
- android学习笔记36——使用原始XML文件
XML文件 android中使用XML文件,需要开发者手动创建res/xml文件夹. 实例如下: book.xml==> <?xml version="1.0" enc ...
随机推荐
- Binary Tree Traversal
1.Preorder Traversal Given a binary tree, return the preorder traversal of its nodes' values. For ex ...
- asp.net网站 提示Ambiguous match found
在ASP.net中,每个aspx页面都会有一个.cs文件,(好像不可以多个aspx共用一个cs的,我前面就碰到这个问题), 在aspx页面中,我们会用到服务器控件,或html控件,这些控件的id命名时 ...
- memcache 线程深入理解分析 及 源码研究
http://blog.csdn.net/huithe/article/details/8006186
- 98. Validate Binary Search Tree
Given a binary tree, determine if it is a valid binary search tree (BST). Assume a BST is defined as ...
- c 深度剖析 5
1,指针没有指向一块合法的区域 1指针没有初始化 1 2 3 4 5 6 7 8 9 10 11 12 13 #include <stdio.h> #include <string. ...
- 使用配置方式进行ssh的整合以及管理员管理的案例(二)
(续) 删除Hibernate配置文件的写法: 在applicationContext.xml中添加数据库操作的相关配置: <!-- 配置数据库连接池 --> <bean id ...
- URAL 1934 Black Spot(最短路)
Black Spot Time limit: 1.0 secondMemory limit: 64 MB Bootstrap: Jones's terrible leviathan will find ...
- timus 1106 Two Teams(二部图)
Two Teams Time limit: 1.0 secondMemory limit: 64 MB The group of people consists of N members. Every ...
- Python文件格式化写入
[root@localhost test]# cat 1.py fd = open('format.txt','w') head = "%10s%10s%10s\n"%('id', ...
- Oracle学习系列3
Oracle学习系列3 ************************************************************************************ 多表查 ...