ListView修改快速滑动的滑块
1:如图

2: ListView加入快速滑动属性
<ListView
android:id="@+id/listView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fastScrollEnabled="true"
android:focusable="true"
android:overScrollMode="never"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
3:修改activity的主题
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="android:fastScrollThumbDrawable">@drawable/scroll_block</item>
</style>
4:如果是fragment则
4.1:
<style name="FragmentTheme1" parent="AppTheme">
<item name="fragment_color_title">@color/styleColor1</item>
<item name="android:fastScrollThumbDrawable">@drawable/scroll_block</item>
</style>
4.2:
ctxWithTheme = new ContextThemeWrapper(getActivity().getApplicationContext(), R.style.FragmentTheme1);
localLayoutInflater = inflater.cloneInContext(ctxWithTheme);
rootView = (ViewGroup) localLayoutInflater.inflate(R.layout.fragment_song, null, false);
ListView修改快速滑动的滑块的更多相关文章
- Fresco对Listview等快速滑动时停止加载
Fresco中在listview之类的快速滑动时停止加载,滑动停止后恢复加载: 1.设置图片请求是否开启 // 暂停图片请求 public static void imagePause() { Fre ...
- Android之ListView的快速滑动模式:fastScrollEnabled以及滑块的自定义
http://www.jcodecraeer.com/a/anzhuokaifa/androidkaifa/2014/0917/1690.html http://blog.csdn.net/xyang ...
- 使用Style自定义ListView快速滑动图标
一.显示ListView快速滑动块图标 设想这样一个场景,当ListView的内容有大于100页的情况下,如果想滑动到第80页,用手指滑动到指定位置,无疑是一件很费时的事情,如果想快速滑动到指定的位置 ...
- 为ListView组件加上快速滑块以及修改快速滑块图像
本文转载自:http://blog.csdn.net/ouyang_peng/article/details/46919723 作者:欧阳鹏 欢迎转载,与人分享是进步的源泉! 转载请保留原文地址:h ...
- 我的Android进阶之旅------>如何为ListView组件加上快速滑块以及修改快速滑块图像
使用布局文件需要将android:fastScrollEnabled="true" ,如下代码所示: <ListView android:id="@+id/list ...
- ListView、PullToRefreshListView滑动加载可见item
最近用的了PullToRefreshListView框架,也在listView中加载图片,对于滑动加载可见item,网上找了一些相关文档,但都不太合适,如:http://blog.csdn.net/z ...
- android 自定义adapter和线程结合 + ListView中按钮滑动后状态丢失解决办法
adapter+线程 1.很多时候自定义adapter的数据都是来源于服务器的,所以在获取服务器的时候就需要异步获取,这里就需要开线程了(线程池)去获取服务器的数据了.但这样有的时候adapter的中 ...
- Android 用HorizontalScrollView实现ListView的Item滑动删除 ,滑动错乱 冲突
用HorizontalScrollView实现类似微信的滑动删除 测试于:Android2.2+ 对于Android来说按键操作已经在减少,越来越多的手势操作层出不穷,今天介绍一款LIstView的I ...
- Android 高级UI设计笔记03:使用ListView实现左右滑动删除Item
1. 这里就是实现一个很简单的功能,使用ListView实现左右滑动删除Item: (1)当我们在ListView的某个Item,向左滑动显示一个删除按钮,用户点击按钮,即可以删除该项item,并且有 ...
随机推荐
- JAVA版CORBA程序
1.题目分析题目1.Java版CORBA程序1——HelloWorld编写实现显示“Hello,World!+班级+中文姓名”字符串.题目2.JAVA版CORBA程序2——Counter编写实现连加. ...
- 如何查看Linux的CPU负载
哪些工具可以查看 CPU 负载? 可以使用 top 命令.uptime 命令,特别是 top 命令,功能强大,不仅仅可以用来查看 CPU 负载. CPU 负载怎么理解?是不是 CPU 利用率? 要区别 ...
- BZOJ 4259: 残缺的字符串 FFT_多项式
Code: #include<bits/stdc++.h> #define maxn 1200000 using namespace std; void setIO(string s) { ...
- C#那20道题
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.T ...
- 09.正则表达式re-3.常用的匹配规则
模式 描述 \w 匹配字母.数字及下划线 \W 匹配不是字母.数字及下划线的字符 \s 匹配任意空白字符,等价于[\t\n\r\f] \S 匹配任意非空字符 \d 匹配任意数字,等价于[0-9] \D ...
- 42.query string分词
主要知识点: 1.queery string 分词 2.38节中搜索结果解析 3,测试分词器 一.query string分词 query string必须以和index建立时相同的analy ...
- (28)SpringBoot启动时的Banner设置【从零开始学Spring Boot】
对于使用过Spring Boot的开发者来说,程序启动的时候输出的由字符组成的Spring符号并不陌生.这个是Spring Boot为自己设计的Banner: 1. . ____ ...
- JVM常用参数(内存分配 内存回收日志)
内存监控 -verbose:gc 测试代码 public static void main(String[] args){ List<Classes> classes=new Array ...
- poj 1523 求割点把一个图分成几个联通部分
#include<stdio.h> #include<string.h> #define N 1100 struct node { int u,v,next; }bian[N* ...
- EXTJS之Ext.util.Observable自定义事件
暂时还不会用Ext.mixin.Observable, 催悲的测试了近两个小时.这TMD的语法差距也太大了啊.. 在新版EXTJS里,已去除了addEvents. 弄个出来,大概知道下吧. <! ...