title: Android can't find my OnClick method
body: <p>I have an issue with this botton, when is clicked the app send a message "ImageButton has stopped". I think it's something dumb, but I just started coding. Details of my code are below.</p>
  
  <p>LogCat:</p>
  
  <pre><code>12-13 21:01:56.659 1075-1075/com.example.christian.imagebutton E/AndroidRuntime: FATAL EXCEPTION: main
                                                                               Process: com.example.christian.imagebutton, PID: 1075
                                                                               java.lang.IllegalStateException: Could not find method llamar(MainActivity)(View) in a parent or ancestor Context for android:onClick attribute defined on view class android.support.v7.widget.AppCompatImageButton with id 'boton1'
                                                                                   at android.support.v7.app.AppCompatViewInflater$DeclaredOnClickListener.resolveMethod(AppCompatViewInflater.java:327)
                                                                                   at android.support.v7.app.AppCompatViewInflater$DeclaredOnClickListener.onClick(AppCompatViewInflater.java:284)
                                                                                   at android.view.View.performClick(View.java:5637)
                                                                                   at android.view.View$PerformClick.run(View.java:22429)
                                                                                   at android.os.Handler.handleCallback(Handler.java:751)
                                                                                   at android.os.Handler.dispatchMessage(Handler.java:95)
                                                                                   at android.os.Looper.loop(Looper.java:154)
                                                                                   at android.app.ActivityThread.main(ActivityThread.java:6119)
                                                                                   at java.lang.reflect.Method.invoke(Native Method)
                                                                                   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
                                                                                   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
  </code></pre>
  
  <p>Main Activity</p>
  
  <pre><code>package com.example.christian.imagebutton;
  
  import android.support.v7.app.AppCompatActivity;
  import android.os.Bundle;
  import android.view.View;
  import android.widget.TextView;
  
  public class MainActivity extends AppCompatActivity {
      private TextView tv1;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
  
      tv1=(TextView)findViewById(R.id.tv1);
  
  }
  public void llamar(View view){
      tv1.setText("Llamando");
      }
  }
  </code></pre>
  
  <p>And the layout is:</p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:app="http://schemas.android.com/apk/res-auto"
  xmlns:tools="http://schemas.android.com/tools"
  android:id="@+id/activity_main"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:paddingBottom="@dimen/activity_vertical_margin"
  android:paddingLeft="@dimen/activity_horizontal_margin"
  android:paddingRight="@dimen/activity_horizontal_margin"
  android:paddingTop="@dimen/activity_vertical_margin"
  tools:context="com.example.christian.imagebutton.MainActivity"&gt;
  
  &lt;ImageButton
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      app:srcCompat="@mipmap/telefono"
      android:layout_alignParentTop="true"
      android:layout_alignParentLeft="true"
      android:layout_alignParentStart="true"
      android:id="@+id/boton1"
      android:onClick="llamar(MainActivity)" /&gt;
  
  &lt;TextView
      android:text="TextView"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_below="@+id/boton1"
      android:layout_alignParentLeft="true"
      android:layout_alignParentStart="true"
      android:layout_marginTop="22dp"
      android:id="@+id/tv1" /&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>