Custom progressbar for android

android, android-progressbar, canvas, java

Solution

There is a library to get this above animation.

Find it here.

It's not complicated to use. all you have to do is add the following custom view in layout

<com.romainpiel.titanic.TitanicTextView
    android:id="@+id/titanic_tv"
    android:text="@string/loading"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:textColor="#212121"
    android:textSize="70sp"/> 

and then start it like:

titanic = new Titanic();
titanic.start(myTitanicTextView);

Yes, you can use it instead of progressBar. All you have to do is override it's code according to your requirements.

Problem

Is it possible to make progress bar like following image. Star have to be filled up by giving percentage. Any help will be highly appreciable. Thanks.

Original source