Code example for OvalShape

Methods: resize

0
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
 
        Shape shape;
 
        shape = new OvalShape();
        shape.resize(50, 50);
 
        myShapeDrawable = new ShapeDrawable(shape);
        myShapeDrawable.getPaint().set(paint);
        myShapeDrawable.setBounds(125, 225, 275, 375);
 
        setContentView(new MyView(this));
    } 
 
    /* Our custom view which will draw the drawable */ 
    private class MyView extends View {
 
        public MyView(Context context) {
            super(context);
        }