Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

Picker for Android is not show correct rows

$
0
0

I am creating a picker for android to show some numerical values, but it is only displaying the word [PickerRow] instead of the real labels here is my code

var picker = Ti.UI.createPicker({
        top : 20,
        selectionIndicator : true
    });
 
 
function addRow(text) {
        var row = Ti.UI.createPickerRow({
            id : text
        });
        var label = Ti.UI.createLabel({
            text : text,
            font : {
                fontSize : 22,
                fontWeight : 'bold'
            },
            color : 'black',
            width : '100%',
            textAlign : 'center',
            height : 40,
            backgroundColor : 'gray'
        });
        row.add(label);
        picker.add(row);
    }
 
    addRow('1435');
    addRow('1434');
    addRow('1433');
    addRow('1432');
    addRow('1431');
    addRow('1430');
    addRow('1429');
    addRow('1428');
 
formView.add(picker);

Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>