0
votes

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

1
You need to implement "androidback" instead of "android:back" - Siddharth_Vyas
Yes I can see that android:back is now deprecated (docs.appcelerator.com/titanium/latest/#!/api/…), but changing it to androidback doesn't solve the issue. Maybe it is something to do with the action bar in my app? I'm at a loss.. - Markive
did you ever solve this? I can see my app running as a black screen on my android phone too (after i hit back and close it, i mean) - bharal
Yes see the answer below ;) - Markive

1 Answers

0
votes

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!