I don't think you need a 9-patch here. Just change dynamically the width of your fill bar (I'm guessing that's the bright red one), and set the proper scaleType
.-
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/bar_dark" />
<ImageView
android:layout_width="200dp"
android:layout_height="wrap_content"
android:scaleType="matrix"
android:src="@drawable/bar_light" />
</RelativeLayout>

For a ProgressBar
component, this post could help.-
Android ProgressBar UI custom layout