{ "id": "114536", "key": "TIMOB-14299", "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": [], "resolution": null, "resolutiondate": null, "created": "2013-05-17T17:00:31.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [], "versions": [ { "id": "15478", "description": "Release 3.1.1", "name": "Release 3.1.1", "archived": true, "released": true, "releaseDate": "2013-06-17" } ], "issuelinks": [], "assignee": null, "updated": "2018-02-28T20:04:04.000+0000", "status": { "description": "This issue was once resolved, but the resolution was deemed incorrect. From here issues are either marked assigned or resolved.", "name": "Reopened", "id": "4", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "On Android device, views with Opacity: 0 are shown and views that had an animation turn their opacity to 1, do not become visible again when setting their opacity to 1. They do become visible again if another animation changes their opacity to the desired value.\r\n\r\nTo sum it up:\r\nAnimation works both ways.\r\n\r\nSetting view's opacity to 0 on creation, doesn't work. Setting later a view's opacity to 1 (myView.opacity = 1) doesn't work either.\r\n\r\n*Test case*\r\n{code:javascript}\r\nvar images = ['http://d24w6bsrhbeh9d.cloudfront.net/photo/aX0D7y2_460s.jpg', 'http://d24w6bsrhbeh9d.cloudfront.net/photo/aWQKoNx_460s.jpg', 'http://d24w6bsrhbeh9d.cloudfront.net/photo/aARWQAR_460s.jpg'];\r\n\r\nvar densityFactor = Ti.Platform.displayCaps.logicalDensityFactor || 1;\r\nvar width = Ti.Platform.displayCaps.platformWidth / densityFactor;\r\nvar height = Ti.Platform.displayCaps.platformHeight / densityFactor;\r\n\r\nvar win = Ti.UI.createWindow({\r\n\tbackgroundColor : '#000'\r\n});\r\n\r\nvar topZ = 15;\r\nvar middleZ = 10;\r\nvar bottomZ = 1;\r\n\r\nvar imageObjs = [];\r\nfor (var i = 0, j = images.length; i < j; i++) {\r\n\timageObjs.push(Ti.UI.createImageView({\r\n\t\theight : height + 'dp',\r\n\t\twidth : width + 'dp',\r\n\t\tzIndex : i === 0 ? topZ : i === 1 ? middleZ : bottomZ,\r\n\t\timage : images[i],\r\n\t\ttop : 0,\r\n\t\tleft : 0,\r\n\t\topacity : 1\r\n\t}));\r\n\tif (height === 568) {\r\n\t\tTi.API.info('iPhone 5');\r\n\t\timageObjs[imageObjs.length - 1].image = images[i].split('.png').join('-568h.png');\r\n\t}\r\n\twin.add(imageObjs[imageObjs.length - 1]);\r\n}\r\n\r\nvar photoIndex = 0;\r\nvar rotate = function() {\r\n\timageObjs[photoIndex].zIndex = topZ;\r\n\tif (photoIndex < imageObjs.length - 1) {\r\n\t\timageObjs[photoIndex + 1].zIndex = middleZ;\r\n\t} else {\r\n\t\timageObjs[0].zIndex = middleZ;\r\n\t}\r\n\timageObjs[photoIndex].animate({\r\n\t\tleft : (-1 * width) + 'dp',\r\n\t\topacity : 0,\r\n\t\tduration : 2500,\r\n\t}, function() {\r\n\t\timageObjs[photoIndex].zIndex = bottomZ;\r\n\t\timageObjs[photoIndex].left = 0;\r\n\t\timageObjs[photoIndex].opacity = 1;\r\n\t\t/*imageObjs[photoIndex].animate({\r\n\t\t duration: 50,\r\n\t\t opacity: 1\r\n\t\t });*/\r\n\t\tphotoIndex++;\r\n\t\tif (photoIndex === imageObjs.length) {\r\n\t\t\tphotoIndex = 0;\r\n\t\t}\r\n\t});\r\n};\r\nvar timer = setInterval(rotate, 5000); \r\n\r\nwin.open();\r\n{code}", "attachment": [], "flagged": false, "summary": "Android does not respect opacity: 0 / opacity: 1 property", "creator": { "name": "itayavtalyon", "key": "itayavtalyon", "displayName": "Itay Avtalyon", "active": true, "timeZone": "Asia/Jerusalem" }, "subtasks": [], "reporter": { "name": "itayavtalyon", "key": "itayavtalyon", "displayName": "Itay Avtalyon", "active": true, "timeZone": "Asia/Jerusalem" }, "environment": "Android 2.3.3\r\nSDK 3.1.0GA", "comment": { "comments": [ { "id": "252581", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Hi Itay,\r\n\r\nPlease provide a reproducible test case that we can drop into an app.js and run.\r\n\r\nThanks!", "updateAuthor": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-17T17:25:09.000+0000", "updated": "2013-05-17T17:25:09.000+0000" }, { "id": "252622", "author": { "name": "itayavtalyon", "key": "itayavtalyon", "displayName": "Itay Avtalyon", "active": true, "timeZone": "Asia/Jerusalem" }, "body": "Hi,\r\n\r\nHere is a simple image rotator. On Android, after it makes the first round, you can see that the images are still invisible. Uncommenting the second animation bit will make the images visible again.\r\n\r\n[moved to description]", "updateAuthor": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-05-17T18:50:06.000+0000", "updated": "2013-06-19T21:17:32.000+0000" }, { "id": "258624", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested and confirmed on Samsung Galaxy S2 2.3.6 with Ti SDK 3.1.1.", "updateAuthor": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-06-19T21:21:47.000+0000", "updated": "2013-06-19T21:21:47.000+0000" } ], "maxResults": 4, "total": 4, "startAt": 0 } } }