FastScroll(1)ListView打开FastScroll及自定义它的样式
打开 FastScroll 方式
android:fastScrollEnabled="true" 它是AbsListView的属性。
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" > <ListView
android:id="@+id/list_default_fs"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fastScrollAlwaysVisible="true"
android:fastScrollEnabled="true"
> </ListView> </LinearLayout>
默认样式

自定义样式
自定义要重写主题中的下面几个属性,然后使用这个主题。
<style name="CustomFastScrollTheme" parent="AppBaseTheme">
<!-- api21 -->
<!-- <item name="android:fastScrollStyle">@style/CustomFastScrollTheme</item> --> <item name="android:fastScrollThumbDrawable">@drawable/fastscroll_thumb_aje</item>
<item name="android:fastScrollOverlayPosition">atThumb</item>
<item name="android:fastScrollTextColor">#DA4A38</item>
<!-- <item name="android:fastScrollTrackDrawable">@drawable/us</item> -->
<item name="android:fastScrollPreviewBackgroundRight">@drawable/fastscroll_preview_right</item>
</style>
效果如下

其中:
| android:fastScrollThumbDrawable | 图中数字 2,手指按住时显示的图片 |
| android:fastScrollOverlayPosition | 分组提示的位置 |
| android:fastScrollTextColor | 分组提示的文字的颜色 |
| android:fastScrollTrackDrawable | 图中数字1,FastScroll的滑动轨道 |
| android:fastScrollPreviewBackgroundRight | 图中数字3,分组提示的背景图片 |
上图是一张显示分组的示例,如不分组,可只重写 android:fastScrollThumbDrawable
FastScroll(1)ListView打开FastScroll及自定义它的样式的更多相关文章
- FastScroll(2)不分组的listview 打开fastscroll的分组提示功能
本文只让fastscroll具有提示分组功能,但listview并不显示分组,如果想让分组的listview显示fastscroll,看下篇. 1,在listview中打开fastscroll 2,自 ...
- FastScroll(3)分组的listview 打开fastscroll的分组提示功能
1,让ListView显示分组(用两个layout) 2,让ListView实现sectionIndexer接口 3,代码如下: import java.util.ArrayList; import ...
- Android 自定义RadioButton的样式
Android 自定义RadioButton的样式 我们知道Android控件里的button,listview可以用xml的样式自定义成自己希望的漂亮样式. 最近用到RadioButton,利用xm ...
- ActionBar官方教程(11)自定义ActionBar的样式(含重要的样式属性表及练习示例)
Styling the Action Bar If you want to implement a visual design that represents your app's brand, th ...
- WPF界面设计技巧(4)—自定义列表项样式
原文:WPF界面设计技巧(4)-自定义列表项样式 有前面修改按钮样式的基础,我们可以尝试来定制一个即好看又好用的 ListBox ,今天先来讲“好看”部分. 打开 Microsoft Visual S ...
- [Swift通天遁地]九、拔剑吧-(3)创建多种自定义Segment分段样式的控件
★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★➤微信公众号:山青咏芝(shanqingyongzhi)➤博客园地址:山青咏芝(https://www.cnblogs. ...
- jQuery Validate 表单验证插件----自定义校验结果样式
一.下载依赖包 网盘下载:https://yunpan.cn/cryvgGGAQ3DSW 访问密码 f224 二.引入依赖包 <script src="../../scripts/j ...
- 自定义input file样式
自定义input file样式:一般都是通过隐藏input,通过定义label来实现.这种做法要注意的是label的for属性要指定input对应的id; <!DOCTYPE html> ...
- css Cursor:url()自定义鼠标指针样式为图片
css自定义鼠标指针样式为图片Cursor:url()的使用,今天在项目中,要用到自定义鼠标样式,格式: css:{cursor:url('绝对路径的图片(格式:cur,ico)'),-moz-zoo ...
随机推荐
- 把div固定在网页顶部
很多网站都有把某一块固定在顶部的功能,今天上网搜搜然后自己又写了一遍,贴出来给大家看看,哪天用到的时候自己也可以随时看看 <!DOCTYPE html PUBLIC "-//W3C// ...
- PHPStorm 2016.2 - 2016.3许可证服务器
最快,最安全的选择,以激活您的PHPStorm 2016.2 - 2016.3,这是足够的激活服务器,软件将自动激活.该过程将不断更新,如果不工作评价写入,如果有,以激活没有列出的服务器也可以说. 通 ...
- asp.net get server control id from javascript
var WhateverValue = document.getElementById('<%= saveValue.ClientID %>').value
- Linux编程学习笔记 -- Process
进程是一个程序的运行. 在一个程序中执行另一个执程序的方法有两种: 1)system 在shell中执行程序 2)fork + exec 复制一个进程,在进程中用新的程序替换原有的程序 for ...
- EditorLineEnds.ttr 受影响的D版本 Delphi 8-2010
http://stackoverflow.com/questions/25295980/delphi-2006-2010-error-cannot-create-file-c-users-admin- ...
- 2014年辛星完全解读Javascript第八节 json
json是JavaScript Object Notation的简写,它是一种轻量级的数据交换格式,而且表达上很容易靠字面去理解.json是用于存储和传输数据的格式,通常用于向服务器端传递数据. ** ...
- 微软职位内部推荐-Senior Network Engineer
微软近期Open的职位: Global Foundation Services is the team behind the cloud. GFS is responsible for deliver ...
- C# Windows - ListView
ListView控件的属性 属性 说明 Activation 控制用户在列表视图中激活选项的方式Standard - 用户为自己的计算机选择的值OneClick – 单击一个选项,激活它TwoClic ...
- iOS 网络编程
iOS 开发中所需的数据基本都是来自网络,网络数据请求是 iOS 编程中必不可少的,应该熟练掌握网络请求. 网络请求方式有 :GET , POST , PUT ,DELETE 等,其中常用的就是 GE ...
- Delphi XE5 android 蓝牙通讯传输
不多讲,直接上代码了. 代码来自网络 http://files.cnblogs.com/nywh2008/Bluetooth_LEDs_android.rar