View.OnClickListener, method or class?
<p>sorry if this question is stupid, but I can't wrap my head around Java syntax..I learnt C/C++<br/>
I know View is a class which is good..but I don't understand if View.OnClickListener() is a method.<br/>
I doubt it unless it returns an object? <br/>
I think View is a class which has a static OnClickListener member object..again that doesn't make sense to me..<br/>
Can some explain what is happening with this line of code?</p>

<pre><code>button1 = (Button) findByView(R.id.button1)  ;
    button1.setOnClickListener(new View.OnClickListener()
    {
        public void onClick(View v)
        {

        }
    }
</code></pre>

<p>So what is happening with this code?</p>

<p><code>Button1</code> is a reference to the button1 object in the xml file.</p>

<p><code>button1</code> object has a member object <code>setOnClickListener</code> which I from its name I assume initializes an event to the button or something. But it receives <code>View.OnClicListener()</code> object. </p>

<p>I am confused by that..onClick receives a View object so <code>onClickListener</code> is not an object returns a View object?? I don't get it at all. </p>

<p>Can someone explain what happens in that line <code>View.onClickListener()</code> is it another way of saying <code>new this</code>?</p>
