title: How to redraw canvas in a view from activity
body: <p>I have a class that extends  View and have the onDraw method implemented
  in my xml file I have a FrameLayout with my view and a RelativeLayout with a button</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"&gt;
  &lt;canvas.pruebas.MyView
  android:layout_width="fill_parent"
    android:layout_height="fill_parent"
  /&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
       &gt;
      &lt;Button          
              android:id="@+id/btn"
              android:layout_width="100dp"           
              android:layout_height="wrap_content"
              android:text="hello"
              android:textSize="15sp"
  
              /&gt;
      &lt;/RelativeLayout&gt;
  &lt;/FrameLayout&gt;
  </code></pre>
  
  <p>in my Activity class I want to implement when I click the button redraw the canvas in MyView class</p>
  
  <pre><code>public class CanvasActivity extends Activity {
      Button btn;
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.main);
  
          btn=(Button)findViewById(R.id.btn);
          btn.setOnClickListener(new View.OnClickListener() {
  
              @Override
              public void onClick(View v) {
                  //redraw canvas
              }
          });
      }
  }
  </code></pre>
  
  <p>How Can I do that?</p>