Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-26213

Android: Backing out of root window with exitOnClose false shows splash if child window closed programmatically

    Details

    • 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.

        Attachments

          Activity

            People

            • Assignee:
              gmathews Gary Mathews
              Reporter:
              michael Michael Gangolf
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-6461
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Source Code