I have one ImageView
with background as an image. I want to draw a ribbon on top of the image to describe it. I have tried the following code, but the triangle shape is of black color. So it cannot be applied to a view with background image.
<item>
<shape android:shape="rectangle">
<size
android:width="100dp"
android:height="40dp"/>
<solid android:color="@android:color/holo_orange_dark"/>
<corners android:radius="6dp"/>
</shape>
</item>
<item
android:top="-26dp"
android:bottom="31dp"
android:left="-90dp"
android:right="75dp">
<rotate
android:fromDegrees="45">
<shape android:shape="rectangle">
<solid android:color="@android:color/black"/>
</shape>
</rotate>
</item>
Setting the triangle color as transparent is also not working. I want to mask the triangle out of the rectangle like this: