Skip to content

Instantly share code, notes, and snippets.

@Orange168
Last active July 20, 2016 13:24
Show Gist options
  • Save Orange168/689acaec44369a3e0fca7e0f58fa09fa to your computer and use it in GitHub Desktop.
Save Orange168/689acaec44369a3e0fca7e0f58fa09fa to your computer and use it in GitHub Desktop.
style progress
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Define the background properties like color etc -->
<item android:id="@android:id/background">
<shape android:shape="line">
<stroke android:width="3dp" android:color="@color/white" />
</shape>
</item>
<item android:id="@android:id/secondaryProgress">
<clip>
<shape android:shape="line">
<stroke android:width="3dp" android:color="#777" />
</shape>
</clip>
</item>
<!-- Define the progress properties like start color, end color etc -->
<item android:id="@android:id/progress">
<clip>
<shape android:shape="line">
<stroke android:width="3dp" android:color="#FF0000" />
</shape>
</clip>
</item>
</layer-list>
<ProgressBar
android:id="@+id/progressBar"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="match_parent"
android:layout_height="4dp"
android:max="100"
android:progress="20"
android:secondaryProgress="75"
android:progressDrawable="@drawable/custom_progressbar" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment