I have a list of Button objects that I use to enable/disable all buttons at once. I use the following very simple code:
void buttonsEnabled(boolean enabled)
{
for(Button btn : buttonList)
{
btn.setEnabled(enabled);
}
}
Is it possible to add a ToggleButton into the ArrayList buttonList, since it inherits from CompoundButton which inherits from Button, or is my thinking mixed up?