HomeSketchwareMake a layout with rounded corners in sketchware

Make a layout with rounded corners in sketchware

1) Create a new sketchware project.

2) Drag and drop a Linear layout with id linear1.

3) Add a widget that you want make a rounded corners inside Linear Layout linear1. It may be EditText or Button or TextView or ImageView, etc.

5) Add a new more block round with View view , string color ,string stroke_c and a number radius.

6) Paste the below code to the more block :-

android.graphics.drawable.GradientDrawable gd = new android.graphics.drawable.GradientDrawable();

gd.setColor(Color.parseColor(_color));
gd.setCornerRadius((float)_radius);
gd.setStroke(2, Color.parseColor(_stroke_c));

_view.setBackground(gd);

7) In onCreate event add the more block with your view, colour, stroke colour and radius.

Thank you…


1 thought on “Make a layout with rounded corners in sketchware

  1. Like other of your posts, Pics will be handy

Leave a Reply