C
C
Chvalov2015-04-23 15:00:32
Java
Chvalov, 2015-04-23 15:00:32

How to execute a command when two buttons are pressed, one of which is in setPressed state, Android 4.2?

There are a couple of buttons (Cat, Dog, Fish, Boat), and 2 command buttons (Walks, Swims).
You need to click on any of the buttons, and then click on the command button.
For example, a game for children. There are 4 buttons with the name of an object or animals and two main ones.
When you click on the "Cat" button, two main ones are activated and you need to select one or another action
"Walks or Swims"
When the button is selected this is a SetPressed event, how can I find the buttons that are in this state and process the code ?
Essence; Find buttons that are in the Pressed state and process them with another button.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anhedonia, 2015-04-23
@Anhedonia

Add buttons that can be pressed to the container, and then loop through.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question