title: this keyword accepted in onClick(View v) method
body: <p>I'm new to <strong>Android</strong> environment I'm just wondering why does the <code>OnClick(View v)</code> method accepts <code>this</code> if the required parameter is in type <code>View</code> and my method extends <code>Activity</code>? Is there a relationship between <code>View</code> and <code>Activity</code>? Please refer to the code to make the question clearer.</p>
  
  <pre><code>...
  public class MainActivity extends Activity implements OnClickListener {
  
      private Button btn1;
      private Button btn2;
  
      @Override
      protected void onCreate(Bundle savedInstanceState){
          ...
          btn1 = (Button)findViewById(R.id.button1);
          btn2 = (Button)findViewById(R.id.button2);
  
          // Below are the methods calling which confuses me
          btn1.setOnClickListener(this);
          btn2.setOnClickListener(this);
          ...
      }
  
      public void onClick(View v) {
          int id = v.get();
          switch(id) {
              case R.id.button1:
                  //statement for button1
              case R.id.button2:
                  //statement for button2
          ...
          }
      }
  }
  </code></pre>
  
  <p><strong>EDIT</strong>:This question is misleading, just caused by overlooking 'setOnClickListener(...)' is the same as 'onClick(...)'. I just don't know how to close this question.</p>