{ "id": "125462", "key": "TIMOB-16326", "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": "16092", "description": "2014 Sprint 08", "name": "2014 Sprint 08", "archived": true, "released": true, "releaseDate": "2014-04-24" }, { "id": "16093", "description": "2014 Sprint 08 SDK", "name": "2014 Sprint 08 SDK", "archived": true, "released": true, "releaseDate": "2014-04-24" }, { "id": "15422", "description": "Release 3.3.0", "name": "Release 3.3.0", "archived": false, "released": true, "releaseDate": "2014-07-16" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2014-04-16T01:30:34.000+0000", "created": "2014-01-27T20:52:56.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "module_animation", "qe-closed-3.3.0", "qe-testadded", "triage" ], "versions": [ { "id": "14982", "description": "Release 3.2.0", "name": "Release 3.2.0", "archived": false, "released": true, "releaseDate": "2013-12-19" } ], "issuelinks": [], "assignee": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "updated": "2014-07-27T00:52:41.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": "h3. Updated Test Case\r\n\r\n{code}\r\nvar win = Titanium.UI.createWindow();\r\n\r\nvar view = Titanium.UI.createView({\r\n backgroundColor:'#fff',\r\n bottom : '80%',\r\n height : '10%'\r\n});\r\nwin.add(view);\r\n\r\nvar anim = Titanium.UI.createAnimation({bottom:'5%', height:'95%'});\r\n\r\nwin.addEventListener('postlayout', function pl() {\r\nthis.removeEventListener('postlayout', pl);\r\nsetTimeout(function(){ view.animate(anim); }, 5000);\r\n});\r\n\r\nwin.open();\r\n{code}\r\n\r\nh3. Original Test Case\r\n\r\nFor Android, Example:\r\n\r\n{code}\r\nvar win = Titanium.UI.createWindow();\r\n\r\nvar view = Titanium.UI.createView({\r\n bottom:'10%',\r\n height:'10%'\r\n});\r\nwin.add(view);\r\n\r\nvar anim = Titanium.UI.createAnimation( bottom:'40%', height:'40%' );\r\n\r\nvar ready = false;\r\nwin.addEventListener('postlayout', function pl(){\r\n win.removeEventListener('postlayout', pl);\r\n ready = true;\r\n});\r\n\r\nfunction animIn(){\r\n if(ready){\r\n view.animate(anim);\r\n }\r\n}\r\n\r\n// alternate animIn() -----------------------\r\n\r\nfunction animIn(){\r\n if(ready){\r\n view.setHeight(100)/ view.height = 100; // tried both\r\n view.animate(anim);\r\n }\r\n}\r\n\r\n// animIn() is called later in the project after postlayout.\r\n{code}\r\n\r\nh3. Actual Result\r\nanimation starts but does not complete.\r\n\r\nAnother problem I am encountering is that if I reset the view's values, as shown in 'alternate animIn()', the animation will fail whether percentages are used or not. \r\n\r\nI have replaced all percentages in the project's animations with instances like this, for '40%' .. (Ti.Platform.displayCaps.platformHeight * .4)\r\n\r\nUnfortunately this method has proven to be unreliable as the platformHeight/width is returned incorrectly at times, noticed particularly during installation when device is at rest/sleep.\r\n\r\n\r\nh3. Expected Result\r\nAnimation should expand view to assigned height/width percentage and/or move to assigned top/bottom percentage.", "attachment": [ { "id": "45404", "filename": ".log", "author": { "name": "keylo", "key": "keylo", "displayName": "Keylo E.", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-01-27T20:53:00.000+0000", "size": 440038, "mimeType": "text/plain" }, { "id": "45405", "filename": "diagnostic1170399753915506377.log", "author": { "name": "keylo", "key": "keylo", "displayName": "Keylo E.", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-01-27T20:53:03.000+0000", "size": 15337, "mimeType": "text/plain" }, { "id": "45464", "filename": "screenshot-1.jpg", "author": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2014-01-29T17:26:25.000+0000", "size": 39091, "mimeType": "image/jpeg" }, { "id": "45465", "filename": "screenshot-2.jpg", "author": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2014-01-29T17:28:27.000+0000", "size": 36772, "mimeType": "image/jpeg" } ], "flagged": false, "summary": "Android: Animation with percentage behavior invert of iOS behavior", "creator": { "name": "keylo", "key": "keylo", "displayName": "Keylo E.", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "keylo", "key": "keylo", "displayName": "Keylo E.", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Titanium Studio 3.3.0", "comment": { "comments": [ { "id": "289850", "author": { "name": "keylo e.", "key": "keylo e.", "displayName": "Keylo E.", "active": true, "timeZone": "America/New_York" }, "body": "the above createAnimation() also has a duration value", "updateAuthor": { "name": "keylo e.", "key": "keylo e.", "displayName": "Keylo E.", "active": true, "timeZone": "America/New_York" }, "created": "2014-01-27T20:55:51.000+0000", "updated": "2014-01-27T20:55:51.000+0000" }, { "id": "289925", "author": { "name": "keylo e.", "key": "keylo e.", "displayName": "Keylo E.", "active": true, "timeZone": "America/New_York" }, "body": "Android Version 4.2.2\n", "updateAuthor": { "name": "keylo e.", "key": "keylo e.", "displayName": "Keylo E.", "active": true, "timeZone": "America/New_York" }, "created": "2014-01-28T05:13:05.000+0000", "updated": "2014-01-28T05:13:05.000+0000" }, { "id": "289926", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I have been unable to run the provided code on iOS and Android platforms. I fixed few issues but I still don't see an animation on the screen. Can you please double check the test code and make sure that it can run as it is on Android platform?", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-01-28T05:15:55.000+0000", "updated": "2014-01-28T05:15:55.000+0000" }, { "id": "289927", "author": { "name": "keylo e.", "key": "keylo e.", "displayName": "Keylo E.", "active": true, "timeZone": "America/New_York" }, "body": "this is just an example. I would have to pull pieces of larger parts from actual project but occurs in all instances in all files that I have included a createAnimation, which equates to about 10 different times. Are you copying and pasting this?", "updateAuthor": { "name": "keylo e.", "key": "keylo e.", "displayName": "Keylo E.", "active": true, "timeZone": "America/New_York" }, "created": "2014-01-28T05:20:58.000+0000", "updated": "2014-01-28T05:22:55.000+0000" }, { "id": "289928", "author": { "name": "keylo e.", "key": "keylo e.", "displayName": "Keylo E.", "active": true, "timeZone": "America/New_York" }, "body": "will try to do so. re-writing the entire project's animation is sapping time.", "updateAuthor": { "name": "keylo e.", "key": "keylo e.", "displayName": "Keylo E.", "active": true, "timeZone": "America/New_York" }, "created": "2014-01-28T05:23:46.000+0000", "updated": "2014-01-28T05:23:46.000+0000" }, { "id": "289929", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "We understand but it would be great if you can provide us a complete test case as that helps us to troubleshoot these issues faster and making sure that we are resolving the same issue that you are encountering.", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-01-28T05:25:12.000+0000", "updated": "2014-01-28T05:25:12.000+0000" }, { "id": "289930", "author": { "name": "keylo e.", "key": "keylo e.", "displayName": "Keylo E.", "active": true, "timeZone": "America/New_York" }, "body": "Are you copying and pasting this?\nIf so I assume you are calling the animation somewhere, and obviously opening the window.\n", "updateAuthor": { "name": "keylo e.", "key": "keylo e.", "displayName": "Keylo E.", "active": true, "timeZone": "America/New_York" }, "created": "2014-01-28T05:26:01.000+0000", "updated": "2014-01-28T05:26:01.000+0000" }, { "id": "289931", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I copied the provided code, fixed a couple of syntax errors and opened the window but did not see the animation.", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-01-28T05:28:36.000+0000", "updated": "2014-01-28T05:28:36.000+0000" }, { "id": "289933", "author": { "name": "keylo e.", "key": "keylo e.", "displayName": "Keylo E.", "active": true, "timeZone": "America/New_York" }, "body": "Revised, tested, copied and pasted. iOS works as expected, Android 4.2.2 seems to invert.\n\nvar win = Titanium.UI.createWindow();\n\nvar view = Titanium.UI.createView({\n\tbackgroundColor:'#fff',\n\tbottom : '80%',\n\theight : '10%'\n});\nwin.add(view);\n\nvar anim = Titanium.UI.createAnimation({bottom:'5%', height:'95%'});\n\nwin.addEventListener('postlayout', function pl() {\n\tthis.removeEventListener('postlayout', pl);\n\tsetTimeout(function(){\n\t\tview.animate(anim);\n\t}, 5000);\n});\n\nwin.open();", "updateAuthor": { "name": "keylo e.", "key": "keylo e.", "displayName": "Keylo E.", "active": true, "timeZone": "America/New_York" }, "created": "2014-01-28T05:56:13.000+0000", "updated": "2014-01-28T05:56:13.000+0000" }, { "id": "289935", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Moving this ticket to engineering as I can reproduce this issue with Android Galaxy Nexus device. Android animation is invert of iOS animation. \r\n\r\nIt appears to be a regression with 3.2.0 release as the behavior is similar to iOS platform with 3.1.3 release. There is another issue with 3.1.3 release though (view animated on splash screen) but that is most likely unrelated to this ticket.", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-01-28T06:06:28.000+0000", "updated": "2014-01-28T06:12:31.000+0000" }, { "id": "289937", "author": { "name": "keylo e.", "key": "keylo e.", "displayName": "Keylo E.", "active": true, "timeZone": "America/New_York" }, "body": "This example should simply place a white box atop the screen without animation and fails on Android.\r\n\r\n\r\nvar h = Ti.Platform.displayCaps.platformHeight;\r\n\r\nvar win = Titanium.UI.createWindow();\r\n\r\nvar view = Titanium.UI.createView({\r\n\tbackgroundColor:'#fff',\r\n\tbottom : (h * .5), // 300 works\r\n\theight : (h * .9) // 1000 works\r\n});\r\nwin.add(view);\r\n\r\n// var anim = Titanium.UI.createAnimation({bottom:0});\r\n\r\nwin.addEventListener('postlayout', function pl() {\r\n\tthis.removeEventListener('postlayout', pl);\r\n\tsetTimeout(function(){\r\n\t\t// view.bottom = (h * .8);\r\n\t\t// view.animate(anim);\r\n\t}, 10000);\r\n});\r\n\r\nwin.open();\r\n", "updateAuthor": { "name": "keylo e.", "key": "keylo e.", "displayName": "Keylo E.", "active": true, "timeZone": "America/New_York" }, "created": "2014-01-28T06:30:45.000+0000", "updated": "2014-01-28T07:36:17.000+0000" }, { "id": "289945", "author": { "name": "keylo e.", "key": "keylo e.", "displayName": "Keylo E.", "active": true, "timeZone": "America/New_York" }, "body": "my tests are showing that the Ti.Platform.displayCaps.platformHeight returns 1920, yet if I place the view's bottom at 900 it is off the screen, at 500 it is near the top. 1920 is correct.", "updateAuthor": { "name": "keylo e.", "key": "keylo e.", "displayName": "Keylo E.", "active": true, "timeZone": "America/New_York" }, "created": "2014-01-28T07:33:29.000+0000", "updated": "2014-01-28T07:34:53.000+0000" }, { "id": "290236", "author": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "body": "I tried with latest master in Google Nexus and Galaxy note and seems working. See the attached images.", "updateAuthor": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2014-01-29T17:23:32.000+0000", "updated": "2014-01-29T17:23:32.000+0000" }, { "id": "290238", "author": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Before animation", "updateAuthor": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2014-01-29T17:26:25.000+0000", "updated": "2014-01-29T17:26:25.000+0000" }, { "id": "290239", "author": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "body": "After animation", "updateAuthor": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2014-01-29T17:28:27.000+0000", "updated": "2014-01-29T17:28:27.000+0000" }, { "id": "290272", "author": { "name": "keylo e.", "key": "keylo e.", "displayName": "Keylo E.", "active": true, "timeZone": "America/New_York" }, "body": "still same on samsung-SGH-1537", "updateAuthor": { "name": "keylo e.", "key": "keylo e.", "displayName": "Keylo E.", "active": true, "timeZone": "America/New_York" }, "created": "2014-01-29T19:01:48.000+0000", "updated": "2014-01-29T19:01:48.000+0000" }, { "id": "290814", "author": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~sunila] Have you compared the behavior on iOS and Android platforms? You should be able to see the behavior difference more clearly.", "updateAuthor": { "name": "ragrawal", "key": "ragrawal", "displayName": "Ritu Agrawal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2014-02-02T23:19:24.000+0000", "updated": "2014-02-02T23:19:24.000+0000" }, { "id": "292761", "author": { "name": "keylo e.", "key": "keylo e.", "displayName": "Keylo E.", "active": true, "timeZone": "America/New_York" }, "body": "No update?", "updateAuthor": { "name": "keylo e.", "key": "keylo e.", "displayName": "Keylo E.", "active": true, "timeZone": "America/New_York" }, "created": "2014-02-12T19:16:35.000+0000", "updated": "2014-02-12T19:17:16.000+0000" }, { "id": "293944", "author": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "body": "I ran the the updated test case and I get the results as shown in the attachment.\nYes, when I run in the IOS, I get the inverse but to me, Android behavior looks correct.\nHere is the text from the documentation (for default layout, ie composite)\n\nheight & bottom specified\tChild positioned bottom units from parent's bottom, using specified height.\n\nHere the specified height is 10% initially and the bottom is 80%, so the view with height 10% is shown with top 10% and bottom 80%. After the animation the height is 95% and bottom is 5% which means that the view should be drawn with 95% height with a 5% gap at the bottom.", "updateAuthor": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2014-02-20T16:40:59.000+0000", "updated": "2014-02-20T16:40:59.000+0000" }, { "id": "294040", "author": { "name": "keylo e.", "key": "keylo e.", "displayName": "Keylo E.", "active": true, "timeZone": "America/New_York" }, "body": "iOS works, Android on samsung-SGH-1537 (Galaxy S4 Active) does not. \r\nNot sure if you were confused or simply switched your test cases in your report. I'll attach my compared results from today. \r\n\r\nSimple test case shows difference.\r\n\r\nvar h = Ti.Platform.displayCaps.platformHeight;\r\nvar win = Titanium.UI.createWindow();\r\nvar view = Titanium.UI.createView({\r\n\tbackgroundColor : '#fff',\r\n\tbottom : (h * .2),\r\n\theight : (h * .9)\r\n});\r\nwin.add(view);\r\nwin.open();\r\n\r\niOS = working\r\n!http://pbrd.co/1fDuVaa!\r\nhttp://pbrd.co/1fDuVaa\r\n\r\nS4 Active = Not working\r\n!http://pbrd.co/1fDvEbd!\r\nhttp://pbrd.co/1fDvEbd\r\n\r\nIs this open to debate for some reason? Ritu Agrawal has confirmed my results. \r\nHas caused a two month stall because I am not able to accommodate animation on the newest model from the most popular manufacturer. Seems rather important to me. ", "updateAuthor": { "name": "keylo e.", "key": "keylo e.", "displayName": "Keylo E.", "active": true, "timeZone": "America/New_York" }, "created": "2014-02-20T23:19:53.000+0000", "updated": "2014-02-20T23:29:32.000+0000" }, { "id": "294929", "author": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Make sure that the new height and width(if changed as part of the animation) is used when calculating the left or top for animation.\r\n\r\nhttps://github.com/appcelerator/titanium_mobile/pull/5393", "updateAuthor": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2014-02-27T15:20:29.000+0000", "updated": "2014-02-27T15:20:29.000+0000" }, { "id": "294933", "author": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "body": "I was trying with pre-honeycomb version and didn't see the problem. I was able to reproduce it with my Nexus and have submitted the fix. \nRegarding the platformHeight bug, I couldn't reproduce the issue.", "updateAuthor": { "name": "sunila", "key": "sunila", "displayName": "Sunila", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2014-02-27T15:25:21.000+0000", "updated": "2014-02-27T15:25:21.000+0000" }, { "id": "303464", "author": { "name": "dpandey", "key": "dpandey", "displayName": "Deepti Pandey", "active": true, "timeZone": "Asia/Kolkata" }, "body": "Verified as FIXED using :\r\nMac :10.9.2\r\nAppcelerator Studio, build: 3.3.0.201405011408\r\nSDK - 3.3.0.v20140502133323\r\nacs-1.0.14\r\nalloy-1.4.0-dev\r\nnpm-1.3.2\r\ntitanium-3.3.0-dev\r\ntitanium-code-processor-1.1.1\r\nXcode :5.1.1\r\nDevices used: Nexus 5 (4.4.2) , iPhone 5s (7.1.1)\r\nThe new height and width(if changed as part of the animation) is used when calculating the left or top for animation.\r\nHence closing as FIXED.", "updateAuthor": { "name": "dpandey", "key": "dpandey", "displayName": "Deepti Pandey", "active": true, "timeZone": "Asia/Kolkata" }, "created": "2014-05-05T11:10:44.000+0000", "updated": "2014-05-05T11:10:44.000+0000" } ], "maxResults": 23, "total": 23, "startAt": 0 } } }