Q:

Android View Parameter for OnClickListener Method

please dont mind if   stupid question  but please  i need to clear my confusion .. 
For  OnClickListener  on  a button in android  i did  put this in main.xml
<Button
    android:id="@+id/button1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentTop="true"
    android:text="Button"
    android:onClick="clicked"
/>

and in  java file i did 
  public void clicked(View v)
  {
   //  my code here 
  }

my question is  why we need to pass View view   when we call   clicked method .  

A:

AFAIK,
Because method is called without getting the Button in onCreate. And in order to access that Button you need to have a view.
i.e
           View v represents your button view.
If you want to access button , suppose you want to get text on It. How do you get it without getting button by using findViewbyId ?
       you will get your button like this
Button b=(Button)v;

To get the text
String text=b.getText();

So here we are not getting the button by using findViewById
In general if you want to access the button you need to get that object. But here you'll get that from the view. Without using findViewById.

