{ "id": "99308", "key": "TIMOB-10780", "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": "15927", "description": "2014 Sprint 04", "name": "2014 Sprint 04", "archived": true, "released": true, "releaseDate": "2014-02-28" }, { "id": "15929", "description": "2014 Sprint 04 API", "name": "2014 Sprint 04 API", "archived": true, "released": true, "releaseDate": "2014-02-28" } ], "resolution": { "id": "2", "description": "The problem described is an issue which will never be fixed.", "name": "Won't Fix" }, "resolutiondate": "2014-02-24T22:24:57.000+0000", "created": "2012-08-16T02:29:14.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [ "api", "supportTeam" ], "versions": [ { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" } ], "issuelinks": [], "assignee": { "name": "ingo", "key": "ingo", "displayName": "Ingo Muschenetz", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-29T17:47:35.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": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "It would be nice to have an option to show activity indicator on AlertDialog view.\r\n\r\nFor example:\r\n\r\n!http://mobiledevelopertips.com/wp-content/uploads/2010/02/alert3-204x300.png!\r\n\r\nAlertDialog can be \"showIndicator\" option or something like that.\r\n\r\n{code}var dialog = Ti.UI.createAlertDialog({\r\n title: 'Loading...',\r\n message: 'Please wait, loading assets.',\r\n showIndicator: true\r\n});{code}", "attachment": [], "flagged": false, "summary": "iOS: Activity Indicator for AlertDialog", "creator": { "name": "hdogan", "key": "hdogan", "displayName": "Hidayet Dogan", "active": true, "timeZone": "Europe/Istanbul" }, "subtasks": [], "reporter": { "name": "hdogan", "key": "hdogan", "displayName": "Hidayet Dogan", "active": true, "timeZone": "Europe/Istanbul" }, "environment": "iOS", "comment": { "comments": [ { "id": "217657", "author": { "name": "hdogan", "key": "hdogan", "displayName": "Hidayet Dogan", "active": true, "timeZone": "Europe/Istanbul" }, "body": "I'm waiting PR found at https://github.com/appcelerator/titanium_mobile/pull/2789 for issue TIMOB-10507.\r\n\r\nI may use new \"style\" property instead of \"showIndicator\" property, if it's accepted and merged.", "updateAuthor": { "name": "hdogan", "key": "hdogan", "displayName": "Hidayet Dogan", "active": true, "timeZone": "Europe/Istanbul" }, "created": "2012-09-05T12:40:43.000+0000", "updated": "2012-09-05T12:40:43.000+0000" }, { "id": "228062", "author": { "name": "vascofazmail", "key": "vascofazmail", "displayName": "Vasco Borges", "active": true, "timeZone": "Europe/London" }, "body": "I've been able to do this by editing TiUIAlertDialogProxy.m on the Titanium SDK and adding the following code, just after {color:blue}[alert show]{color}.\r\n\r\n{code} \r\nBOOL showIndicator = [TiUtils boolValue:[self valueForKey:@\"showIndicator\"] def:NO];\r\nif(showIndicator==YES){\r\n UIActivityIndicatorView *indicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge];\r\n \r\n // Adjust the indicator so it is up a few pixels from the bottom of the alert\r\n indicator.center = CGPointMake(alert.bounds.size.width / 2, alert.bounds.size.height - 45);\r\n [indicator startAnimating];\r\n [alert addSubview:indicator];\r\n [indicator release];\r\n}\r\n{code} \r\n\r\nThen I just set the property {color:blue}showIndicator{color} to {color:blue}true{color}. In order to remove the default button I set the property {color:blue}buttonNames{color} to an empty array {color:blue}[ ]{color}.", "updateAuthor": { "name": "vascofazmail", "key": "vascofazmail", "displayName": "Vasco Borges", "active": true, "timeZone": "Europe/London" }, "created": "2012-11-20T20:14:55.000+0000", "updated": "2012-11-20T20:14:55.000+0000" }, { "id": "245704", "author": { "name": "vkorol", "key": "vkorol", "displayName": "Viktor Korol", "active": true, "timeZone": "Europe/Istanbul" }, "body": "Please implement solution from Vasco Borges.", "updateAuthor": { "name": "vkorol", "key": "vkorol", "displayName": "Viktor Korol", "active": true, "timeZone": "Europe/Istanbul" }, "created": "2013-04-04T12:24:21.000+0000", "updated": "2013-04-04T12:24:21.000+0000" }, { "id": "249014", "author": { "name": "wood1k", "key": "wood1k", "displayName": "Alexey Chulochnikov", "active": true, "timeZone": "Europe/Helsinki" }, "body": "Please implement solution from Vasco Borges.", "updateAuthor": { "name": "wood1k", "key": "wood1k", "displayName": "Alexey Chulochnikov", "active": true, "timeZone": "Europe/Helsinki" }, "created": "2013-04-25T10:47:54.000+0000", "updated": "2013-04-25T10:47:54.000+0000" }, { "id": "249016", "author": { "name": "hdogan", "key": "hdogan", "displayName": "Hidayet Dogan", "active": true, "timeZone": "Europe/Istanbul" }, "body": "That implementation is currently crashes application. Tested on iOS 6 SDK with Titanium SDK 3. I'll try to fix implement if I find a spare time.", "updateAuthor": { "name": "hdogan", "key": "hdogan", "displayName": "Hidayet Dogan", "active": true, "timeZone": "Europe/Istanbul" }, "created": "2013-04-25T11:06:35.000+0000", "updated": "2013-04-25T11:06:35.000+0000" }, { "id": "249114", "author": { "name": "vascofazmail", "key": "vascofazmail", "displayName": "Vasco Borges", "active": true, "timeZone": "Europe/London" }, "body": "Works with Titanium SDK v2.x. Tested on iOS v4, v5, v6.", "updateAuthor": { "name": "vascofazmail", "key": "vascofazmail", "displayName": "Vasco Borges", "active": true, "timeZone": "Europe/London" }, "created": "2013-04-26T10:56:52.000+0000", "updated": "2013-04-26T10:56:52.000+0000" }, { "id": "294492", "author": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "body": "While Android allows customization of the Ti.UI.AlertDialog element via the androidView property, the options on iOS are pretty limited.\r\niOS explicitly forbids subclassing the UIAlertView element or changing the view hierarchy, so the solution proposed above is a non starter.\r\n\r\nSee\r\nhttps://developer.apple.com/library/ios/documentation/uikit/reference/UIAlertView_Class/UIAlertView/UIAlertView.html,\r\nhttps://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/UIKitUICatalog/UIAlertView.html#//apple_ref/doc/uid/TP40012857-UIAlertView\r\n\r\nThat being said, you can always fake the look and feel of a UIAlertView using regular Ti.UI.View with rounded borders on iOS. \r\nThis of course would mean that the other UI elements on the screen would be inter-actable and it would not behave as a true alert view.\r\n\r\nTo overcome this you could stick your custom view inside a transparent Ti.UI.Window on iOS and open this window. \r\nIn this case you should be prepared for the blur and focus events of your top Ti.UI.Window when the window with the fake alert view is opened and closed.\r\n\r\nEither ways we will not be implementing this in our SDK as the workarounds can be implemented in JS.", "updateAuthor": { "name": "vduggal", "key": "vduggal", "displayName": "Vishal Duggal", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2014-02-24T22:24:57.000+0000", "updated": "2014-02-24T22:24:57.000+0000" }, { "id": "416210", "author": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "body": "Closing ticket as \"Won't Fix\", with reference to the above comments.", "updateAuthor": { "name": "lmorris", "key": "lmorris", "displayName": "Lee Morris", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2017-03-29T17:47:35.000+0000", "updated": "2017-03-29T17:47:35.000+0000" } ], "maxResults": 13, "total": 13, "startAt": 0 } } }