Which is better in implementing click listener?
<p>Which is a good practice in implementing click listener and why? Or is there a better way other than the two? Thanks.</p>

<p>First :</p>

<pre><code>    sampleButton.setOnClickListener(new View.OnClickListener(){
        public void onClick(View v){
            // do something
        }

    });
</code></pre>

<p>Second : implement OnClickListener then override onClick method?</p>
