0

I want to make custom progress bar with my own image. I don't know how to make such progress bar.

Is there any one having knowledge about the custom progress bar ?

Custom progress bar means custom primary and secondary progress bar.

Please help me.

M D
  • 47,665
  • 9
  • 93
  • 114
Ambitious Person
  • 295
  • 1
  • 3
  • 15

1 Answers1

2

Yes this is possible, you can create progress.xml drawable like this

<?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/circular_background" />
    <item android:id="@+android:id/secondaryProgress"
android:drawable="@drawable/circular_background" />
    <item android:id="@+android:id/progress"
android:drawable="@drawable/circular_progress" />
</layer-list>

And set this progress.xml to Progressbar using following attribute

 android:progressDrawable="@drawable/progress" 

And create circular_background and circular_progress as per your requirement

Prashant Bhoir
  • 900
  • 6
  • 8