Titanium custom picker not working

You must Login before you can answer or comment on any questions.

Hi,

The picker with label example from api docs is not working. It displays [PickerRow] and not the actual text in the label. Any idea???

var picker = Titanium.UI.createPicker();
var row = Titanium.UI.createPickerRow();
var label = Titanium.UI.createLabel({
    text:'test row',
    font:{fontSize:14,fontWeight:'bold'},
    color:'#000',
    width:'auto',
    height:'auto'
});
row.add(label);
picker.add(row);

— asked 2 years ago by Zarir Bhesania
1 Comment
  • It shows 'PickerRow does not support child controls' warning in the emulator

    — commented 2 years ago by Zarir Bhesania

1 Answer

Accepted Answer

Also from the API Docs (Very bottom of the picker object page):

"Titanium's Android picker control (both the native and the useSpinner variety) does not support/display views that are added to picker rows. Only the title of the row will be displayed within the control. "

So, for android just use var row = Titanium.UI.createPickerRow({title:'test row'});

Your Answer

Think you can help? Login to answer this question!