{ "id": "63470", "key": "TIMOB-2838", "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": { "id": "7", "description": "", "name": "Invalid" }, "resolutiondate": "2011-04-15T03:30:46.000+0000", "created": "2011-04-15T03:30:44.000+0000", "priority": { "name": "Trivial", "id": "5" }, "labels": [ "android", "defect", "scrollview" ], "versions": [], "issuelinks": [], "assignee": { "name": "dthorp", "key": "dthorp", "displayName": "Don Thorp", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2017-03-09T23:18:23.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": "{html}
When I click to reopen a window I get multiple instances of that\nwindow. Either it is being opened twice the 2nd time or never\nreally closed. Please see the example code for a better\nexplanation.
\n\nTitanium.UI.setBackgroundColor('#000');\n\nvar win1 = Titanium.UI.createWindow({\n\nbackgroundColor:'#000',\nexitOnClose:true,\nnavBarHidden:true,\norientationModes: [Ti.UI.PORTRAIT],\nzIndex:-1\n});\n\nwin1.open();\n\nvar win3 = Titanium.UI.createWindow({\n\ntitle: 'Window 3',\nname: 'Window 3',\nbackgroundColor: '#C4D5DA',\nfullscreen: false,\nanimate: ({opacity: 0,duration: 300 }),\nurl: 'win3.js'\n});\n\nwin3.open();
\n
\nwin3.js
\n\nvar win3 = Titanium.UI.currentWindow;\n\nvar body = Titanium.UI.createScrollView({\ncontentWidth:Titanium.Platform.displayCaps.platformWidth,contentHeight:500,\nright:0,left:0,top:60,bottom:50,width:'auto',height:'auto',\nshowHorizontalScrollIndicator:false,showVerticalScrollIndicator:false});\n\nwin3.add(body)\n\nvar button = Titanium.UI.createButton({\ntitle:'click to cycle',\ntop:190,\nleft:30,\nheight:50,\nwidth:250,\nfont:{fontSize:20}\n});\n\nbody.add(button);\nbutton.addEventListener('click', function(){\n\nwin3.close();\nwin3.open();\n});</code>
\n
This happens only on Android.
\nis there an echo in here?...
Please someone at least acknowledge this bug. My app works\nperfectly on iPhone but unless this bug is fixed for Android, there\nis no point in me using this software
You can't close and reopen the same window that you're in.
That was just for simplicity sake. I have modified my code to\nnot open/close from the same window with the same result.
\n\nTitanium.UI.setBackgroundColor('#000');\n\nvar win1 = Titanium.UI.createWindow({ \n backgroundColor:'#000',\n exitOnClose:true,\n navBarHidden:true,\n orientationModes: [Ti.UI.PORTRAIT],\n zIndex:-1\n});\n\nwin1.open();\n\nvar body = Titanium.UI.createScrollView({\n right:0,left:0,top:60,bottom:50,width:'auto',height:'auto'\n });\n \nvar button = Titanium.UI.createButton({\n title:'click to open',\n top:190,\n left:30,\n height:50,\n width:250,\n font:{fontSize:20}\n});\n\nbody.add(button);\nwin1.add(body);\n\nbutton.addEventListener('click', function(){\n win3.open();\n });\n\nvar win3 = Titanium.UI.createWindow({\n title: 'Window 3',\n name: 'Window 3',\n backgroundColor: '#C4D5DA',\n fullscreen: false,\n animate: ({opacity: 0,duration: 300 }),\n url: 'win3.js'\n });
\n
\n\n\nvar win3 = Titanium.UI.currentWindow;\n\nvar body = Titanium.UI.createScrollView({\n contentWidth:Titanium.Platform.displayCaps.platformWidth,contentHeight:500,\n right:0,left:0,top:60,bottom:50,width:'auto',height:'auto',\n showHorizontalScrollIndicator:false,showVerticalScrollIndicator:false});\n\nwin3.add(body)\n\nvar button = Titanium.UI.createButton({\n title:'click to close',\n top:190,\n left:30,\n height:50,\n width:250,\n font:{fontSize:20}\n});\n\nbody.add(button);\n\nbutton.addEventListener('click', function(){\n\n win3.close();\n });
\n