Добавить
Уведомления

Sketchware EditText Round Border & Round Background

How to make change type for EditText in Sketchware. Source Code : - Round Rectangle Border : android.graphics.drawable.ShapeDrawable shape = new android.graphics.drawable.ShapeDrawable(new android.graphics.drawable.shapes.RoundRectShape(new float[] { 40, 40, 40, 40, 40, 40, 40, 40 }, null, null)); shape.getPaint().setColor(Color.BLUE); shape.getPaint().setStyle(Paint.Style.STROKE); shape.getPaint().setStrokeWidth(3); _view.setBackground(shape); - Rectangle Border : android.graphics.drawable.ShapeDrawable shape = new android.graphics.drawable.ShapeDrawable(new android.graphics.drawable.shapes.RectShape()); shape.getPaint().setColor(Color.RED); shape.getPaint().setStyle(Paint.Style.STROKE); shape.getPaint().setStrokeWidth(3); _view.setBackground(shape); - Round Rectangle Background : android.graphics.drawable.GradientDrawable round_corner = new android.graphics.drawable.GradientDrawable(); round_corner.setColor(Color.WHITE); round_corner.setCornerRadius(new Float(40)); _view.setBackground(round_corner); Thank you for watching

12+
14 просмотров
год назад
12+
14 просмотров
год назад

How to make change type for EditText in Sketchware. Source Code : - Round Rectangle Border : android.graphics.drawable.ShapeDrawable shape = new android.graphics.drawable.ShapeDrawable(new android.graphics.drawable.shapes.RoundRectShape(new float[] { 40, 40, 40, 40, 40, 40, 40, 40 }, null, null)); shape.getPaint().setColor(Color.BLUE); shape.getPaint().setStyle(Paint.Style.STROKE); shape.getPaint().setStrokeWidth(3); _view.setBackground(shape); - Rectangle Border : android.graphics.drawable.ShapeDrawable shape = new android.graphics.drawable.ShapeDrawable(new android.graphics.drawable.shapes.RectShape()); shape.getPaint().setColor(Color.RED); shape.getPaint().setStyle(Paint.Style.STROKE); shape.getPaint().setStrokeWidth(3); _view.setBackground(shape); - Round Rectangle Background : android.graphics.drawable.GradientDrawable round_corner = new android.graphics.drawable.GradientDrawable(); round_corner.setColor(Color.WHITE); round_corner.setCornerRadius(new Float(40)); _view.setBackground(round_corner); Thank you for watching

, чтобы оставлять комментарии