{ "id": "118809", "key": "TIMOB-14927", "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-08-20T14:53:01.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "Android", "View", "touchmove" ], "versions": [ { "id": "15479", "description": "Release 3.1.2", "name": "Release 3.1.2", "archived": true, "released": true, "releaseDate": "2013-07-31" } ], "issuelinks": [], "assignee": null, "updated": "2018-02-28T20:04:25.000+0000", "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" } }, "components": [ { "id": "10202", "name": "Android", "description": "Android Platform" } ], "description": "*Problem*\r\nWhen resizing a view (tested using touchmove event, but may occur when changing the values by any other way), if I reduce the rectangle(View) on Android, it will leave behind a black shadow wherever the rectangle is placed. The black mark disappears when you move the rectangle around the screen, like an eraser.\r\n\r\n*Steps to reproduce*\r\n1. Run the code above:\r\n2. With the finger, try to reduce the rectangle by touching on the right/bottom area(of the rectangle) and moving the finger.\r\n3. If you reduce the size, the black shadow will be left behind.\r\n4. Touching on the middle of the rectangle and dragging it over the shadow will erase it.\r\n\r\n*Test case*\r\n{code:javascript} \r\nvar win = Ti.UI.createWindow({\r\n\texitOnClose : true,\r\n});\r\n\r\nvar view = Ti.UI.createView({\r\n\twidth : '100%',\r\n\tbackgroundColor : 'white',\r\n\theight : '100%',\r\n});\r\nwin.add(view);\r\nvar b1 = Ti.UI.createView({\r\n\twidth : 300,\r\n\theight : 400,\r\n\tbackgroundColor : 'red',\r\n\tleft : 20,\r\n\ttop : 20,\r\n\tzindex : 10\r\n});\r\nview.add(b1);\r\n// var olt = Titanium.UI.create2DMatrix();\r\nvar curX, curY, count = 0, w, h;\r\nb1.addEventListener('touchstart', function(e) {\r\n\tcurX = e.x;\r\n\tcurY = e.y;\r\n\tw = b1.width;\r\n\th = b1.height;\r\n});\r\nvar formatW = 4;\r\nvar formatH = 3;\r\n\r\nb1.addEventListener('touchmove', function(e) {\r\n\tif (curX * 100 / w > 80 && curY * 100 / h > 80) {\r\n\t\tvar d = Math.sqrt(e.x * e.x + e.y * e.y);\r\n\t\tvar mmD = d + ((d - Math.sqrt(w * w + h * h)) / 3);\r\n\t\tvar width = Math.sqrt((Math.pow(mmD, 2) * Math.pow(formatW, 2)) / (Math.pow(formatW, 2) + Math.pow(formatH, 2)));\r\n\t\tvar height = Math.sqrt(Math.pow(mmD, 2) - Math.pow(width, 2));\r\n\t\tTi.API.info('diagonal = ' + mmD + ' wid ' + width);\r\n\t\tb1.height = width;\r\n\t\tb1.width = height;\r\n\t\tTi.API.info(e);\r\n\t\tTi.API.info(mmD);\r\n\t} else {\r\n\t\tif (count % 3 == 0) {\r\n\t\t\tvar deltaX = e.x - curX, deltaY = e.y - curY;\r\n\t\t\tb1.left += deltaX;\r\n\t\t\tb1.top += deltaY;\r\n\t\t\t// olt = olt.translate(deltaX, deltaY);\r\n\t\t\t// b1.animate({\r\n\t\t\t// transform : olt,\r\n\t\t\t// duration : 50\r\n\t\t\t// });\r\n\t\t\tcount = 0;\r\n\t\t}\r\n\t\tcount++;\r\n\t}\r\n});\r\nwin.open();\r\n{code} ", "attachment": [ { "id": "41750", "filename": "VID_20130820_114606.mp4", "author": { "name": "andreperazzi", "key": "andreperazzi", "displayName": "André Perazzi", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-08-20T14:53:01.000+0000", "size": 10117418, "mimeType": "video/mp4" } ], "flagged": false, "summary": "Android: Dynamically changing the view's size leaves a black shadow", "creator": { "name": "andreperazzi", "key": "andreperazzi", "displayName": "André Perazzi", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "andreperazzi", "key": "andreperazzi", "displayName": "André Perazzi", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Android 4.1.2, SDK 3.1.1GA, Samsung Nexus S", "comment": { "comments": [ { "id": "267436", "author": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Tested and confirmed with Samsung Galaxy S3 Android 4.0.3 with Ti SDK 3.1.1 GA and 3.1.2 GA.\n\nOn the latest 3.2 CI, the test case fails to function; there is no black shadow, but re-sizing is broken.\n\nIt works as expected on Samsung Galaxy S2 Android 2.3.6, so it looks to be OS version-specific.", "updateAuthor": { "name": "dsefton", "key": "dsefton", "displayName": "Daniel Sefton", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-08-21T01:21:32.000+0000", "updated": "2013-08-21T01:21:32.000+0000" }, { "id": "267666", "author": { "name": "andreperazzi", "key": "andreperazzi", "displayName": "André Perazzi", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Just noticed that setting borderWidth:0 (of b1 view) prevent the problem.", "updateAuthor": { "name": "andreperazzi", "key": "andreperazzi", "displayName": "André Perazzi", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-08-22T19:02:31.000+0000", "updated": "2013-08-22T19:02:31.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }