I have a Button
and it is defined in XML. I am using android:onClick
to call a method called showMessage
. Simple method example:
public void showMessage(View v){
Log.w(TAG, "Hi");
}
Now suppose my method needs for example a boolean and an int as parameters, how to do something like:
android:onClick="showMessage(boolean isExpensive, int money)"