How to create this shape programmatically?
I've created a library which can help to create drawables programmatically.
See here: DrawableToolbox.
With DrawableToolbox
, you can create it by:
Drawable drawable = new DrawableBuilder()
.rectangle()
.solidColor(0xffe67e22)
.bottomLeftRadius(20) // in pixels
.bottomRightRadius(20) // in pixels
// .cornerRadii(0, 0, 20, 20) // the same as the two lines above
.build();