Ghadeer
Ghadeer

Reputation: 638

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

Upvotes: 3

Views: 2782

Answers (1)

sanjaymith
sanjaymith

Reputation: 216

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" />

Upvotes: 4

Related Questions