Code example for Paint

Methods: set

0
 
        shape = new OvalShape();
        shape.resize(50, 50);
 
        drawable = new ShapeDrawable(shape);
        drawable.getPaint().set(paint);
        drawable.setBounds(125, 225, 275, 375);
 
        setContentView(new MyView(this));
    } 
 
    private class MyView extends View implements OnTouchListener {
 
        private static final int MAX_STEPS = 100;
        private int maxSteps;
 
        public MyView(Context context) {
            super(context);
            this.maxSteps = MAX_STEPS;
            setOnTouchListener(this);
        }