Yes, I can create ToggleButton with 2 pictures(On, Off) But I want to create a ToggleButton with 3-5 pictures.
For example, when is it OFF and I click:
- Off picture
- Middle picture
- On picture
And when is it ON and I click:
- On picture
- Middle picture
- OFF picture
So it is like frame animation, that I can use with duration with ImageView.
EDIT:
You can use Frame Animation: In
res/drawable/myanim.xml
:You can then use this animation as a plain drawable:
To start the animation you do
You can also use a Value Animator. I haven't tested this, but you should be able to put something like this into onClick handler of you button: