Wednesday, June 22, 2011

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

I cann't use CheckBox, cause it'll be image inside my buttons

On 22 июн, 17:39, Kostya Vasilyev <kmans...@gmail.com> wrote:
> Are the buttons actually check boxes?
>
> If so, use CheckBox methods:
>
> setOnCheckedChangeListener
> isChecked
> setChecked
>
> http://developer.android.com/reference/android/widget/CompoundButton....
> )
>
> -- Kostya
>
> 2011/6/22 nika-...@ya.ru <nika-...@ya.ru>
>
>
>
>
>
>
>
> > 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

--
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