{ "id": "62670", "key": "TIMOB-2038", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "11243", "name": "Release 1.6.0 M10", "archived": true, "released": true, "releaseDate": "2011-02-21" } ], "resolution": { "id": "3", "description": "The problem is a duplicate of an existing issue.", "name": "Duplicate" }, "resolutiondate": "2011-04-15T03:08:47.000+0000", "created": "2011-04-15T03:08:46.000+0000", "priority": { "name": "Trivial", "id": "5" }, "labels": [ "android", "dialog", "feature", "input", "release-1.6.0" ], "versions": [], "issuelinks": [], "assignee": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-03T05:47:46.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "{html}

Add the possibility of a text box inside of an alert dialog to\ncatch user input? Code sample below...

\n
\nif (d.containsKey(\"hasInput\")) {\n    if (TiConvert.toBoolean(d, \"hasInput\")) {\n        Activity currentActivity = proxy.getTiContext().getTiApp().getCurrentActivity();\n        if (currentActivity == null) {\n            currentActivity = proxy.getTiContext().getActivity();\n        }\n        EditText input = new EditText(currentActivity);\n        builder.addView(input);\n    }\n}\n
\n

This code was written theoretically, but should show the gist of\nit. Possibly a new proxy such as Ti.UI.createInputDialog() should\nbe created for this?

\n

I.e, Ti.UI.createInputDialog({title: 'Hello', message: 'What is\nyour name?' hasInput: true}) would show us a standard dialog, only\nwith a text input attached. This would also need to be catered to\nin the fireEvent in order to extract the text.

\n

Theoretical code:

\n
\nvar input = Ti.UI.createInputDialog({title: 'Hello', message: 'What is your name?' hasInput: true});\n\ninput.addEventListener('click', function(e) {\n    alert(e.textValue); // made up return value\n});\n
\n

Andrew

{html}", "attachment": [], "flagged": false, "summary": "Android: Use addView in TiUIDialog to add option input box to alert", "creator": { "name": "andrewheebner", "key": "andrewheebner", "displayName": "Andrew Heebner", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "rpfeiffer", "key": "rpfeiffer", "displayName": "Ralf Pfeiffer", "active": true, "timeZone": "America/Los_Angeles" }, "environment": null, "comment": { "comments": [ { "id": "127322", "author": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Assigning to Don for triage.

\n

Worth noting that iOS CANNOT support this feature due to the HIG\nguidelines and dialog/error interfaces.

{html}", "updateAuthor": { "name": "stephentramer", "key": "stephentramer", "displayName": "Stephen Tramer", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:08:46.000+0000", "updated": "2011-04-15T03:08:46.000+0000" }, { "id": "127323", "author": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "body": "{html}

Android dialog already supports adding a view. It was added in\n1.5.0.

{html}", "updateAuthor": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2011-04-15T03:08:47.000+0000", "updated": "2011-04-15T03:08:47.000+0000" }, { "id": "408754", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing issue due to time passed and irrelevance of the ticket.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-03T05:47:46.000+0000", "updated": "2017-03-03T05:47:46.000+0000" } ], "maxResults": 3, "total": 3, "startAt": 0 } } }