There are 9 buttons in one box.I m repeating this box 9 times.There are 9 different ids assign to 9 diff buttons.
But how to determine button is clicked from which box as there are 9 same boxes? On Thu, Aug 25, 2011 at 5:48 PM, hoyski <[email protected]> wrote: > On Aug 25, 7:47 am, Hitendrasinh Gohil <[email protected]> > wrote: > > Hi, > > > > I am having 3x3 array which contains 3x3 imagebuttons array.I am > > repeating 3x3 imagebuttons 9 times. > > how can i handle click events for that? > > Assign a unique ID to each button. Assign the same OnClickListener to > each button. In the OnClick method, inspect the ID of the View that's > received to determine which button was clicked. > > - Dave > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

