B4A Class Switch view (Android 4+)

rleiman

Well-Known Member
Licensed User
Longtime User
Hi Erel,

I also added the switch view to my current app I'm working on as a CustomView in the designer and the result of using:

B4X:
    SwMute.TextOff = "Normal"
    SwMute.TextOn = "Muted"

Is the same. The text does not show up.

For now I think I will need to use a Label view and alter the text on that based on the true and false checked value of the switch view.

Here's the screen shot.
 
Last edited:

rleiman

Well-Known Member
Licensed User
Longtime User
Which device are you using? The switch appearance is non-standard.

Hi,

It's a Chinese replica phone model SM-G900.

The phone is a clone of the Samsung S5 and is running Jellybean modified to look like KitKat.
 

Croïd

Active Member
Licensed User
Longtime User
Add visible function ?

B4X:
Dim sw As SwitchView
------------------------------
sw.visible = false

#5:

B4X:
sw.Switch.Visible = false
 
Last edited:

Croïd

Active Member
Licensed User
Longtime User
Please, Do you have a solution for typeface ?

sw.typeface and sw.switch.typeface = not possible, and I need to change character for sw.TextOff = " "
 

Croïd

Active Member
Licensed User
Longtime User
Thanks Erel

But how possible enlarge text ? I'm not sure txt take typeface
 

Croïd

Active Member
Licensed User
Longtime User
Yes, but I need enlarge character, I have a doubt if I use my own typeface

Export as zip when uploading projects = sorry
 

Attachments

  • switchsymbol2.zip
    7.7 KB · Views: 205

Croïd

Active Member
Licensed User
Longtime User
Sorry ! does not work !
 

Attachments

  • Capture.PNG
    1.5 KB · Views: 215
Cookies are required to use this site. You must accept them to continue using the site. Learn more…