Nguyen Lam Phuoc
Nguyen Lam Phuoc

Reputation: 101

Clipped layout in android

Can you help me design Android layout as the mockup: enter image description here

Description:

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

Upvotes: 0

Views: 55

Answers (0)

Related Questions