mainComponent Will Be Your CardView
[Make Sure Elevation Of This Main CardView Is Set To 0]
childComponent Will Be Your Ribbon Image
In gravity Set Numbers From 0 To 8.
This Number Will Set Where Your Image Will Overlap On The Main CardView.
In margins Set A List Of 4 Items, Each Item Will Be A Number, From 0 To ∞
This Number List Will Set Margins Between The Main CardView And Overlapped Image, In This Order -
Usage Example :
These Are The 2 Components On Screen -
[Surely You Can Do It With Dynamic Components ]