title: Event Handling in Android (setOnClickListener)
body: <p>I'm new to Java and Android Development in General. I found a sample which uses the following statement.</p>
  
  <pre><code>sButton.setOnClickListener(this);
  </code></pre>
  
  <p>in the onCreate() method of the Activity which implements View.OnClickListener where sButton is a Button variable. As far as I understand this register the on click event handler
  Later in the sample </p>
  
  <pre><code> public void onClick(View v) {
      if(v.getId() == R.id.button_s)
      {
      //some work
      }
  </code></pre>
  
  <p>this happens.
  My question is if it uses the 'this' keyword from inside the activity shouldn't it pass an object of class Activity? If that happens then the Button ID would never match.</p>
  
  <p>I know there are other methods to implement the Button click.</p>
  
  <p>I have a bit of experience with C# and Windows Phone. The procedure there was that the methods were called for the respective buttons without any need for registering them.</p>
  
  <p>Also what is the difference between event handlers and listeners?</p>
  
  <p>Any help would be appreciated! Thanks</p>