I am having an 20 Buttons as an Array, and i have also displayed it onto the Screen, but now i want to restrict the user to Click only one button at a time, so is there anyway to do so ??
Note: I know i can use RadioButtons, but i need to have Buttons array because my application is somewhat like Calendar View (Consider Calendar View, where we can display “Day” value with the use of Button and then putting day value as 1, 2, 3 ,4,……31), now as user can select only date at a time, same way , i wants to have only one button click at a time.
Please Understand my requirement.
You keep responding that Radio Buttons aren’t an option but the reality is, what you are asking is exactly what a RadioGroup of Radio Buttons is designed to do.
You could do it with an Array of Buttons and I could explain how you’d do it but effectively I’d be explaining to you how to write a RadioGroup class which is pointless.
If ‘the requirement’ (which you haven’t explained) doesn’t want the default little circles used for RadioButtons then derive your own RadioButton subclass with a custom graphic which looks exactly like a normal Button then create a RadioGroup to handle everything else.