Feb 22, 2022 Replies: 7 This is a modified version of the B4XSwitch class wich allows you to set the On,Off and Thumbcolors in code. Just replace it inside your XUI Views.b4xlib. You can also rename the class to use it beside the official XUI Views Maybe this can be added in future official updates B4X: B4XSwitch1.OnColor=Theme.SelectionBackground B4XSwitch1.OffColor=Theme.Disabled B4XSwitch1.ThumbColor=Theme.AccentColor Attachments B4XSwitch.bas B4XSwitch.bas 5.4 KB · Views: 668 Last edited: Feb 22, 2022 Click to expand...
This is a modified version of the B4XSwitch class wich allows you to set the On,Off and Thumbcolors in code. Just replace it inside your XUI Views.b4xlib. You can also rename the class to use it beside the official XUI Views Maybe this can be added in future official updates B4X: B4XSwitch1.OnColor=Theme.SelectionBackground B4XSwitch1.OffColor=Theme.Disabled B4XSwitch1.ThumbColor=Theme.AccentColor
LucaMs Expert Licensed User Longtime User Feb 22, 2022 #2 It is necessary to clarify that B4XSwitch is not a class of its own, but is part of the "Xui Views" B4Xlib.
It is necessary to clarify that B4XSwitch is not a class of its own, but is part of the "Xui Views" B4Xlib.
Blueforcer Well-Known Member Licensed User Longtime User Feb 22, 2022 #3 LucaMs said: It is necessary to clarify that B4XSwitch is not a class of its own, but is part of the "Xui Views" B4Xlib. Click to expand... Of course its a customview class, and i already mentioned the xui views package in order to use it: Just replace it inside your XUI Views.b4xlib Click to expand...
LucaMs said: It is necessary to clarify that B4XSwitch is not a class of its own, but is part of the "Xui Views" B4Xlib. Click to expand... Of course its a customview class, and i already mentioned the xui views package in order to use it: Just replace it inside your XUI Views.b4xlib Click to expand...
LucaMs Expert Licensed User Longtime User Feb 22, 2022 #4 Blueforcer said: Of course its a customview class, and i already mentioned the xui views package in order to use it: Click to expand... But if the official library were to change, you would have to replace the class every time; not really "funny" thing.
Blueforcer said: Of course its a customview class, and i already mentioned the xui views package in order to use it: Click to expand... But if the official library were to change, you would have to replace the class every time; not really "funny" thing.
Blueforcer Well-Known Member Licensed User Longtime User Feb 22, 2022 #5 LucaMs said: But if the official library were to change, you would have to replace the class every time; not really "funny" thing. Click to expand... And thats why i mentioned the update thing wich was another broad hint to erel ;-) Maybe this can be added in future official updates Click to expand... You can also simply rename the class and import it into the project and use it besides the official xui views lib. Not sure why we need to discuss such trifles here if everything is already said. I needed it, so I have provided it for the community for those who are in the same situation as me. Others are certainly pleased about it. Last edited: Feb 22, 2022
LucaMs said: But if the official library were to change, you would have to replace the class every time; not really "funny" thing. Click to expand... And thats why i mentioned the update thing wich was another broad hint to erel ;-) Maybe this can be added in future official updates Click to expand... You can also simply rename the class and import it into the project and use it besides the official xui views lib. Not sure why we need to discuss such trifles here if everything is already said. I needed it, so I have provided it for the community for those who are in the same situation as me. Others are certainly pleased about it.
LucaMs Expert Licensed User Longtime User Feb 22, 2022 #6 Blueforcer said: Not sure why we need to discuss such trifles here if everything is already said. Click to expand... Just to clarify it better for everyone, even for new members. Blueforcer said: Just replace it inside your XUI Views.b4xlib. You can also rename the class to use it beside the official XUI Views Click to expand... It would have been better to have reversed the two sentences above.
Blueforcer said: Not sure why we need to discuss such trifles here if everything is already said. Click to expand... Just to clarify it better for everyone, even for new members. Blueforcer said: Just replace it inside your XUI Views.b4xlib. You can also rename the class to use it beside the official XUI Views Click to expand... It would have been better to have reversed the two sentences above.
Blueforcer Well-Known Member Licensed User Longtime User Feb 22, 2022 #7 i added last sentence only to break future discussions New members can find explanation in the forum or can ask. Writing everything from scratch to every post would be a bit too much. Hope its ok now for you and we can quit here.
i added last sentence only to break future discussions New members can find explanation in the forum or can ask. Writing everything from scratch to every post would be a bit too much. Hope its ok now for you and we can quit here.
LucaMs Expert Licensed User Longtime User Feb 22, 2022 #8 Blueforcer said: i added last sentence only to break future discussions New members can find explanation in the forum or can ask. Writing everything from scratch to every post would be a bit too much. Hope its ok now for you and we can quit here. Click to expand... Sorry, I do not want to make controversy and much less underestimate your work and your class. Replacing the original class is a bad idea, due to incompatibility with future versions of the B4XLib, so if that was your only indication it would have been worse. I hope it is clear; I do not add anything else.
Blueforcer said: i added last sentence only to break future discussions New members can find explanation in the forum or can ask. Writing everything from scratch to every post would be a bit too much. Hope its ok now for you and we can quit here. Click to expand... Sorry, I do not want to make controversy and much less underestimate your work and your class. Replacing the original class is a bad idea, due to incompatibility with future versions of the B4XLib, so if that was your only indication it would have been worse. I hope it is clear; I do not add anything else.