Android Toggle Button

design

#1

Would be possible to have a toogler in Thunkable?

https://developer.android.com/guide/topics/ui/controls/togglebutton.html


[Free] The ExtraComponents Extension (Beta)
#2

Yes. It would really help especially in the settings pages of apps where features can be turned on/off. I am currently forced to use a checkbox…


#3

Apparently, a toggle button is possible with a slider component. But sadly, it doesn’t have any of the material properties.


#4

Yeah, but you have to slide to set it to the right position. With a toogle, you can simply click it


Would be possible to achieve that with an extension?


#5

It is possible
see here: https://www.youtube.com/watch?v=SBe1tDZgKCs
[or]
see here: https://www.youtube.com/watch?v=xF1gQ8oKQCo


#6

But that’s not what I’m looking for

I want THIS toogles (Android ones)

https://community.thunkable.com/uploads/default/original/2X/8/8fe78e085d1c7f1e97955be4101615fc7772c90f.png


#7

I think that is pretty impossible


#8

There is a toggler in AppyBuilder, so it is possible @Abdul_Maajith


#10

I am telling for thunkable.also its paid.


#11

But as it exists, it must be possible with an extension or a component :stuck_out_tongue_winking_eye:


#12

Why not make the button in PS and save to 2 png: s, one with toggle on and one with toggle off? Place toggle off on a button and then just switch images when the button is pressed.


#13

Can’t we have a FAB extension redesigned with toggle animation when clicked… Some thing tricky. make it visible / invisible when screen is open/closed.


#14

You could use a workaround which works quite well…

Take a look at this:
MaterialDesign.aia (5.1 KB)

I edited this .aia file from https://hackedit.de/124/


#15

Unfortunately, no. A normal button can be converted to a toggle button, but the button’s id is required to identify it. The id is defined in the XML files if you are using Android Studio. I don’t know how to get the id in an extension.

On the other hand, I can add a method to my Dialogs extension which can show a dialog which has some text and a toggle button.


#16

We can use Materialize for that and WebViewer.getString


#17

Materialize doesn’t work well. There are too many bounding boxes and the framework lags performance speed. It’s great for making generic material components, but a toggle button may not be a wise idea.


#18

An FAB is a bad idea as well. Action buttons have considerable elevation compared to other components whilst a toggle button sits in flush with the screen. Only the toggle (the circular green thingy :stuck_out_tongue_winking_eye: ) has minimal elevation. Another major headache is adding animations.


#19

Hey, I have a great idea :joy:
Let’s ask the @admins if they are going to add a button like this


#20

I wish. They’re not going to add anything to Android Thunkable until iOS is done. :cry:


split this topic #21

2 posts were split to a new topic: Thunkable Android platform poll