Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-14654] Android: Picker selected row does not highlight multi line text completely

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2013-10-28T21:51:45.000+0000
Affected Version/sRelease 2.1.4, Release 3.1.0, Release 3.1.1
Fix Version/s2013 Sprint 22, 2013 Sprint 22 API, Release 3.2.0
ComponentsAndroid
LabelsTitanium, android, mobilesdk, picker, qe-testadded
ReporterAshish Nigam
AssigneePing Wang
Created2013-07-25T10:52:24.000+0000
Updated2014-02-19T06:49:52.000+0000

Description

In Android if we create a picker and set the picker row text some large value that can not be set in a single line. Then picker selectedRow lighter does not highlight complete selected row. *Sample code to test issue**
var win1 = Titanium.UI.createWindow({
    title : 'Picker Demo',
    backgroundColor : '#fff'
});

var overlay = Ti.UI.createView({
    backgroundColor : '#000',
    opacity : 0.2
});
var column = Ti.UI.createPickerColumn();
var data = ["This is for testing purpose only", "Development purpose", "Multiple column Pickers with type plain, date and time pickers"];
for (var i = 0, ilen = data.length; i < ilen; i++) {

column.addRow(Ti.UI.createPickerRow({
    title : data[i]
}));
}
var picker = Ti.UI.createPicker({
    type : Ti.UI.PICKER_TYPE_PLAIN,
    //width : Ti.UI.FILL,
    selectionIndicator : true,
    bottom : 0,
    columns : [column],
    useSpinner : true
});
var container = Ti.UI.createView({
    bottom : 0,
    layout : 'vertical',
    height : Ti.UI.SIZE,
    width : Ti.UI.FILL
});

var backgroundView = Ti.UI.createView({
    height : Ti.UI.SIZE,
    width : Ti.UI.FILL,
    backgroundColor : 'transparent'
});
backgroundView.add(picker);
container.add(backgroundView);

picker.setSelectedRow(0, 1, false);

win1.add(overlay);
win1.add(container);

win1.open();
Steps: 1: Use the sample code in a Titanium Project and put it on app.js file. 2: Test the sample on any android device(preferred is Samsung S3 and Nexux). 3: Picker selected row highlighter does not highlight complete text.

Comments

  1. Ping Wang 2013-10-25

    PR: https://github.com/appcelerator/titanium_mobile/pull/4855
  2. Hieu Pham 2013-10-28

    CR + FR
  3. Samuel Dowse 2013-11-12

    Verified verified on: Mac OSX 10.9 Mavericks Titanium Studio, build: 3.2.0.201311122029 Titanium SDK, build: 3.2.0.v20131112123038 CLI: 3.2.0 Alloy: 1.3.0 Android Emulator: 2.3.3, 4.0.3 and 4.4 Picker highlights the complete row properly. Closing.

JSON Source