-1

I want to show a circle being drawn in android gradually like this:

enter image description here

How should i start? What needs to be done?

user5949689
  • 101
  • 2
  • 8

1 Answers1

0
 ProgressBar p
 p=(PregressBar)findViewById(R.id.p);
 ObjectAnimator animation = ObjectAnimator.ofInt (p, "progress", 0, 100);
    animation.setDuration (3000); 
    animation.setInterpolator (new DecelerateInterpolator ());
    animation.start ();`

Then in xml

  <ProgressBar
android:id="@+id/p"
style="?android:attr/progressBarStyleHorizontal"
android:layout_width="@dimen/progreess_circle"
android:layout_height="@dimen/progreess_circle"
android:layout_gravity="center"
android:rotation="270"
android:progress="0"
android:drawingCacheQuality="low"
android:progressDrawable="@drawable/circular" />

Circular.xml

<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" 
android:innerRadiusRatio="2.3"
android:shape="ring"
android:thickness="10sp" >
<solid android:color="@color/yellow_text_color" />