{ "id": "155093", "key": "TIMOB-20451", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "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": "17706", "name": "Release 5.4.0", "archived": false, "released": true, "releaseDate": "2016-08-11" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2016-04-28T06:58:28.000+0000", "created": "2016-02-24T12:22:51.000+0000", "priority": { "name": "Medium", "id": "3" }, "labels": [], "versions": [ { "id": "16997", "name": "Release 5.2.0", "archived": false, "released": true, "releaseDate": "2016-02-23" } ], "issuelinks": [ { "id": "50754", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "155275", "key": "TIMOB-20498", "fields": { "summary": "Android: Deprecate activity*Animation", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "priority": { "name": "High", "id": "2" }, "issuetype": { "id": "7", "description": "gh.issue.story.desc", "name": "Story", "subtask": false } } } }, { "id": "50685", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "inwardIssue": { "id": "151488", "key": "TIMOB-19580", "fields": { "summary": "Customize Activity Transitions", "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" } }, "priority": { "name": "Medium", "id": "3" }, "issuetype": { "id": "8", "description": "A technical task.", "name": "Technical task", "subtask": true } } } } ], "assignee": { "name": "ssombhatla", "key": "ssombhatla", "displayName": "Srikanth Sombhatla", "active": false, "timeZone": "Asia/Singapore" }, "updated": "2016-07-14T22:25:24.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": "With TIMOB-19580 we have introduced {{activity*Transition}} properties for {{Ti.UI.Window}}.\r\n\r\nWe also still have {{activity*Animation}} properties for {{Ti.UI.Window.open()}} and {{Ti.UI.Window.close()}}.\r\n\r\nh4. The Issue\r\n\r\nThis is confusing, but also seems to not always work as expected:\r\n\r\nIf you try the _Activity Transitions_ example in the [Ti 5.2.0 Sample App|https://github.com/appcelerator-developer-relations/appc-sample-ti520] and set all {{activity*Transition}} properties to {{TRANSITION_NONE}} you will see that if you use the system navigation bar (or hardware) back button in Window B it will indeed close without animation. But if you use the Action Bar Level Up icon (which simply calls {{Ti.UI.Window.close()}}) it will fade out.\r\n\r\nh4. Solution\r\n\r\nWe should:\r\n\r\n1. Make sure that if I call {{Ti.UI.Window.close()}} without {{activityEnterAnimation}} and {{activityExitAnimation}}, it will honour {{Ti.UI.Window.activityReturnTransition}}.\r\n\r\n2. Deprecate and in 6.0 remove the {{activity*Animation}} properties.\r\n\r\nh4. Source\r\n\r\nRelated code:\r\n\r\nhttps://github.com/appcelerator/titanium_mobile/blob/a67afc862cd344bf1293b16142317aad0b5ee122/android/modules/ui/src/java/ti/modules/titanium/ui/WindowProxy.java#L135-L184", "attachment": [], "flagged": false, "summary": "Window.close should use new activity*Transition instead of activity*Animation or default", "creator": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "subtasks": [], "reporter": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "environment": "SDK 5.2.0.GA", "closedSprints": [ { "id": 624, "state": "closed", "name": "2016 Sprint 09 SDK", "startDate": "2016-04-23T00:39:45.452Z", "endDate": "2016-05-07T00:39:00.000Z", "completeDate": "2016-05-09T03:43:10.279Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "383658", "author": { "name": "ssombhatla", "key": "ssombhatla", "displayName": "Srikanth Sombhatla", "active": false, "timeZone": "Asia/Singapore" }, "body": "PR: https://github.com/appcelerator/titanium_mobile/pull/7961\r\nUsing {{Ti.UI.Window.close()}} or device back should close with transition. \r\n\r\n{code}\r\nTi.UI.setBackgroundColor('#000');\r\nvar win = Ti.UI.createWindow({\r\n backgroundColor: 'black',\r\n fullscreen: false,\r\n title: 'Master'\r\n});\r\n \r\nvar IMG_BASE = 'https://github.com/appcelerator/titanium_mobile/raw/master/demos/KitchenSink/Resources/images/';\r\nvar defaultFontSize = Ti.Platform.name === 'android' ? 16 : 14;\r\n \r\nvar tableData = [];\r\n \r\nfor (var i=1; i<=20; i++){\r\n var row = Ti.UI.createTableViewRow({\r\n className:'forumEvent', // used to improve table performance\r\n selectedBackgroundColor:'white',\r\n rowIndex:i, // custom property, useful for determining the row during events\r\n height:110\r\n });\r\n \r\n var avatar = createAvatar();\r\n avatar.transitionName = \"avatar\";\r\n row.add(avatar);\r\n \r\n var labelUserName = Ti.UI.createLabel({\r\n color:'#576996',\r\n font:{fontFamily:'Arial', fontSize:defaultFontSize+6, fontWeight:'bold'},\r\n text:'Fred Smith ' + i,\r\n left:70, top: 6,\r\n width:200, height: 30,\r\n });\r\n row.add(labelUserName);\r\n \r\n var labelDetails = Ti.UI.createLabel({\r\n color:'#222',\r\n font:{fontFamily:'Arial', fontSize:defaultFontSize+2, fontWeight:'normal'},\r\n text:'Replied to post with id ' + randomInt(1000) + '.',\r\n left:70, top:44,\r\n width:360\r\n });\r\n row.add(labelDetails);\r\n \r\n var imageCalendar = Ti.UI.createImageView({\r\n image:IMG_BASE + 'custom_tableview/eventsButton.png',\r\n left:70, bottom: 2,\r\n width:32, height: 32\r\n });\r\n row.add(imageCalendar);\r\n \r\n var labelDate = Ti.UI.createLabel({\r\n color:'#999',\r\n font:{fontFamily:'Arial', fontSize:defaultFontSize, fontWeight:'normal'},\r\n text:'on ' + randomInt(30) + ' Nov 2012',\r\n left:105, bottom:10,\r\n width:200, height:20\r\n });\r\n row.add(labelDate);\r\n \r\n tableData.push(row);\r\n}\r\n \r\nvar tableView = Ti.UI.createTableView({\r\n backgroundColor:'white',\r\n data:tableData\r\n});\r\n \r\ntableView.addEventListener('click', function(e){\r\n\tvar masterAvatar = e.row.children[0];\r\n\tvar masterUsername = e.row.children[1];\r\n\t\r\n\tvar win2 = Ti.UI.createWindow({\r\n\tanimated: true,\r\n\t layout: 'vertical',\r\n\t backgroundColor: 'white',\r\n\t title: 'Details-',\r\n\t activityEnterAnimation: Ti.Android.R.anim.fade_in,\r\n activityExitAnimation: Ti.Android.R.anim.fade_out\r\n\t});\r\n\t\r\n\tvar avatar = createAvatar();\r\n\tavatar.width = 80;\r\n\tavatar.height = 80;\r\n\tavatar.left = 100;\r\n\tavatar.transitionName = \"avatar\";\r\n \tvar labelUserName2 = Ti.UI.createLabel({\r\n\t color:'#576996',\r\n\t font:{fontFamily:'Arial', fontSize:defaultFontSize+6, fontWeight:'bold'},\r\n\t text:'Tap to close',\r\n\t top: 20,\r\n\t width:250, height: 60,\r\n\t transitionName: \"username\",\r\n\t });\r\n\tlabelUserName2.addEventListener('click', function() {\r\n\t\twin2.close()\r\n\t});\r\n\t \r\n\twin2.add(avatar) \r\n win2.add(labelUserName2);\r\n\twin2.addSharedElement(masterAvatar, \"avatar\");\r\n\twin2.addSharedElement(masterUsername, \"username\");\r\n\twin2.open(); \r\n});\r\nwin.add(tableView);\r\nwin.open();\r\n \r\nfunction createAvatar() {\r\n var avatar = Ti.UI.createView({\r\n backgroundColor: 'green',\r\n left:10, top:5,\r\n width:50, height:50,\r\n });\r\n return avatar; \r\n}\r\n\r\n// generate random number, used to make each row appear distinct for this example\r\nfunction randomInt(max){\r\n return Math.floor(Math.random() * max) + 1;\r\n}\r\n{code}", "updateAuthor": { "name": "ssombhatla", "key": "ssombhatla", "displayName": "Srikanth Sombhatla", "active": false, "timeZone": "Asia/Singapore" }, "created": "2016-04-22T08:48:43.000+0000", "updated": "2016-04-22T08:48:43.000+0000" }, { "id": "383678", "author": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "body": "We should move this to 5.4.0", "updateAuthor": { "name": "hknoechel", "key": "hansknoechel", "displayName": "Hans Knöchel", "active": true, "timeZone": "Europe/Berlin" }, "created": "2016-04-22T15:51:33.000+0000", "updated": "2016-04-22T15:51:33.000+0000" }, { "id": "384159", "author": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "body": "PR merged", "updateAuthor": { "name": "msamah", "key": "msamah", "displayName": "Ashraf Abu", "active": false, "timeZone": "Asia/Singapore" }, "created": "2016-04-28T06:58:01.000+0000", "updated": "2016-04-28T06:58:01.000+0000" }, { "id": "384447", "author": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "body": "Thanks [~ssombhatla]!\r\n\r\n[~msamah] The PR deals with #1 - what are your thoughts on #2?\r\n\r\n* Deprecate and in 6.0 remove the {{activity*Animation}} properties.", "updateAuthor": { "name": "fokkezb", "key": "fokke", "displayName": "Fokke Zandbergen", "active": true, "timeZone": "Europe/Amsterdam" }, "created": "2016-05-02T12:51:35.000+0000", "updated": "2016-05-02T13:11:51.000+0000" }, { "id": "388235", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~msamah], I have verified the fix for #1, & as [~fokkezb] commented are we doing anything for #2.\r\nI am gonna leave it resolved as the fix is just for #1 as of now.\r\n\r\nEnvironment:\r\nAppc Studio : 4.6.0.201605201934\r\nTi SDK : 5.4.0.v20160608165242\r\nTi CLI : 5.0.8\r\nAlloy : 1.8.7\r\nMAC El Capitan : 10.11.4\r\nAppc NPM : 4.2.7-2\r\nAppc CLI : 5.4.0-11\r\nNode: 4.4.4\r\nNexus 6 - Android 6.0.0", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-06-13T21:27:06.000+0000", "updated": "2016-06-13T21:28:06.000+0000" }, { "id": "390742", "author": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Closing.\r\n\r\n", "updateAuthor": { "name": "lchoudhary", "key": "lchoudhary", "displayName": "Lokesh Choudhary", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2016-07-14T22:25:18.000+0000", "updated": "2016-07-14T22:25:18.000+0000" } ], "maxResults": 7, "total": 7, "startAt": 0 } } }