I have a custom Seekbar that I have made using 9 patch images so I can have different aspects for the main progress, the secondary progress and the background.
As of now, this is the result I have:
And the code to generate it is:
<item
android:id="@android:id/secondaryProgress">
<clip>
<nine-patch android:src="@drawable/dw_sec_prog" android:dither="true"/>
</clip>
</item>
<item
android:id="@android:id/progress">
<clip>
<nine-patch android:src="@drawable/dw_prog" android:dither="true"/>
</clip>
</item>
<item
android:id="@android:id/background">
<nine-patch android:src="@drawable/dw_bg" android:dither="true"/>
</item>
The problem is that for the secondary progress (dw_sec_prog) I have a transparent background and the background (dw_bg) is being shown below it.
The desired result shall be something like this:
This result shall keep the background of the secondary progress transparent. I know that in the layer-list there is an option to write a layer mask (mentioned here) but that is not useful for me since I'm restricted to api 16 and this solution only works on 21.
Is there then a way to make that happen ?
EDIT: Small clarification