Create button toggle

Hello
I would like to create a toggle to close or open a roller shutter.
By default the image will be on the closed roller shutter. When you press the image of the closed roller shutter it displays the open roller shutter.
This is what I did

The problem is that I have to press the Button outside of me, it is on the image that I want to press!

Thank you

Use the clickable property of the image

image

Very nice
Thank you

https://medium.com/@paesser/how-to-create-a-toggle-switch-in-mit-app-invent-b3d67a984aa2 here's another version

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.