seekBar背景:
<span style="font-family:Comic Sans MS;font-size:14px;"><?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:paddingBottom="3px"
android:paddingTop="3px">
<shape>
<!-- 角度 -->
<corners android:radius="10dip" />
<!-- 边框 -->
<stroke
android:width="0.5dp"
android:color="#7c7d7c" />
<!-- 填充颜色渐变 -->
<gradient
android:angle="270"
android:centerColor="#00dddedf"
android:centerY="0.45"
android:endColor="#00dddedf"
android:startColor="#00dddedf" />
</shape>
</item>
<!-- 进度 -->
<item
android:id="@android:id/progress"
android:paddingBottom="3px"
android:paddingTop="3px">
<clip>
<shape>
<stroke
android:width="0.5dp"
android:color="#7c7d7c" />
<corners android:radius="10dip" />
<gradient
android:angle="270"
android:centerColor="#e7e8ed"
android:centerY="0.45"
android:endColor="#f3f5f7"
android:startColor="#dbdfe4" />
</shape>
</clip>
</item>
</layer-list>
</span>
滑块样式:
<span style="font-family:Comic Sans MS;font-size:14px;"><?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<!-- 按下状态 -->
<item android:state_pressed="true" android:drawable="@drawable/thumb_select" />
<!-- 普通无焦点状态 -->
<item android:state_focused="false" android:state_pressed="false"
android:drawable="@drawable/thumb_bg" />
</selector></span>
seekBar属性:
<span style="font-family:Comic Sans MS;font-size:14px;"><SeekBar
android:id="@+id/seekBar1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:max="9"
android:maxWidth="300dp"
android:minWidth="300dp"
android:maxHeight="20dp"
android:minHeight="20dp"
android:paddingLeft="4dp"
android:paddingRight="4dp"
android:progressDrawable="@drawable/seekbar_define_color_style"
android:thumb="@drawable/thumb_background" /></span>