Circular progress bar in android which rotate in certain defined pattern

Viewed 42

I want to create a circular progress bar in android that should behave like a pendulum.

enter image description here

I have tried multiple libraries online like this https://github.com/lopspower/CircularProgressBar

but not able to achieve using this library. I tried using layer-list but looking for some decent way to achieve this behavior

                <com.mikhaellopez.circularprogressbar.CircularProgressBar
                android:id="@+id/circularProgressBar"
                android:layout_width="80dp"
                android:layout_height="80dp"
                android:layout_gravity="center"
                android:layout_margin="0dp"
                app:cpb_background_progressbar_color="#F8BB3B"
                app:cpb_background_progressbar_width="8dp"
                app:cpb_progress_direction="to_right"
                app:cpb_progressbar_color="#FFFFFF"
                app:cpb_progressbar_width="8dp"
                app:cpb_progress="25"
                app:cpb_round_border="true" />

            <com.mikhaellopez.circularprogressbar.CircularProgressBar
                android:id="@+id/circularProgressBar1"
                android:layout_width="50dp"
                android:layout_height="50dp"
                android:layout_gravity="center"
                android:layout_margin="0dp"
                app:cpb_background_progressbar_color="#F8BB3B"
                app:cpb_background_progressbar_width="5dp"
                app:cpb_progress_direction="to_right"
                app:cpb_progressbar_color="#FFFFFF"
                app:cpb_progressbar_width="5dp"
                app:cpb_progress="15"
                android:visibility="visible"
                android:layout_alignTop="@+id/circularProgressBar"
                app:cpb_round_border="true" />

in the above code, I am not able to get the pendulum behavior and also not able to put elements on top of others I tried both relative and linear layouts.

Any lead or hint would be very helpful

0 Answers
Related