Java – Android custom progress bar

Android custom progress bar… here is a solution to the problem.

Android custom progress bar

Is it possible to make a progress bar as shown below?

enter image description here

The asterisk must be filled as a percentage. Any help would be appreciated. Thank you.

Solution

enter image description here

There is a library to get the animation above.

Find it here

It is not complicated to use. All you have to do is add the following custom View to the 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"/> 

Then launch it like this :

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

Yes, you can use it instead of progressBar. All you have to do is overwrite its code according to your requirements.

Related Problems and Solutions