SeekBar通过xml设置背景颜色

<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
    <item 
        
        android:id="@android:id/secondaryProgress">
        <shape >
            <solid 
                android:color="@color/gray"
                />
        </shape>
    </item>
    
    <item 
        
        android:id="@android:id/progress">
        <clip >
        <shape
            >
           <solid 
                android:color="@color/yellow"
                />
        </shape>
        </clip>
    </item> 

</layer-list>

  android:progressDrawable="@drawable/seekbar_color_style"

posted @ 2015-07-26 00:46  Achilles_Snow  阅读(591)  评论(0编辑  收藏  举报