Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-19827] Allow object type in Ti.UI.OptionDialog.options

GitHub Issuen/a
TypeImprovement
Priorityn/a
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
ComponentsAndroid, iOS
Labelsandroid, ios, optiondialog
ReporterFlavio De Stefano
AssigneeUnknown
Created2015-10-29T14:14:35.000+0000
Updated2018-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

FileDateSize
destefanoflavio_2015-ott-29.jpg2015-10-29T14:14:30.000+000028828

Comments

  1. Flavio De Stefano 2015-10-29

    https://github.com/appcelerator/titanium_mobile/pull/7374
  2. Hans Knöchel 2015-10-29

    Moved to TIMOB, added example code and a description.
  3. Hans Knöchel 2015-11-02

    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.

JSON Source