There is a click handler with a method call, a button.
It is necessary that when pressed, the method of the first button is called (this is), and the button changes its appearance and animates, waiting for a second press. Probably need to call another button on top. After clicking the animated button, the second method is called, and the button becomes the same again.
I just started to figure it out. Tell me something?
- oneBut how exactly should the button change its appearance and how to animate it? - Flippy pm
- Well, let's say, the color changes and small circles start to go around it, like it is activated. - keltkelt
|
2 answers
Each button in Android has its own parameters, which can be accessed from the code. There you can change the background, the text of the button and so on. I can advise this site .
|
Write the styles for the buttons .. These are xml files in a drawable. That's also a good article for this https://habrahabr.ru/post/206012/
- Thank you. And in the style of a single button, you can set this behavior? Type as a switch + different methods in different states. - keltkelt
- To do this, you probably need to write your own button. Follow the view and do something there. - EmErIx_007
- In general, you can make it easier. In one container there are 2 buttons. One visibility is GONE at the first visible. When you click on the first second visibility, VISIBLE and at the first one, GONE. - EmErIx_007
- Thanks, I used the State approach. I change the state of the button. - keltkelt
|