Skip to content

Instantly share code, notes, and snippets.

@jiemachina
Created September 17, 2012 03:15
Show Gist options
  • Save jiemachina/3735372 to your computer and use it in GitHub Desktop.
Save jiemachina/3735372 to your computer and use it in GitHub Desktop.
android 自定义progressBar
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:id="@android:id/background">
<shape>
<corners android:radius="0dip" />
<gradient
android:angle="270"
android:centerColor="#ff5a5d5a"
android:centerY="0.75"
android:endColor="#ff747674"
android:startColor="#ff9d9e9d" />
</shape>
</item>
<item android:id="@android:id/secondaryProgress">
<clip>
<shape>
<corners android:radius="0dip" />
<gradient
android:angle="270"
android:centerColor="#80ffb600"
android:centerY="0.75"
android:endColor="#a0ffcb00"
android:startColor="#80ffd300" />
</shape>
</clip>
</item>
<item android:id="@android:id/progress">
<clip>
<shape>
<corners android:radius="0dip" />
<gradient
android:angle="90"
android:centerColor="#ff66cccc"
android:centerY="0.75"
android:endColor="#ff66cccc"
android:startColor="#ff66cccc" />
</shape>
</clip>
</item>
</layer-list>
@jiemachina
Copy link
Author

使用色值来来自定义progressBar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment