[TIMOB-8249] iOS: Switch - Switch controls do not auto size to fit in view
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2012-03-23T15:09:11.000+0000 |
Affected Version/s | Release 2.0.0 |
Fix Version/s | n/a |
Components | iOS |
Labels | qe-ios031912, qe-nfc |
Reporter | Wilson Luu |
Assignee | Neeraj Gupta |
Created | 2012-03-23T14:29:47.000+0000 |
Updated | 2017-03-09T23:05:42.000+0000 |
Description
Steps to reproduce:
1. Run code on iOS:
// Create a switch on a parent that is width and height constrained
// See that the switch sizes itself accordingly
var win = Ti.UI.createWindow();
win.backgroundColor = 'white';
var label = Ti.UI.createLabel({
text: 'Pass if switches are...',
top: 20,
left: 10,
height: Ti.UI.SIZE,
width: Ti.UI.SIZE,
color: 'black'
});
var view1 = Ti.UI.createView({
height: 30,
width: 60,
top: 80,
backgroundColor: 'green'
});
var sw1=Titanium.UI.createSwitch({
value: true
});
var view2 = Ti.UI.createView({
height: 50,
width: 120,
top: 140,
backgroundColor: 'green'
});
var sw2=Titanium.UI.createSwitch({
value: true,
title:'Testing'
});
var view3 = Ti.UI.createView({
height: 70,
width: 180,
top: 220,
backgroundColor: 'green'
});
var sw3=Titanium.UI.createSwitch({
value: true,
title: 'Test'
});
view1.add(sw1);
view2.add(sw2);
view3.add(sw3);
win.add(view1);
win.add(view2);
win.add(view3);
win.add(label);
win.open();
Actual: Switch controls do not size to the view. See attachment.
Expected: Switch controls should size to the view.
Attachments
File | Date | Size |
---|---|---|
Screenshot 2012.03.23 15.28.02.png | 2012-03-23T14:29:48.000+0000 | 37638 |
Switch views are SIZE views.
Closing ticket as invalid.