Android：how to change attributes in ondraw() by onclickListener
<p>I have a simple ondraw() function.</p>

<pre><code>private class MyViewCircle extends View {
        public MyViewCircle(Context context) {
            super(context);
            // TODO Auto-generated constructor stub
        }
        @Override
        protected void onDraw(Canvas canvas) {
            // TODO Auto-generated method stub
            super.onDraw(canvas);
            Paint paint = new Paint();
            paint.setAntiAlias(true);
            paint.setColor(Color.BLACK);
            canvas.drawCircle(20, 20, 50,
                    paint);
        }
    }
</code></pre>

<p>It works good. But I want it more interesting. I create a onclickListener.
evolve.setOnClickListener(new View.OnClickListener() {</p>

<pre><code>        @Override
        public void onClick(View v) {
            // TODO Auto-generated method stub
            //How to change attributes?
        }
    });
</code></pre>

<p>When I click the button, the attributes will be changed. For example, change to</p>

<pre><code>paint.setColor(Color.BLUE);
canvas.drawCircle(30, 30, 50,paint);
</code></pre>

<p>My question is: How could I implement this? When I click the button, the image will be automatically re-generated. Thanks!</p>
