[TIMOB-50] API - Titanium.UI.createSwitch (Android)
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2014-08-01T16:39:37.000+0000 |
Affected Version/s | n/a |
Fix Version/s | Release 0.6.0 |
Components | Android |
Labels | android |
Reporter | Don Thorp |
Assignee | Don Thorp |
Created | 2011-04-15T02:23:04.000+0000 |
Updated | 2014-08-01T16:42:56.000+0000 |
Description
.h3 Description
The purpose of this API is to create a switch native control. (copied from iPhone ticket)
.h3 Example
var switch = Titanium.UI.createSwitch({id:'foo', value:true});
switch.addEventListener('change',function(e)
{
e.value // current value of switch (true or false)
});
.h3 API Arguments
* id: optional. HTML element id for where the switch will be placed if placed in webview
* value: the initial value. default is true.
* color: optional. text color
* backgroundColor: optional. background color of field
(from [ea80588331816c98e1883ee83cf1c941db0602ff]) Toggle button [#50] Native toggle button/switch created using Titanium.UI.createSwitch http://github.com/appcelerator/titanium_mobile/commit/ea80588331816c98e1883ee83cf1c941db0602ff"> http://github.com/appcelerator/titanium_mobile/commit/ea80588331816...
(from [d7bdc2fa16ce5399a92fc2a6886f6fbdf065559d]) [#50 state:resolved] added color and backgroundColor. backgroundColor should probably not be used. http://github.com/appcelerator/titanium_mobile/commit/d7bdc2fa16ce5399a92fc2a6886f6fbdf065559d"> http://github.com/appcelerator/titanium_mobile/commit/d7bdc2fa16ce5...