Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-7771] Ti.API: UI.Picker - selectionIndicator has different default value between Android and iOS

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionInvalid
Resolution Date2017-06-15T18:22:56.000+0000
Affected Version/sRelease 1.8.1
Fix Version/sn/a
Componentsn/a
Labelsparity
ReporterPaul Dowsett
AssigneeEric Merriman
Created2012-02-22T10:04:55.000+0000
Updated2017-06-15T18:22:56.000+0000

Description

Problem

[Titanium.UI.Picker.selectionIndicator](http://developer.appcelerator.com/apidoc/mobile/latest/Titanium.UI.Picker.selectionIndicator-property.html) has a different default value for Android and iOS. If this property is not defined on Android, the indicator bar is displayed, whereas on iOS it is not.

Request

Decide which is the preferred behavior, and raise ticket to address the platform that is incorrect.

Test case

Ti.UI.backgroundColor = 'white';
var win = Ti.UI.createWindow({
	exitOnClose: true,
	layout: 'vertical'
});

var fruit = [ 'Bananas', 'Grapes', 'Blueberries', 'Strawberries' ];
var color = [ 'blue', 'red', 'yellow', 'white' ];

var column1 = Ti.UI.createPickerColumn();

for(var i=0, ilen=fruit.length; i<ilen; i++){
	var row = Ti.UI.createPickerRow({
		title: fruit[i]
	});
	
	column1.addRow(row);
}

var column2 = Ti.UI.createPickerColumn();

for(var i=0, ilen=color.length; i<ilen; i++){
  var row = Ti.UI.createPickerRow({
    title: color[i]
  });
  column2.addRow(row);
}

var picker = Ti.UI.createPicker({
  columns: [column1, column2],
  useSpinner: true, // required to use multi-column pickers with Android
  visibleItems: 3,
  top:50
});


win.add(picker);

win.open();

setTimeout(function(){
	// must be after picker has been displayed
	picker.setSelectedRow(0, 2, false);
	picker.setSelectedRow(1, 0, false);
},1500);

Comments

  1. Lee Morris 2017-06-15

    Closing ticket due to time passed and lack of progress in the past few years. Any problems, please file a new ticket.

JSON Source