Can you help me design Android layout as the mockup:
Description:
- Orange layout with rounded radius.
- Green layout is cut off at bottom and overflow at top
- Yellow layout in front of Green and cut off at rounded corner of Orange.
Please help me, I was crazy with this problem.
Thank you so much!
My Code here:
Clipped view
public class ClippedView extends FrameLayout {
public ClippedView(Context context) {
super(context);
}
public ClippedView(Context context, AttributeSet attrs) {
super(context, attrs);
}
public ClippedView(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
}
@Override
protected void onDraw(Canvas canvas) {
Path clipPath = new Path();
clipPath.addRoundRect(new RectF(canvas.getClipBounds()), 120, 120, Path.Direction.CW);
canvas.clipPath(clipPath);
super.onDraw(canvas);
}
}
It's cut OK but Orange layout cut all side. I want cut children only at bottom