Button Block implements a standard button with two states:
- Up state (the initial state).
- Down state
For examples, instal the 'Buttons' Tutorial app, available in your Dashboard. Click here to install
Configuration and Events settings from Buttons Tutorial App
When Button is pressed (finger on the Button) it:
- Switches to the Selected State
- Displays the Selected Image (optional, but recommended)
- Fires the Button Down Event.
When Button is released (user remove their finger from the Button) it:
- Switches back to the Unselected State
- Swap back to the Selected Image
- Fires the Button Up Event.
Providing two discrete Events for the down and up states (as opposed to simply a Tap) allows a button to be used to control state in the system in different ways.
A good example of this would be a Fast Forward button (which is currently supported) that advances an audio player ahead quickly while the button is being pressed, and reverts to the normal play rate when the button is released.
The 'Buttons' tutorial app showcase the implementation for a standard Button
Images: It is recommended to work with Images stored in
- Media Folder
- Local File System (this is done using an On Device SQL DB and storing the data on device)
- Many Blocks can be used to create a Button, check out how to create a Button for more.
- How to create a Button
- What is an Event?
- What is an Action?