Code example for RectShape

Methods: resize

0
        drawable.getPaint().set(paint);
        drawable.setBounds(125, 225, 275, 375);
        drawables.add(drawable); // Add it to our list!
 
        /* Setup Rectangle */ 
        shape = new RectShape();
        shape.resize(50, 50);
 
        drawable = new ShapeDrawable(shape);
        drawable.getPaint().set(paint);
        drawable.setBounds(475, 225, 625, 375);
        drawables.add(drawable); // Add it to our list!
 
        setContentView(new MyView(this));
    } 
 
    /* Our custom view which will draw the drawables in list */ 
    private class MyView extends View {
 
        public MyView(Context context) {
Experience pair programming with AI  Get Codota for Java