tags:

views:

45

answers:

1

i have an activity with 5 button, i want to use the switch option, how i can find what the button is clicked ?.

+1  A: 

Here is a guide: http://developer.android.com/guide/topics/ui/ui-events.html

Inside onClick(View v):

switch(v.getId()){   
  case R.id.nameofbutton: 
    //do this 
    break;  
}
softarn