Hey,
I just wrote a horizontal progress bar. The progressbar gets this background resource:
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@android:id/background">
<inset xmlns:android="http://schemas.android.com/apk/res/android"
android:drawable="@drawable/progress_bg" />
</item>
<item android:id="@android:id/progress" android:gravity="center">
<clip>
<shape>
<corners android:radius="5dip" />
<solid android:color="#FFF" />
</shape>
</clip>
</item>
This works fine, but the white progress has the same height as the background. But I want the progress to be smaller than the background of the progress bar, since thre background has a boarder that should not overlap.
Any ideas?
Thanks
http://developer.android.com/guide/topics/resources/drawable-resource.html#LayerList
You can try adding
android:top,android:left,android:right, andandroid:bottomto the white progress baritemin order to add padding to the bar.