Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-7447] Android: Picker - Can't create rows with anonymous objects

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionWon't Do
Resolution Date2020-01-09T19:38:37.000+0000
Affected Version/sRelease 1.7.5, Release 1.8.0.1, Release 1.8.1
Fix Version/sn/a
ComponentsAndroid
Labelsparity
ReporterTim Poulsen
AssigneeIngo Muschenetz
Created2012-01-27T07:46:20.000+0000
Updated2020-01-09T19:38:37.000+0000

Description

Expected:

With tables and other objects, you can pass either explicit objects or anonymous objects. I expected to be able to do this with the picker, too.

Actual:

On iOS, you can create a picker with anonymous objects. On Android, you cannot. You get an empty picker. Additionally, if you set the useSpinner=true property with a picker created with anonymous objects, it causes a force-close of the app.
var picker = Ti.UI.createPicker({
	/*useSpinner: true*/
});

var data = [];
/*
// this works on Android
data[0]=Ti.UI.createPickerRow({title:'Bananas',custom_item:'b'});
data[1]=Ti.UI.createPickerRow({title:'Strawberries',custom_item:'s'});
data[2]=Ti.UI.createPickerRow({title:'Mangos',custom_item:'m'});
data[3]=Ti.UI.createPickerRow({title:'Grapes',custom_item:'g'});
*/
// this does not, but works on iOS
data[0]={title:'Bananas',custom_item:'b'};
data[1]={title:'Strawberries',custom_item:'s'};
data[2]={title:'Mangos',custom_item:'m'};
data[3]={title:'Grapes',custom_item:'g'};


// turn on the selection indicator (off by default)
picker.selectionIndicator = true;

picker.add(data);

win1.add(picker);

Comments

  1. Alan Hutton 2020-01-09

    It has been decided that this issue should be closed as “Won’t do.” This issue is out of date with our current supported SDK release (7.5.2.GA as of the date of closure), and out of date with mobile OS versions. If community members feel that the issue is still valid, please create a new ticket. Please reference this closed ticket number, include SDK used, comments, and code that demonstrates/reproduces the issue.

JSON Source