You can stack multiple ProgressBar
in a row using LinearLayout
, or RelativeLayout
.
To put on the ProgressBar
on top of the ImageView
, put them in FrameLayout
, for example. To change the progress color to green, do this: Create a progress.xml
file with the following contents in the drawable
folder:
<?xml version="1.0" encoding="utf-8"?> <layer-list xmlns:android="http://schemas.android.com/apk/res/android" > <item android:id="@android:id/secondaryProgress"> <clip> <shape> <corners android:radius="5dip" /> <solid android:color="#ff0000" /> </shape> </clip> <color android:color="#f58233" /> </item> <item android:id="@android:id/progress"> <clip> <shape> <corners android:radius="5dip" /> <solid android:color="#00ff00" /> </shape> </clip> <color android:color="#f58233" /> </item> </layer-list>
And in the ProgressBar
set the attribute:
android:progressDrawable="@drawable/progress"