This extension adds the functionality of components that are missing in the designer palette. It currently supports only the Toggle button, but more it is under active development.

Overview

Extension Developer Helios
Clone Starter .aia LINK
Get the .aix Download
Click-to-Copy Link com.vishwas.ExtraComponents.aix
Donate to Developer Not Available
License CC 4.0 BY ND

Thunkable Community

If you have any questions about the Extra Components extension then head on over to the Thunkable Community where you’ll find lots of amazing people who are happy to help you out.

Installation

If you need any help installing an extension then take a look at our “How to Install an Extension” guide.

Blocks

Procedures

CreateToggle This method is used to create the toggle button on the screen.

Add a Horizontal arrangement to the screen where you want the toggle button to appear. Define this arrangement in the horizontalArrangement parameter. The horizontal arrangement, in effect, is the toggle itself. If the arrangement is not visible, the toggle is hidden too. The toggle button is added to the top-left of the arrangement. Using this approach eliminates irritating calculations and conversions with px and dp, and also helps the toggle scale uniformly.

The x and y coordinates are specified in pixels. The thumbColour is the colour of the draggable circle specified in hex format. The trackColour is the colour of the rounded rectangle which carries the thumb, also specified as hex. The id is a unique integer to identify a specific toggle button. Never create two toggle buttons with the same id. By using an id for a toggle button, you can create multiple buttons without having to drag the extension onto the screen multiple times.

This method allows you to change the colours of the toggle button during runtime.

ToggleId With this method, you can programmatically toggle a specific button.

EnableToggle Programmatically enable/disable toggle buttons using this method. It is advised to use this in conjunction with the ChangeColour method as the disabled buttons do not automatically gray out.

ChangeColor This method allows you to change the colours of the toggle button during runtime. Colours are specified in Hex.

CreateIndeterminateProgress

This method has similar parameters to the CreateToggle block. The spinning progress will be shown on the top left of the horizontal arrangement that has been selected.

Events

ToggleClicked

This event is invoked whenever a toggle button is pressed. It returns if the toggle is switched on (boolean) and the id of the toggle button (int).

Troubleshooting

Never use the same id for two components, even if one is a toggle and the other is a progress. It will overwrite the previous id.

Example App

Sample Code

Want to Help?

There are lots of great extensions being created and updateed everyday. Keeping this site up to date is a huge task. If you want to help out find out more in the Thunkable Community


Post written by: Domhnall