自定义seekbar
来源:互联网 发布:5230软件下载 编辑:程序博客网 时间:2024/05/19 09:13
1.引用style
<SeekBar android:id="@+id/sb_angular" style="@style/jrt_seekbar_style" android:layout_width="match_parent" android:layout_height="wrap_content" />
2.在style.xml里添加
<style name="jrt_seekbar_style" parent="Base.Widget.AppCompat.SeekBar"> <item name="android:progressDrawable">@drawable/slamapp_seekbar_style</item> <item name="android:thumb">@drawable/seekbar_thumb</item></style>3.重写slamapp_seekbar_style.xml<?xml version="1.0" encoding="utf-8"?><layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <item android:id="@android:id/background" android:drawable="@drawable/seekbar_bg" /> <item android:id="@android:id/secondaryProgress"> <scale android:scaleWidth="100%"> <selector> <item android:state_enabled="false"> <color android:color="@android:color/transparent" /> </item> <item android:drawable="@drawable/seekbar_progress_2" /> </selector> </scale> </item> <item android:id="@android:id/progress"> <scale android:scaleWidth="100%"> <selector> <item android:state_enabled="false"> <color android:color="@android:color/transparent" /> </item> <item android:drawable="@drawable/seekbar_progress" /> </selector> </scale> </item></layer-list>seekbar_thumb.xml<?xml version="1.0" encoding="utf-8"?><shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval"> <size android:width="35dp" android:height="35dp" /> <solid android:color="#FFFFFF" /> <stroke android:width="0.5dp" android:color="@color/gray" /></shape>
阅读全文
0 0
- SeekBar自定义
- SeekBar自定义
- 自定义seekbar
- 自定义seekbar
- 自定义Seekbar
- 自定义seekbar
- 自定义Seekbar
- 自定义seekbar
- 自定义SeekBar
- 自定义seekbar
- 自定义SeekBar
- 自定义seekbar
- 自定义SeekBar
- 自定义seekBar
- seekbar自定义
- 自定义SeekBar
- 自定义seekbar
- SeekBar 的自定义样式
- 【Codeforces241B】Friends
- DataBinding的基本使用
- HTML5:学习(6)Bootstrap框架
- 数据算法-hadoop2 二次排序
- Cmder中文显示不正常解决办法
- 自定义seekbar
- spring 定时器配置
- IOS11更新教程大分享(附带降级教程)
- (二) Spring项目的搭建
- spring配置文件详解
- 数字图像处理成长之路14:QT调用摄像头
- JS基础—模拟手机短信发送
- 3.数据集合(Swift)
- 解决TextView中MaxLines与ellipsize=end冲突问题