composite Two Layered Drawable
Composites two drawables, returning a drawable instance of LayerDrawable, with the top layer centered.
If any of the drawables is null, this method will return the other.
Parameters
the drawable to be on the bottom layer
the drawable to be on the top layer
Composites two drawables, returning a drawable instance of LayerDrawable, with the top layer centered to the bottom layer. The top layer will be scaled according to the provided desired width/height and the size of the bottom layer so the top layer can fit in the bottom layer and preserve its desired aspect ratio.
If any of the drawables is null, this method will return the other.
Parameters
the drawable to be on the bottom layer
the drawable to be on the top layer
top layer desired width in pixels, or INTRINSIC_SIZE to use the intrinsic width.
top layer desired height in pixels, or INTRINSIC_SIZE to use the intrinsic height.