Android: how to draw borders when I click my view
<p>I have some views like:</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.RED);
            canvas.drawCircle(50, 50, 50, paint);
        }

    }
</code></pre>

<p>And add to my LinearLayout</p>

<pre><code>LinearLayout img01 = (LinearLayout) findViewById(R.id.img01);
img01.addView(myViewCircle);
</code></pre>

<p>From my XML</p>

<pre><code>&lt;LinearLayout android:layout_width="fill_parent"
                       android:layout_height="fill_parent"
                       android:layout_weight="1"
                       android:background="#C07BD1"
                       android:id="@+id/img01"/&gt;
</code></pre>

<p>If I click this view I want to generate borders (means user select this view). If user click again the border will disappear. How can I do that?</p>
