iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
Hello Crosslight Support,
I have a question concerning a form activity (Android). In my "metadata" class, I set the editor type switch on a property. In my final activity the property is displayed as a switch. This is fine. But the switch has the text "on/off" (depending on switch state) on the control. In the "MyInventory" sample there is no text on the "is sold" switch, there is a circle and a bar on the switch which is not that specific. How can I achive this switch behaviour?
Thanks,
Thomas
By default, the appearance of on/off switches is represented with a toggle button that provides a slider control and on/off text which shows the toggle text (http://developer.android.com/design/building-blocks/switches.html). In order to create switch with no on/off text; and containing a circle and a bar, you will need to create the custom control first and then integrate it into the form builder.
Please let us know whether this helps or not.
Hello Yudi,
this tells me how I could do it. But how is it done in the MyInventory sample? Where is the custom control for the switch and how is it integrated into the form builder? Maybe, I was looking at the wrong place, but I couldn't figure out how it is done.
Thank you for the sent screenshot, screenshot.png.
Could you please confirm whether the snapshot was taken from Samsung device? I tried to open MyInventory sample on Samsung device and find that the switch containing a circle and and a bar. However, the switch control appear as on/off when the same sample is deployed to Nexus device.
It is the case that each device manufacturer may have different control appearance (for example: by customizing it to have a circle and a bar). I believe that it is something that is not handled by Crosslight.
Hope this help.
The screenshot was taken from a Samsung Galaxy Tab 3. My app was deployed to the same device. But in my app the switch appeared as on/off. Looking at the MyInventory app on that same device the switch appears as circle/bar like in the screenshot. So maybe there are some customizations depending on the device. But I have two apps on the same device and the switch appearance is different. The only conclusion I have is that the switch appearance can be customized somewhere in the code/settings/manifest/... But where?
Could you please try to check and compare the AndroidManifest.xml file which available on MyInventory app and on your app.
If Holo theme is set, such as shown on the following snippet code:
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="auto" android:versionCode="1" android:versionName="1.0.0.0" package="MyInventory.Android"> <uses-sdk /> <application android:theme="@android:style/Theme.Holo" android:label="MyInventory"></application> <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.CAMERA" /> </manifest>
please try to remove the Holo theme and see the result. For your information, MyInventory sample doesn't use Holo theme (the switch is shown as circle/bar); and MyInventory_MasterDetail sample uses Holo theme (the switch is shown as on/off).
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname