[TIMOB-2838] Reopening a window opens it twice
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Trivial |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2011-04-15T03:30:46.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Android |
Labels | android, defect, scrollview |
Reporter | pete |
Assignee | Don Thorp |
Created | 2011-04-15T03:30:44.000+0000 |
Updated | 2017-03-09T23:18:23.000+0000 |
Description
When I click to reopen a window I get multiple instances of that window. Either it is being opened twice the 2nd time or never really closed. Please see the example code for a better explanation.
Titanium.UI.setBackgroundColor('#000');
var win1 = Titanium.UI.createWindow({
backgroundColor:'#000',
exitOnClose:true,
navBarHidden:true,
orientationModes: [Ti.UI.PORTRAIT],
zIndex:-1
});
win1.open();
var win3 = Titanium.UI.createWindow({
title: 'Window 3',
name: 'Window 3',
backgroundColor: '#C4D5DA',
fullscreen: false,
animate: ({opacity: 0,duration: 300 }),
url: 'win3.js'
});
win3.open();
win3.js
var win3 = Titanium.UI.currentWindow;
var body = Titanium.UI.createScrollView({
contentWidth:Titanium.Platform.displayCaps.platformWidth,contentHeight:500,
right:0,left:0,top:60,bottom:50,width:'auto',height:'auto',
showHorizontalScrollIndicator:false,showVerticalScrollIndicator:false});
win3.add(body)
var button = Titanium.UI.createButton({
title:'click to cycle',
top:190,
left:30,
height:50,
width:250,
font:{fontSize:20}
});
body.add(button);
button.addEventListener('click', function(){
win3.close();
win3.open();
});</code>
This happens only on Android.
is there an echo in here?...
Please someone at least acknowledge this bug. My app works perfectly on iPhone but unless this bug is fixed for Android, there is 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 not open/close from the same window with the same result.
app.js
win3.js
Closing ticket as invalid.