Skip to content

Instantly share code, notes, and snippets.

@lethargicpanda
Created October 17, 2011 17:00
Show Gist options
  • Save lethargicpanda/1293082 to your computer and use it in GitHub Desktop.
Save lethargicpanda/1293082 to your computer and use it in GitHub Desktop.
Change progress bar's progress color in Android
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@android:id/background">
<shape>
<corners android:radius="5dip" />
<gradient
android:startColor="#ff9d9e9d"
android:centerColor="#ff5a5d5a"
android:centerY="0.75"
android:endColor="#ff747674"
android:angle="270"
/>
</shape>
</item>
<item android:id="@android:id/secondaryProgress">
<clip>
<shape>
<corners android:radius="5dip" />
<gradient
android:startColor="#80ffd300"
android:centerColor="#80ffb600"
android:centerY="0.75"
android:endColor="#a0ffcb00"
android:angle="270"
/>
</shape>
</clip>
</item>
<item
android:id="@android:id/progress"
>
<clip>
<shape>
<corners
android:radius="5dip" />
<gradient
android:startColor="@color/progress_start"
android:endColor="@color/progress_end"
android:angle="270" />
</shape>
</clip>
</item>
</layer-list>
@TheKurdishProgrammer
Copy link

how you can change the color of the item with id progress?

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