Aug 20, 2014 Replies: 17 This library was made based on UISwitch for IOS Installation instructions: - Copy the .xml and .jar files to your custom libraries folder - Select in your REFERENCED LIBRARIES Version history: V1.0 (First public release): - Initial version UISwitch Author: Alberto Iglesias Version: 1 UISwitch Methods: IsInitialized As Boolean Tests whether the object has been initialized. _asview As PanelWrapper Return Panel Object from UISwitch _author As String Return the author of this library _getposition As String Return the Position _initialize (vCallback As Object, ev As String, Tag As String, Width As Int, Height As Int, Bitmap0 As BitmapWrapper, Bitmap1 As BitmapWrapper) As String Initializes the object. You can add parameters to this method if needed. Examples: Dim objBmp0 As Bitmap = LoadBitmap(File.DirAssets, "Model01_OFF.png") Dim objBmp1 As Bitmap = LoadBitmap(File.DirAssets, "Model01_ON.png") objUISwitch3.Initialize(Me,"objUISwitch","3333333",154dip,54dip,objBmp0,objBmp1) _setposition (pPosition As Int) As String Set Position (0 or 1) _version As String Return the version of this library This library use the AnimationPlus like dependence, if you don´t have, do the download from http://www.b4x.com/android/forum/threads/lib-animationplus.21313/ Attachments Example1.zip Example1.zip 20.8 KB · Views: 938 Example2.zip Example2.zip 77.3 KB · Views: 880 Example3.zip Example3.zip 64.7 KB · Views: 909 Library.zip Library.zip 3.4 KB · Views: 1,035 UISwitch Models.zip UISwitch Models.zip 110.2 KB · Views: 950 Screenshot1.png 82.7 KB · Views: 1,017 Screenshot2.png 23 KB · Views: 1,138 Screenshot3.png 52.7 KB · Views: 1,047 GoogleToogles.zip GoogleToogles.zip 1.7 KB · Views: 770 Last edited: Aug 20, 2014 Click to expand...
This library was made based on UISwitch for IOS Installation instructions: - Copy the .xml and .jar files to your custom libraries folder - Select in your REFERENCED LIBRARIES Version history: V1.0 (First public release): - Initial version UISwitch Author: Alberto Iglesias Version: 1 UISwitch Methods: IsInitialized As Boolean Tests whether the object has been initialized. _asview As PanelWrapper Return Panel Object from UISwitch _author As String Return the author of this library _getposition As String Return the Position _initialize (vCallback As Object, ev As String, Tag As String, Width As Int, Height As Int, Bitmap0 As BitmapWrapper, Bitmap1 As BitmapWrapper) As String Initializes the object. You can add parameters to this method if needed. Examples: Dim objBmp0 As Bitmap = LoadBitmap(File.DirAssets, "Model01_OFF.png") Dim objBmp1 As Bitmap = LoadBitmap(File.DirAssets, "Model01_ON.png") objUISwitch3.Initialize(Me,"objUISwitch","3333333",154dip,54dip,objBmp0,objBmp1) _setposition (pPosition As Int) As String Set Position (0 or 1) _version As String Return the version of this library This library use the AnimationPlus like dependence, if you don´t have, do the download from http://www.b4x.com/android/forum/threads/lib-animationplus.21313/
C CidTek Active Member Licensed User Longtime User Aug 20, 2014 #2 Incredible! You must have been up all night working on this and I thank you very much! I will be working with the samples tonight and I will post back some feedback.
Incredible! You must have been up all night working on this and I thank you very much! I will be working with the samples tonight and I will post back some feedback.
C CidTek Active Member Licensed User Longtime User Aug 20, 2014 #3 Here is a couple more png files that are Blackberry themed. Attachments Blackberry Toggles.zip Blackberry Toggles.zip 13.2 KB · Views: 704
Erel B4X founder Staff member Licensed User Longtime User Aug 21, 2014 #4 Great work! Thank you for sharing.
LucaMs Expert Licensed User Longtime User Aug 23, 2014 #6 The "circles" in the main image are almost perfect, in the other pictures posted no. I am afraid that there is no method to scale images without distorting them. I think we should use the folders for the various resolutions such as Google suggests and this is really a nuisance.
The "circles" in the main image are almost perfect, in the other pictures posted no. I am afraid that there is no method to scale images without distorting them. I think we should use the folders for the various resolutions such as Google suggests and this is really a nuisance.
LucaMs Expert Licensed User Longtime User Aug 23, 2014 #8 It don't work on B4A v3.20 java.lang.NoSuchMethodError: anywheresoftware.b4a.BA.isShellModeRuntimeCheck
It don't work on B4A v3.20 java.lang.NoSuchMethodError: anywheresoftware.b4a.BA.isShellModeRuntimeCheck
Alberto Iglesias Well-Known Member Licensed User Longtime User Aug 23, 2014 #10 You can put any images in your code, this is some examples I included with library. You can adjust putting transparent in border of any image or creating your own image. Thanks
You can put any images in your code, this is some examples I included with library. You can adjust putting transparent in border of any image or creating your own image. Thanks
C CidTek Active Member Licensed User Longtime User Aug 23, 2014 #11 I have added this custom view to my app to replace checkboxes and it works perfect and looks great. Just remember to keep the height and width ratios correct when using any image or else it will get distorted. I am confused by the AnimationPlus requirement as it doesn't seem to be needed and the sample projects didn't reference it either. Thanks again for a great library!
I have added this custom view to my app to replace checkboxes and it works perfect and looks great. Just remember to keep the height and width ratios correct when using any image or else it will get distorted. I am confused by the AnimationPlus requirement as it doesn't seem to be needed and the sample projects didn't reference it either. Thanks again for a great library!
T Tom Christman Active Member Licensed User Longtime User Sep 3, 2014 #13 Really Nice work Thank you!
Silv Member Licensed User Longtime User Mar 7, 2015 #15 Hi Alberto, is your library works fine with Android 5? I just run yours examples and i see only the blank screen. Thanks Last edited: Mar 7, 2015
Hi Alberto, is your library works fine with Android 5? I just run yours examples and i see only the blank screen. Thanks
Silv Member Licensed User Longtime User Mar 7, 2015 #16 Oh i fixed it, i just forget to update my AnimationPlus library. Would be great if in new versions of B4A existing libraries start updating automatically.
Oh i fixed it, i just forget to update my AnimationPlus library. Would be great if in new versions of B4A existing libraries start updating automatically.
hears Active Member Licensed User Longtime User Mar 2, 2020 #17 i have tried ,this switch cannot set to off by this code ,if setposition always display ON. why ? objUI1.SetPosition(0) objUI2.SetPosition(1)
i have tried ,this switch cannot set to off by this code ,if setposition always display ON. why ? objUI1.SetPosition(0) objUI2.SetPosition(1)
Alberto Iglesias Well-Known Member Licensed User Longtime User Mar 2, 2020 #18 hears said: i have tried ,this switch cannot set to off by this code ,if setposition always display ON. why ? objUI1.SetPosition(0) objUI2.SetPosition(1) Click to expand... I will check today, dont worry
hears said: i have tried ,this switch cannot set to off by this code ,if setposition always display ON. why ? objUI1.SetPosition(0) objUI2.SetPosition(1) Click to expand... I will check today, dont worry