title: Android : Why onClick method is not working?
body: <pre><code>&lt;uses-sdk android:minSdkVersion="8" /&gt;
  </code></pre>
  
  <p>onClick method defined in xml</p>
  
  <pre><code> &lt;TextView
      android:id="@+id/titlemainpage"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"       
      android:text="Social To Dos"   
      android:onClick="testing" /&gt;
  </code></pre>
  
  <p>testing method used in java class is</p>
  
  <pre><code>public void testing(View v){
  
      Toast.makeText(this, "Clicked", Toast.LENGTH_LONG).show();
  
      textview.setTextColor(Color.CYAN);
  }
  </code></pre>