android:scrollbar的一些属性
- <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
- android:layout_width="fill_parent"
- android:layout_height="fill_parent"
- android:orientation="vertical" >
- <ScrollView
- android:id="@+id/view1"
- android:layout_width="100dip"
- android:layout_height="120dip"
- android:background="@android:color/white"
- android:padding="8dip"
- android:scrollbarStyle="insideOverlay" >
- <TextView
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:background="@android:color/darker_gray"
- android:text="scroll_text scroll_text scroll_text scroll_text scroll_text scroll_text scroll_text"
- android:textColor="#ffffff" />
- </ScrollView>
- <ScrollView
- android:id="@+id/view2"
- android:layout_width="100dip"
- android:layout_height="120dip"
- android:background="@android:color/white"
- android:padding="8dip"
- android:scrollbarStyle="insideInset" >
- <TextView
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:background="@android:color/darker_gray"
- android:text="scroll_text scroll_text scroll_text scroll_text scroll_text scroll_text scroll_text"
- android:textColor="#ffffff" />
- </ScrollView>
- <ScrollView
- android:id="@+id/view3"
- android:layout_width="100dip"
- android:layout_height="120dip"
- android:background="@android:color/white"
- android:padding="8dip"
- android:scrollbarStyle="outsideOverlay" >
- <TextView
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:background="@android:color/darker_gray"
- android:text="scroll_text scroll_text scroll_text scroll_text scroll_text scroll_text scroll_text"
- android:textColor="#ffffff" />
- </ScrollView>
- <ScrollView
- android:id="@+id/view4"
- android:layout_width="100dip"
- android:layout_height="120dip"
- android:background="@android:color/white"
- android:padding="8dip"
- android:scrollbarStyle="outsideInset" >
- <TextView
- android:layout_width="fill_parent"
- android:layout_height="wrap_content"
- android:background="@android:color/darker_gray"
- android:text="scroll_text scroll_text scroll_text scroll_text scroll_text scroll_text scroll_text"
- android:textColor="#ffffff" />
- </ScrollView>
- </LinearLayout>
2. 运行结果截图:insideInset、insideOverlay、outsideInset、outsideOverlay分别对应下图左边解释!
其中inside和outside分别表示是否在view的padding区域内,overlay和inset表示覆盖在view上或是插在view后面,所以四种值分别表示:
insideOverlay:默认值,表示在padding区域内并且覆盖在view上
insideInset:表示在padding区域内并且插入在view后面
outsideOverlay:表示在padding区域外并且覆盖在view上
outsideInset:表示在padding区域外并且插入在view后面
android:scrollbars="vertical"
android:fadeScrollbars="true" //true scrollbar不滚动隐藏
android:scrollbarThumbVertical="@drawable/scrollbar" //自定义scrollbar
android:scrollbarTrackHorizontal="@drawable/scrollbar_bg" //自定义scrollbar背景
android:scrollbarStyle="outsideInset" //scrollbar风格
android:scrollbar的一些属性的更多相关文章
- Android -----listView的重要属性
android:transcriptMode="alwaysScroll" android:cacheColorHint="#00000000" android ...
- android中xml tools属性详解
第一部分 安卓开发中,在写布局代码的时候,ide可以看到布局的预览效果. 但是有些效果则必须在运行之后才能看见,比如这种情况:TextView在xml中没有设置任何字符,而是在activity中设置了 ...
- Android读取自定义View属性
Android读取自定义View属性 attrs.xml : <?xml version="1.0" encoding="utf-8"?> < ...
- android中xmlns:tools属性详解
今天读到一篇总结的非常棒的文章,写的逻辑很清晰也很实用,很少见到如此棒的文章了.就原文转发过来,我把格式给整理了一下,分享给园子里的各位朋友!好久没写博客了,就为2015年的11月留份纪念吧.希望对你 ...
- Mono for Android布局控件属性小结
1. layout_weight 用于给一个线性布局中的诸多视图的重要度赋值. 所有的视图都有一个layout_weight值,默认为零,意思是需要显示 多大的视图就占据多大的屏幕空 间.若赋一个高于 ...
- 【Android】使用persist属性来调用脚本文件
Android系统中有许多属性,属性由两个部分组成:name & value,可以使用这些属性来记录系统设置或进程之间的信息交换.Android系统在启动过程时会按序从以下几个文件中加载系统属 ...
- Android开发之EditText属性详解
1.EditText输入的文字为密码形式的设置 (1)通过.xml里设置: 把该EditText设为:android:password="true" // 以”.”形式显示文本 ( ...
- android控件的属性
android控件的属性 本节描述android空间的位置,内容等相关属性及属性的含义 第一类:属性值为true或false android:layout_centerHrizontal 水平居中 ( ...
- 【转】 Android开发之EditText属性详解
原文网址:http://blog.csdn.net/qq435757399/article/details/7947862 1.EditText输入的文字为密码形式的设置 (1)通过.xml里设置: ...
随机推荐
- BestCoder 2nd Anniversary/HDU 5719 姿势
Arrange Accepts: 221 Submissions: 1401 Time Limit: 8000/4000 MS (Java/Others) Memory Limit: 262144/2 ...
- 【转】 #define用法详解
#define用法详解 1.#define 的作用 在C或C++语言源程序中允许用一个标识符来表示一个字符串,称为“宏”.被定义为“宏”的标识符称为“宏名”.在编译预处理时,对程序中所有出现的“宏 ...
- 存储过程代码生成器Stored Procedure Generator
原文发布时间为:2010-10-26 -- 来源于本人的百度文章 [由搬家工具导入] Stored Procedure Generator (for SQL Server 2000/2005) htt ...
- linux下的用户组管理
用户组管理分两类 如果赋给组什么权限,那么组员就会有什么权限 1.私有组 在创建新用户的时候,就要为用户指定组.如果没有指定,就会默认创建一个与用户名相同的用户组,这个用户组只有该用户一个用户,就被称 ...
- linux下的用户管理(二)
创建帐号: 手工创建-> 1.在/etc/passwd中添加一条记录 2.创建用户主目录 3.在用户的家目录下设置默认的配置文件 4.设置用户初始口令 命令创建-> useradd或add ...
- [LeetCode] Search in Rotated Sorted Array II 二分搜索
Follow up for "Search in Rotated Sorted Array":What if duplicates are allowed? Would this ...
- Spring Boot学习——统一异常处理
本随笔记录使用Spring Boot统一处理异常. 本文实例是从数据库中根据ID查询学生信息,要求学生的年龄在14——20岁之间.小于14岁,提示“你可能在上初中”:大于20岁,提示“呢可能在上大学” ...
- C#原生加密方法: System.Security.Cryptography.CryptoStream DataSet加密解密
采用16位密钥形式加密,把数据 dataset或文本转换为二进制流,然后进行加密解密.代码如下: using System; using System.Collections.Generic; usi ...
- Cryptography I 学习笔记 --- 信息完整性
1. ECBC-MAC,需要一对密钥k与k1,然后将明文分组,用cbc模式对明文分块加密,将最后的密文块再用k1进行加密,即可得到结果 2. NMAC,需要一对密钥k与k1,然后将明文分组,用k加密第 ...
- HDU 6225.Little Boxes-大数加法 (2017ACM/ICPC亚洲区沈阳站-重现赛(感谢东北大学))
整理代码... Little Boxes Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/O ...