i created the custom seek bar layout from this , now i am getting error like this in the xml file
Failed to parse file C:\Documents and Settings\jkreddy\Desktop\RAJA\programs\
Light\res\drawable\seekbar_progress.xml
this is the xml code
<SeekBar
android:id="@+id/frequency_slider"
android:layout_marginLeft="10px"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:max="9"
android:progress="0"
android:secondaryProgress="0"
android:progressDrawable="@drawable/seekbar_progress"
android:thumb="@drawable/seek_thumb"/>
code for seekbar_progress_bg
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<clip>
<shape>
<gradient
android:startColor="#FF5e8ea3"
android:centerColor="#FF32a0d2"
android:centerY="0.1"
android:endColor="#FF13729e"
android:angle="270"/>
</shape>
</clip>
</item>
<item>
<clip>
<bitmap xmlns:android="http://schemas.android.com/apk/res/andr开发者_如何学Coid"
android:src="@drawable/colorbar"
android:tileMode="repeat"
android:antialias="true"
android:dither="false"
android:filter="false"
android:gravity="left"/>
</clip>
</item>
code for seekbar_progress
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@android:id/background">
<nine-patch
xmlns:android="http://schemas.android.com/apk/res/android"
android:src="@drawable/colorbar_e"
android:dither="true"/>
</item>
<item android:id="@android:id/secondaryProgress">
<clip>
<shape>
<gradient
android:startColor="#80028ac8"
android:centerColor="#80127fb1"
android:centerY="0.75"
android:endColor="#a004638f"
android:angle="270"/>
</shape>
</clip>
</item>
<item
android:id="@android:id/progress"
android:drawable="@drawable/seekbar_progress_bg"/>
This is another form for creation of Custom SeekBar
<SeekBar
android:id="@+id/frequency_slider"
android:layout_marginLeft="15px"
android:layout_width="200px"
android:layout_height="wrap_content"
android:max="9"
android:thumbOffset="0px"
android:progress="0"
android:progressDrawable="@drawable/progress"
android:thumb="@drawable/thumb"/>
progress.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/slider" />
<item android:id="@android:id/progress">
<clip android:drawable="@drawable/colorbar" />
</item>
</layer-list>
thumb.xml
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/seek_thumb" />
</selector>
精彩评论