[TIMOB-11746] Add Support for Android Switch Widget introduced in Android 4.0 (ICS)
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | Low |
Status | Open |
Resolution | Unresolved |
Affected Version/s | Release 2.1.3 |
Fix Version/s | n/a |
Components | Android |
Labels | android, feature |
Reporter | Ryan C |
Assignee | Unknown |
Created | 2012-10-08T19:19:19.000+0000 |
Updated | 2018-02-28T20:03:51.000+0000 |
Description
This is a request to add support for the new Android UI switch widget that was introduced in 4.0/ICS (API level 14). It is part of the same base class as the ToggleButton, which is what currently gets created by Ti.UI.createSwitch(). The specification for the control can be found here: http://developer.android.com/guide/topics/ui/controls/togglebutton.html. I believe this could be accomplished by adding a new type to the Ti.Android.UI enumeration (e.g. Titanium.UI.Android.SWITCH_STYLE_SWITCH) and extending the proxy class to invoke a Switch object.
You can have a look here: http://developer.appcelerator.com/question/130719/how-do-you-build-your-app-with-holo-theme