Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add icon to ProgressBar in Android

I am new to the Android animation, and I would like to implement a ProgressBar with an icon that its size increases and decreases through out the animation as shown in the pictures.

enter image description here

enter image description here

enter image description here

like image 950
Ghadeer Avatar asked Nov 28 '25 13:11

Ghadeer


1 Answers

SeekBar with Coin

Use SeekBar instead of ProgressBar. Thumb property in seekbar put your icon image after progress.

SeekBar XML property-- android:thumb="drawable"

 <SeekBar
            android:id="@+id/seek_bar"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_margin="10dp"
            android:max="100"
            android:thumb="@drawable/ic_pp" />
like image 183
sanjaymith Avatar answered Nov 30 '25 03:11

sanjaymith