B4J Library B4j ToggleSwitch

stevel05

Expert
Licensed User
Hi Roger,

This thread just contains a very basic implementation that anybody can use as a template and change as they wish. If you want to share your modified version, feel free to do so in a new thread and explain what you have changed.

BTW, there is a small error (check the log window) that should be addressed before you share it.
 

ThRuST

Well-Known Member
Licensed User
ok I should update my previous post, sorry for taking advantage of your code.
I do like my addions, it made it a bit better in fact :)
 

ThRuST

Well-Known Member
Licensed User
What bug are you talking about? Both of our code is perfect. Or are you trying to tell me something else?
What if I'm Tuco's brother in Breakin' bad Steve (Netflix success TV series) hahaha
 

ThRuST

Well-Known Member
Licensed User
Oops sorry I totally missed that. Thanks for notifying me. I will update my post with v1.1
 

ThRuST

Well-Known Member
Licensed User
Hi again Steve, I couldn't let go of it. I updated your library to v1.3 :D

See my post #19 to find it.
 

ThRuST

Well-Known Member
Licensed User
Steve, it would be nice with a fading effect on the text everytime the button is clicked. How to do that :rolleyes:
 

ThRuST

Well-Known Member
Licensed User
Steve, do you mind adding calls to these subs in your class. It will save me alot of time if you do it. Thanks

B4X:
Public Sub FadeIn
    TSLbl.SetAlphaAnimated(mDuration /2, 1)
End Sub

Public Sub FadeOut
    TSLbl.SetAlphaAnimated(mDuration /2, 0)
End Sub
 

VittorioBarile

Member
Licensed User
Hi, I'm trying to use your lib on B4X Pages project.
In my first page it works, but when i close it and open another B4XPage, it doens't show button switch:

in my AppStart it works, but when i close this layout and open a new one it doesn't show button switch, but only text!

AppStart:
MainForm = Form1
MainForm.Stylesheets.Add(File.GetUri(File.DirAssets,"ToggleSwitch.css"))
MainForm.Show
OnClick new page:
B4XPages.ShowPageAndRemovePreviousPages("NewPage")
could you help me?
 
Last edited:
Top