Wednesday, June 22, 2011

[android-developers] to check the combination of pressed buttons

I have 4 buttons (a1, a2, b1, b2). They can combinate: a1-b1; a1-b2;
a2-b1; a2-b2.It means that "a1" and "a2" cann't be chosen together. So
after clicking "a1" I need to block "a2".And depends on what 2 buttons
were pressed, it will be differenet actions.I tried something like
this

if(a1.isPressed()){
a2.setEnabled(false);
a2.invalidate();}
else if (b1.isPressed()){
b2.setEnabled(false);
b2.invalidate();}

but it didn't work.Does anyone have an idea how I can do it? Thank you
in advance!

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

No comments:

Post a Comment