How to make a circular progresbar with progress status in android?

I want to show a progress indicator, as shown below, together with the status of progress, can any body give me a solution for this

+4
source share
1 answer

Hi, I saw an example in

https://github.com/passsy/android-HoloCircularProgressBar

This will help you solve your problem.

Add a view to your layout and use it accordingly (full example code and resources are available at this link, please download and use the following)

<de.passsy.holocircularprogressbar.HoloCircularProgressBar
    android:id="@+id/holoCircularProgressBar1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"/>

and use it as follows in your java code

HoloCircularProgressBar mHoloCircularProgressBar = (HoloCircularProgressBar) findViewById(R.id.holoCircularProgressBar1);

another good example is also available in

https://github.com/ylyc/circular_progress_bar

in this example

xml .

<com.lylc.widget.circularprogressbar.example.CircularProgressBar
    android:id="@+id/circularprogressbar1"
    style="@style/Widget.ProgressBar.Holo.CircularProgressBar"
    android:layout_width="120dip"
    android:layout_height="120dip"
    android:layout_marginTop="10dip"
    circular:subtitle="subtitle"
    circular:title="Title" />

: Widget.ProgressBar.Holo.CircularProgressBar, Widget.ProgressBar.CircularProgressBar styles.xml

<style name="Widget.ProgressBar.CircularProgressBar" parent="Widget">
    ...
</style>

<style name="Widget.ProgressBar.Holo.CircularProgressBar" parent="Widget.ProgressBar.CircularProgressBar">
    ...
</style>

, .

CircularProgressBar c3 = (CircularProgressBar) findViewById(R.id.circularprogressbar3);
c3.setTitle("June");
c3.setSubTitle("2013");
c3.setProgress(42);
+4

Source: https://habr.com/ru/post/1533504/


All Articles