Question

Since updating to 3.2.x some windows won't close properly.

Either by overriding the 'android:back' event or programmatically closing the window.

The window appears to close, and if I call .hide() before it hides, but then a weird small looking black window appears and it shows my app icon and a bit of action bar in the middle see screenshot.

I am closing the window like this:

var lastWindow = this.windowStack.pop();

if (this.navGroup) {
    this.navGroup.closeWindow(lastWindow);
} else {
    lastWindow.hide();
    lastWindow.close({animated:false});
}

There is no navGroup so the else {} is run.

As you can see, I've also tried to hide() just before and I've tried passing {animated:false}. But it still happens.

Any ideas? (Happens in all my Android devices, screenshot is from Google Nexus running all the latest Android updates).

enter image description here

Était-ce utile?

La solution

I was able to remove this eventually but it was difficult to track down. I had to go through all of the code to see exactly what caused it. It turned out a child window hadn't been closed or removed properly as soon as this was done it went away forever.

So the advise that would have helped in my case would be don't concentrate on the window you are closing as being the issue. See any child windows that my still be hanging around.

Try duplicating your project and removing large parts of your code and peel back the onion until closing the same window results in no black screen then you've got your culprit. Happy hunting!

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top