Hi All,
I have used titanium picker code for both android and ios.
When I run the code in android emulator It is working fine.
When I run the same code in IOS simulator it is not showing properly
Can any one help me out , How to support dropdown list element to both android and IOS?
index.js
var loginView = Ti.UI.createView({ width : 'auto', layout : 'vertical', height : 'auto' }); var textLabel = Ti.UI.createLabel({ top : '70', text : 'Select Institution', textAlign : Ti.UI.TEXT_ALIGNMENT_LEFT, left : '3', height : 'auto', width : 'auto', color : '#000' }); var dataPicker = Ti.UI.createPicker({ editable : true, width : '220', height : '40', left : '3', borderWidth : '3', borderColor : '#44a5df' }); var langLabel = Ti.UI.createLabel({ top : '5', text : 'Select Language', left : '3', textAlign : Ti.UI.TEXT_ALIGNMENT_LEFT, height : 'auto', width : 'auto', color : '#000', }); var langPicker = Ti.UI.createPicker({ editable : true, width : '220', height : '40', left : '3', borderWidth : '3', borderColor : '#44a5df' }); var goButton = Ti.UI.createButton({ top : "5", title : 'GO', backgroundColor : "#3d464f", height : '30', width : '50', left : '6', backgroundSelectedColor : '#104dc6', color : '#fff', }); //Adding Data to dataPicker var data = []; for ( i = 0; i < institutionsData.length; i++) { var institutionData = institutionsData[i]; data[i] = Ti.UI.createPickerRow({ title : 'Test Drive', }); } data[institutionsData.length] = Titanium.UI.createPickerRow({ title : 'Others', }); dataPicker.add(data); dataPicker.selectionIndicator = true; dataPicker.setSelectedRow(0, 1, false); //Adding Data to Language dataPicker var languageData = []; languageData[0] = Ti.UI.createPickerRow({ title : 'English', }); languageData[1] = Ti.UI.createPickerRow({ title : 'Español', }); langPicker.add(languageData); langPicker.selectionIndicator = true; langPicker.setSelectedRow(0, 1, false); loginView.add(textLabel); loginView.add(dataPicker); loginView.add(langLabel); loginView.add(langPicker); loginView.add(goButton); $.win.add(loginView); $.win.open();OUTPUT :
android:
IOS: