[TIMOB-19827] Allow object type in Ti.UI.OptionDialog.options
GitHub Issue | n/a |
---|---|
Type | Improvement |
Priority | n/a |
Status | Open |
Resolution | Unresolved |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Android, iOS |
Labels | android, ios, optiondialog |
Reporter | Flavio De Stefano |
Assignee | Unknown |
Created | 2015-10-29T14:14:35.000+0000 |
Updated | 2018-10-03T11:07:55.000+0000 |
Description
It is currently not possible to use image options inside the
Ti.UI.OptionDialog
. The proposal is to introduce support those by making the options
property ready to hold either string- or object-values. That needs changes on both iOS and Android to achieve parity.
*Proposal*:
var win = Ti.UI.createWindow({
backgroundColor: "#fff"
});
var btn = Ti.UI.createButton({
title: "Show dialog"
});
win.add(btn);
btn.addEventListener("click", function() {
var dia = Ti.UI.createOptionDialog({
options: [{
title: "Appcelerator",
image: "appcelerator_small.png"
}, {
title: "Another option"
}, {
title: "Cancel",
}],
cancel: 2
});
dia.show();
});
win.open();
Attachments
File | Date | Size |
---|---|---|
destefanoflavio_2015-ott-29.jpg | 2015-10-29T14:14:30.000+0000 | 28828 |
https://github.com/appcelerator/titanium_mobile/pull/7374
Moved to TIMOB, added example code and a description.
Pausing this issue for now after discussing with [~kopiro] that we should wrap the image options as part of a refactoring that includes an object instead of string values inside the options property.