[TIMOB-6816] Android: UI - heavyweight window open event fired twice
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2012-01-23T16:17:24.000+0000 |
Affected Version/s | Release 1.8.0.1 |
Fix Version/s | Sprint 2012-01, Release 2.0.0, Release 1.8.1 |
Components | Android |
Labels | parity |
Reporter | Dylan Sale |
Assignee | Ping Wang |
Created | 2011-12-20T18:13:48.000+0000 |
Updated | 2012-08-14T19:43:48.000+0000 |
Description
This code:
// this sets the background color of the master UIView (when there are no windows/tab groups on it)
Titanium.UI.setBackgroundColor('#000');
var win1 = Titanium.UI.createWindow({
title:'Tab 1',
backgroundColor:'#000000',
navBarHidden:true
});
win1.addEventListener("open", function(e) {
Ti.API.debug("OPENED");
});
win1.open();
Changing navBarHidden:true
to modal:true
also produces the same result
OPENED will be called twice when the app starts. Additionally, the win1.activity is stopped after the first time the event fires.
I posted this on Q and A at http://developer.appcelerator.com/question/129668/heavyweight-windows-causing-open-event-to-fire-twice
Dylan Thank you for raising this ticket. I have tested the code, and verified that it produces the results as described . Please note the changes that were necessary, as described in [JIRA Ticket Checklist](https://wiki.appcelerator.org/display/guides/How+to+Submit+a+Bug+Report#HowtoSubmitaBugReport-JIRATicketChecklist), in order for me to be able to escalate it. Cheers
Hi Paul, Sorry about the formatting, I was in a hurry and missed some of the checklist it seems. I notice you changed the component to Android, as a community member it doesn't seem like I have access to that Component.
No worries, Dylan - it's all good :)
vote it. My application which heavily uses 'url' for window creation totally stop working. Hope Titanium can give a fast patch to fix this severe issue.
Voted. Problem occurs with the released 1.8.0.1 also.
Another vote here. This is preventing me from releasing my app on 1.8
Heck, I can't even TEST my app because all of my open events are firing twice, which causes all kinds of funny side-effects.
I've also noticed that the focus event gets fired twice (in my case, when opening a window with the "url" property set). This all works fine in 1.8.0.v... from 09/13/2011.
Below is a sample code to test both "open" and "focus" events. Run it for both heavyweight window and lightweight window. Check the log for result.
Closing bug. Verified fix for both heavyweight and lightweight windows on: SDK build: 1.9.0.v20120111233134 Runtime: V8, Rhino Titanium Studio, build: 1.0.8.201201111843 Device: Droid 3 (2.3.4)