I have a progress bar that should look like an attached image: 
And I have come a long way. I'm very close, the only part that doesn't work is the rounded corners for progressDrawable. Here's what mine looks like. (Note, it is circled in red that the fill inside the white outline has no rounded corners): 
So, I found several ways to make this work when the progress bar is painted in shape, gradient or color. BUT, I cannot get this with the image as progressDrawable.
Here is my class that extends ProgressBar
public class RoundedProgressBar extends ProgressBar{ private Paint paint; public RoundedProgressBar(Context context) { super(context); setup(); } public RoundedProgressBar(Context context, AttributeSet attrs) { super(context, attrs); setup(); } public RoundedProgressBar(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); setup(); ; } protected void setup() { paint = new Paint(); } @Override protected synchronized void onDraw(Canvas canvas) {
Here is my selector:
<layer-list xmlns:android="http://schemas.android.com/apk/res/android" > <item android:id="@android:id/background" android:drawable="@drawable/slider_track" /> <item android:id="@android:id/secondaryProgress" android:drawable="@drawable/slider_track" /> <item android:id="@android:id/progress" android:drawable="@drawable/slider_track_progress" /> </layer-list>
Here are the images used in the selector:
slider_track β 
slider_track_progress β 
This is where I embed my progress in the layout for my activity.
<com.android.component.RoundedProgressBar android:id="@+id/player_hp_bar" android:layout_width="fill_parent" android:layout_height="36dip" android:layout_marginLeft="30dip" android:layout_marginRight="30dip" android:max="100" style="?android:attr/progressBarStyleHorizontal" android:progressDrawable="@drawable/slider_layer_list" android:progress="20" android:maxHeight="12dip" android:minHeight="12dip" />
Does anyone know how to make this work?
android layout progress-bar skinning rounded-corners
b-ryce
source share