Please do not mind if a stupid question, but please, I need to clear my confusion.
For OnClickListeneron the button in android I put this inmain.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 question is why do we need to pass View viewwhen we call the method clicked.
source
share