2

I am trying to create a progress bar using default progress bar given in android , I achieved 80% of that required design but i cannot find a code to finish the required design.

this is a required design

given design i need to bring the rounded part [highlighted in blue ] in my progress bar

finished design

xml code

                        <ProgressBar
                            android:id="@+id/ww_progress_bar"
                            android:visibility="visible"
                            style="?android:attr/progressBarStyleHorizontal"
                            android:layout_width="match_parent"
                            android:layout_height="match_parent"
                            android:background="@drawable/circular_shape"
                            android:progressDrawable="@drawable/circular_progress_bar"
                            android:textAlignment="center" />

KT class

        binding.wwProgressBar.visibility = VISIBLE
        binding.wwProgressBar.setProgress(40)
        binding.wwProgressBar.max = progressMax

is it possible to bring the required design? can anyone help to finish this design?

2 Answers2

0

you need to use seek bar for it

use custom thumb for it

or

for easy implementation

you can use gihub library

https://github.com/tankery/CircularSeekBar

Praveen Singh
  • 53
  • 1
  • 6
0

you should set thumb in your ProgressBar

android:thumb="@drawable/thumb_seekbar"

you can use this link for more information

Pouria Hemi
  • 706
  • 5
  • 15
  • 30