title: When to set onClickListener with View and when with Button?
body: <p>I have just started to learn Android Application Development from thenewboston.com  tutorials.</p>
  
  <p>I had a confusion with setting the onClickListener event handler. When setting it for a button in the main activity, they used the Button class. </p>
  
  <pre><code>    redButton.setOnClickListener(
        new Button.onClickListener(){
                public void onClick(View v){
                   // Do Something 
               }
          }
      );
  </code></pre>
  
  <p>But when setting it for a fragment they used the view class.</p>
  
  <pre><code>    redButton.setOnClickListener(
            new View.onClickListener(){
                    public void onClick(View v){
                       // Do Something 
                   }
              }
          );
  </code></pre>
  
  <p>What is the difference between the two ? And when to use them ?
  Please Help !!</p>