How to avoid overlapping OnClicks? : I'm using a Relative Layout where I've placed a Button over an Image View as shown [here][1].
<br />

The problem is I've used `OnClick` on both button and Image View that refers to different methods i.e., button when clicked calls a method, Image when clicked calls a different method. When I click on the button the App force quits i.e., has a Runtime Exception. 

**activity_main.xml**:

    <Button
           android:layout_width="wrap_content"
           android:layout_height="wrap_content"
           android:text="click"
           android:onClick="sampleClick"
           android:layout_alignParentTop="true"
           android:layout_centerHorizontal="true"
           android:layout_marginTop="125dp"
           android:id="@+id/button" />
    
       <ImageView
           android:id="@+id/imageView"
           android:layout_width="wrap_content"
           android:layout_height="wrap_content"
           app:srcCompat="@drawable/oreo"
           android:onClick="imageClick"
           android:layout_alignParentTop="true"
           android:layout_alignParentStart="true" />

**MainActivity.java**:

    public void sampleClick(View view){
            Toast.makeText(MainActivity.this,"Button Click",Toast.LENGTH_LONG).show();
    
        }
    
        public void imageClick(View view){
            Toast.makeText(MainActivity.this,"Image Click",Toast.LENGTH_LONG).show();
        }

Help me solve the Error.

  [1]: https://i.stack.imgur.com/Tv0TW.png