{ "id": "94149", "key": "TIMOB-9846", "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": "13503", "description": "Sprint 2012-14 Core", "name": "Sprint 2012-14 API", "archived": true, "released": true, "releaseDate": "2012-07-13" }, { "id": "13572", "description": "Release 2.1.1", "name": "Release 2.1.1", "archived": true, "released": true, "releaseDate": "2012-07-31" }, { "id": "13505", "description": "Release 3.0.0", "name": "Release 3.0.0", "archived": true, "released": true, "releaseDate": "2012-12-14" } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2012-08-02T00:02:12.000+0000", "created": "2012-06-29T13:26:15.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "core", "module_views", "qe-review", "qe-testadded" ], "versions": [ { "id": "13271", "description": "Release 2.1.0", "name": "Release 2.1.0", "archived": false, "released": true, "releaseDate": "2012-06-29" } ], "issuelinks": [], "assignee": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2012-08-02T00:02:12.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": "Views like Label and Label on buttons remain in the screen even after window closes. The views wont get removed instantly as the window closes and can be seen for 1-2secs when back button is pressed.\r\n\r\nThe example application was tried with different approaches such as simple app.js, using Ti.Include() and also Common JS approach ( require).\r\n\r\nThe labels can be seen in all the approaches but with Common Js approach, the transition back from second window to first is fast that labels staying on the window is hard to observe. But it remains on the window.\r\n\r\n1. Run the attached app.js to test the bug.\r\n2. To test the bug using common JS approach, run the below code as specified.\r\n3. In app.js\r\n{code}\r\nvar MainWin = require('mainwin');\r\n\r\nMainWin().open();\r\n{code}\r\n4. Copy the below code in 'mainwin.js' in resources.\r\n{code}\r\nmodule.exports = function(){\r\n\tvar win = Ti.UI.createWindow({\r\n\t\ttabBarHidden: true,\r\n\t\tnavBarHidden: false,\r\n\t\tbackgroundColor: '#a0a0a0'\r\n\t});\r\n\r\n\r\n\tvar winButton = Ti.UI.createButton({\r\n\t\ttitle: 'Open window',\r\n\t\twidth: 200, height: 100\r\n\t});\r\n\r\n\twinButton.addEventListener('click', function(){\r\n\t\tvar OtherWin = require('otherwin');\r\n\t\tOtherWin().open();\r\n\t});\r\n\r\n\twin.add(winButton);\r\n\r\n\twin.open();\r\n\r\n\t/*\r\n\twin.addEventListener('focus', function() {\r\n\t\tvar i, v;\r\n\r\n\t\tTi.API.info('received focus event');\r\n\t\tfor(i=0; i<100; i++) {\r\n\t\t\tTi.App.Properties.setInt('v', i*i);\r\n\t\t\tv = Ti.App.Properties.getInt('v', 0);\r\n\t\t\tTi.API.info('square: ' + v);\r\n\t\t}\r\n\t});\r\n\t*/\r\n\r\n\treturn win;\r\n}\r\n{code}\r\n5. Copy the below code in 'otherwin.js' under resources.\r\n{code}\r\nmodule.exports = function(){\r\n\tvar win2 = Ti.UI.createWindow({\r\n\t\tnavBarHidden: false,\r\n\t\ttabBarHidden: true\r\n\t});\r\n\r\n\twin2.addEventListener('android:back', function() {\r\n\t\twin2.close();\r\n\t});\r\n\r\n\tvar imageView = Ti.UI.createImageView({\r\n\t\ttop: 0,\r\n\t\twidth: 100, height: 100,\r\n\t\timage: 'KS_nav_ui.png',\r\n\t\tborderColor: 'red'\r\n\t});\r\n\r\n\r\n\tvar testButton = Ti.UI.createButton({\r\n\t\ttitle: 'TEST BUTTON',\r\n\t\tfont: {\r\n\t\t\tfontSize: 24,\r\n\t\t\tfontWeight: 'bold'\r\n\t\t},\r\n\t\tcolor: 'red',\r\n\t\twidth: 200, height: 100\r\n\t});\r\n\r\n\tvar labelView = Ti.UI.createLabel({\r\n\t\ttext: 'TEST LABEL',\r\n\t\tfont: {\r\n\t\t\tfontSize: 24,\r\n\t\t\tfontWeight: 'bold'\r\n\t\t},\r\n\t\tcolor: 'red',\r\n\t\twidth: 200, height: 100,\r\n\t\tbottom: 0\r\n\t});\r\n\r\n\tvar scrollView = Ti.UI.createScrollView({\r\n\t\ttop: 110, height: 200, width: 300,\r\n\t\tscrollType: 'horizontal', contentWidth: 1090,\r\n\t\tbackgroundColor: 'green'\r\n\t});\r\n\r\n\tfor(i=0; i<10; i++) {\r\n\t\tscrollView.add(Ti.UI.createImageView({\r\n\t\t\tleft: i*110,\r\n\t\t\twidth: 100, height: 100,\r\n\t\t\timage: 'KS_nav_ui.png',\r\n\t\t\tborderColor: 'red'\r\n\t\t}));\r\n\t\tscrollView.add(Ti.UI.createLabel({\r\n\t\t\ttext: 'Label ' + i,\r\n\t\t\tcolor: 'red',\r\n\t\t\tfont: {\r\n\t\t\t\tfontSize: 24,\r\n\t\t\t\tfontWeight: 'bold'\r\n\t\t\t},\r\n\t\t\tleft: i*110,\r\n\t\t\twidth: 100, height: 40,\r\n\t\t\tbottom: 0\r\n\t\t}));\r\n\t}\r\n\r\n\twin2.add(imageView);\r\n\twin2.add(testButton);\r\n\twin2.add(labelView);\r\n\twin2.add(scrollView);\r\n\treturn win2;\r\n}\r\n{code}\r\nExpected Behavior: As soon as the second window closes, all the views attached to it have to removed.\r\nActual Behavior: The label and button label can be still seen as the second window is closed.\r\n\r\nThis was tested on Samsung Galaxy Tab (3.2), Motorola Atrix(2.3.3) and 4.0 Android emulator. This is not reproducible on Google Nexus running 2.3.3", "attachment": [ { "id": "28825", "filename": "app.js", "author": { "name": "anagesh", "key": "anagesh", "displayName": "Anirudh Nagesh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-06-29T13:26:15.000+0000", "size": 1770, "mimeType": "text/javascript" } ], "flagged": false, "summary": "Android: Views like Label and Label on Button remain on the screen even after window is closed", "creator": { "name": "anagesh", "key": "anagesh", "displayName": "Anirudh Nagesh", "active": true, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "anagesh", "key": "anagesh", "displayName": "Anirudh Nagesh", "active": true, "timeZone": "America/Los_Angeles" }, "environment": "Ti SDK 2.1.0GA, 2.0.1GA, 2.0.2GA and 1.8.2GA and Android 4.0,2.3.3 and 3.2", "comment": { "comments": [ { "id": "202083", "author": { "name": "anagesh", "key": "anagesh", "displayName": "Anirudh Nagesh", "active": true, "timeZone": "America/Los_Angeles" }, "body": "HD Ticket: appc.me/c/APP-567378", "updateAuthor": { "name": "anagesh", "key": "anagesh", "displayName": "Anirudh Nagesh", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-09T09:41:50.000+0000", "updated": "2012-07-09T09:41:50.000+0000" }, { "id": "203182", "author": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "body": "PR https://github.com/appcelerator/titanium_mobile/pull/2537", "updateAuthor": { "name": "pwang", "key": "pwang", "displayName": "Ping Wang", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-13T13:23:48.000+0000", "updated": "2012-07-13T13:23:48.000+0000" }, { "id": "208005", "author": { "name": "amittal", "key": "amittal", "displayName": "Anshu Mittal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified On: \r\nSDK: 2.2.0.v20120713210112\r\nStudio: 2.1.1.201207161421\r\nDevice: Samsung Galaxy tab(v 3.2)\r\n\r\nViews like Label and Button label do not remain on screen when window is closed.", "updateAuthor": { "name": "amittal", "key": "amittal", "displayName": "Anshu Mittal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-17T04:25:01.000+0000", "updated": "2012-07-17T04:25:01.000+0000" }, { "id": "208006", "author": { "name": "amittal", "key": "amittal", "displayName": "Anshu Mittal", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Verified On: \r\nSDK: 2.1.1.v20120716180600\r\nStudio: 2.1.1.201207161421\r\nDevice: Samsung Galaxy tab(V 3.2)", "updateAuthor": { "name": "amittal", "key": "amittal", "displayName": "Anshu Mittal", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-07-17T04:31:57.000+0000", "updated": "2012-07-17T04:31:57.000+0000" }, { "id": "211173", "author": { "name": "sbhadauria", "key": "sbhadauria", "displayName": "Shyam Bhadauria", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Re-opening to edit label", "updateAuthor": { "name": "sbhadauria", "key": "sbhadauria", "displayName": "Shyam Bhadauria", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2012-08-02T00:01:38.000+0000", "updated": "2012-08-02T00:01:38.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }