Android自定义ListView Scrollbar样式
2016-03-31 17:45
197 查看
转自:http://blog.csdn.net/airy_t/article/details/7646958
listview的scrollbar自定义样式,感谢原作者的分享。(如有冒犯,请通知我立即删除。)
android:scrollbarTrackVertical="@drawable/scrollbar_vertical_track" //滚动条背景
android:scrollbarThumbVertical="@drawable/scrollbar_vertical_thumb" //滚动条
[b]scrollbar_vertical_track.xml[/b]
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<gradient android:startColor="#3333FF" android:endColor="#8080FF"
android:angle="0"/>
<corners android:radius="6dp" />
</shape>
scrollbar_vertical_thumb.xml
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<gradient android:startColor="#505050" android:endColor="#C0C0C0"
android:angle="0"/>
<corners android:radius="0dp" />
</shape>
listview scrollbar一直显示方法:
android:scrollbarFadeDuration="0"
listview的scrollbar自定义样式,感谢原作者的分享。(如有冒犯,请通知我立即删除。)
android:scrollbarTrackVertical="@drawable/scrollbar_vertical_track" //滚动条背景
android:scrollbarThumbVertical="@drawable/scrollbar_vertical_thumb" //滚动条
[b]scrollbar_vertical_track.xml[/b]
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<gradient android:startColor="#3333FF" android:endColor="#8080FF"
android:angle="0"/>
<corners android:radius="6dp" />
</shape>
scrollbar_vertical_thumb.xml
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<gradient android:startColor="#505050" android:endColor="#C0C0C0"
android:angle="0"/>
<corners android:radius="0dp" />
</shape>
listview scrollbar一直显示方法:
android:scrollbarFadeDuration="0"
相关文章推荐
- android: 调用摄像头拍照
- Android中内容观察者的使用---- ContentObserver类详解
- android: 将程序运行到手机上
- android: 接收和发送短信
- Android App中实现简单的刮刮卡抽奖效果的实例详解
- Android 快速开发框架之——AndroidFine
- MAC上添加ADB环境变量
- Android设置透明、半透明等效果
- android adb端口被占用解决方案
- android launchmode 使用场景
- android: 使用通知
- 深入理解Android之Gradle
- Android Glide Google 推荐加载图片框架(加载图片详解篇)
- 关于Android使用 share绘制虚线却在手机上显示实线问题
- Android蓝牙开发详解
- Android AlarmManager实现不间断轮询服务
- Android中制作进度框和环形进度条的简单实例分享
- Android双进程守护
- Android中横竖屏切换时,onConfigurationChanged方法不被调用
- [置顶] Android Studio 运行、编译卡死的解决办法