Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: Release 6.0.4
-
Fix Version/s: Release 7.2.1
-
Component/s: Android
-
Labels:
-
Story Points:7
-
Sprint:2018 Sprint 16 SDK
Description
I want to use exitOnClose:false on my root window, so it will go into background and is not exiting. It works fine unless I close a child window with the homeAsUp back arrow.
Example:
var win = Ti.UI.createWindow({backgroundColor: "#fff",exitOnClose: false});
|
var btn = Ti.UI.createButton({title: 'open'});
|
|
btn.addEventListener('click', function() {
|
var win2 = Ti.UI.createWindow({backgroundColor: "#fff"});
|
var actionBar;
|
|
win2.addEventListener("open", function() {
|
if (Ti.Platform.osname === "android") {
|
if (win2.activity) {
|
actionBar = win2.activity.actionBar;
|
if (actionBar) {
|
actionBar.displayHomeAsUp = true;
|
actionBar.onHomeIconItemSelected = function() {win2.close();};
|
}
|
}
|
}
|
});
|
win2.open();
|
});
|
win.add(btn);
|
win.open();
|
Example video: https://migaweb.de/open_window.mp4
Steps to reproduce
- First three times I open the index and close it and open it again (was in background, seeing no splashscreen -> works fine)
- After that I open the second window two time and close it with the back button and then the index window, too (same, works fine)
- Last time I close the second window with the homeAsUp button and I end up at the splashscreen when I close the index. After that I ALWAYS end up at the splashscreen unless I kill the app
Tested versions:
Android 7
HTC A9
Ti SDK 7.2.0.GA, 7.3.0.v20180711185043
Expected behaviour
Always go to background and don't show the splashscreen when exitOnClose is set to false on the root window.