[TIMOB-7433] Android: usespinner picker and titanium.UI.PICKER_TYPE_PLAIN not rendering when used together
GitHub Issue | n/a |
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2013-03-14T08:57:29.000+0000 |
Affected Version/s | Release 2.0.1 |
Fix Version/s | 2013 Sprint 06 |
Components | Android |
Labels | android |
Reporter | Devang Gandhi |
Assignee | jithinpv |
Created | 2012-01-26T15:10:09.000+0000 |
Updated | 2017-03-29T17:57:04.000+0000 |
Description
When adding a picker to an Android option dialog a picker with properties type:"PLAIN" and useSpinner:"true" does not render. A "PLAIN" picker with useSpinner "false" works fine, as does a "DATE" picker with useSpinner "true". As a note, this combination of properties works fine in an option dialog on SDK 1.7.5.
here is the code sample:
var win = Ti.UI.createWindow({
backgroundColor : "white"
});
var button = Ti.UI.createButton({
title : "press me",
width : 100,
height : 50
});
win.add(button);
var picker = Ti.UI.createPicker({
useSpinner:true,
type:Titanium.UI.PICKER_TYPE_PLAIN
});
var data = [];
data.push(Ti.UI.createPickerRow({
title : "Test",
}));
picker.add(data);
button.addEventListener("click", function() {
var dialog = Titanium.UI.createOptionDialog();
var root = Ti.UI.createView({});
var v = Ti.UI.createView({width:300, height:200});
root.add(v);
v.add(picker);
dialog.title = "test";
dialog.buttonNames = ['Cancel', 'OK'];
dialog.androidView = root;
dialog.show();
});
win.open();
Attachments
File | Date | Size |
app.js | 2012-01-26T15:10:09.000+0000 | 708 |
i have found no combination of using useSpinner and getting the information to appear in a picker. This issue is forcing me to write my own optionDialog code.
Tested with 2.0.1GA2 on a Samsung Galaxy S2, issue still exists.
Issue does not reproduces with Titanium Studio, build: 3.0.1.201212181159 Titanium SDK version: 3.1.0 (03/11/13 15:43 0c88429) Titanium SDK version: 3.0.2 (02/07/13 16:46 a4def81) Device: Samsung galaxy s duos Android version: 4.0.4
Closing ticket with reference to the above comments.