style
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="progressbar_horizontal">
<item name="android:maxHeight">10.5dip</item>
<item name="android:indeterminateOnly">false</item>
<item name="android:indeterminateDrawable">@android:drawable/progress_indeterminate_horizontal</item>
<item name="android:progressDrawable">@drawable/progress_horizontal</item>
<item name="android:minHeight">10.5dip</item>
</style>
</resources>
progress_horizontal定义
<?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/progressbar_background">
<shape>
<corners android:radius="5.0dip" />
</shape>
</item>
<item android:id="@android:id/progress" android:drawable="@drawable/progressbar_foreground">
<clip>
<shape>
<corners android:radius="5.0dip" />
</shape>
</clip>
</item>
</layer-list>
在用到的xml中定义style即可