title: onClick event not working on Android Blank Activity
body: <p>I have a blank activity in Android Studio, and I have performed the following instructions but it is not working when I run the program.</p>
  
  <ol>
  <li>Select the button and look for properties/attributes panel on the right. </li>
  <li><p>Assign the name onClick to the android:onClick property of your Button.</p></li>
  <li><p>Implement the following method in the Main_Activity file:</p></li>
  </ol>
  
  <p><code>public void onClick (View view) { 
      Toast.makeText(this, "Button 1 pressed", Toast.LENGTH_LONG).show();
  }
  </code>
  When I try to run this I get errors like:</p>
  
  <ul>
  <li>expecting a member declaration</li>
  <li>function declaration must have a name</li>
  </ul>