Details
-
Type:
Bug
-
Status: Closed
-
Priority:
High
-
Resolution: Fixed
-
Affects Version/s: Release 2.1.3, Release 3.1.0
-
Fix Version/s: 2013 Sprint 12 API, 2013 Sprint 12, Release 3.2.0
-
Component/s: Android
-
Labels:
-
Environment:
Android 2.3.3, 4.0, 4.1 and Ti SDK 2.1.3.GA
Description
Run the below code snippet to the issue.
When 'useSpinner' is not used, changing width has the appropriate effect on the picker width.
Ti.UI.backgroundColor = 'black';
|
var win = Ti.UI.createWindow({
|
exitOnClose: true,
|
layout: 'vertical'
|
});
|
|
var picker = Ti.UI.createPicker({
|
top:50,
|
useSpinner:'true', //Comment this line to see width having effect. Works fine on iOS
|
width:'75%', // Also, Ti.UI.FILL should fill up the screen. Does not work as expected on Android
|
});
|
|
var data = [];
|
data[0]=Ti.UI.createPickerRow({title:'Bananas',width:"80%"});
|
data[1]=Ti.UI.createPickerRow({title:'Strawberries',width:"80%"});
|
data[2]=Ti.UI.createPickerRow({title:'Mangos',width:"80%"});
|
data[3]=Ti.UI.createPickerRow({title:'Grapes',width:"80%"});
|
|
picker.add(data);
|
picker.selectionIndicator = true;
|
|
win.add(picker);
|
win.open();
|
|
// must be after picker has been displayed
|
picker.setSelectedRow(0, 2, false); // select Mangos
|
Works as expected on iOS.
Attachments
Issue Links
- is triggering
-
TIMOB-15584 Android: Spinner picker does not layout correctly
-
- Closed
-