Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-7584] Android: opening a new window, background color is briefly displayed before objects are added to the screen

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-05-03T15:29:51.000+0000
Affected Version/sRelease 1.8.0.1, Release 2.0.0
Fix Version/sSprint 2012-05, Release 2.0.0
ComponentsAndroid
Labelsmodule_window, qe-testadded, regression
ReporterFederico Casali
AssigneePing Wang
Created2012-02-08T18:48:03.000+0000
Updated2013-03-07T00:51:50.000+0000

Description

Problem

When opening a new window, the background color of the new window is displayed for a brief moment and then objects are drawn and added to the screen. This is happening from 1.8.0.1 - it's not reproducible on 1.7.5. Opening the new window on 1.8.0.1 with V8 is still overall faster than on 1.7.5 (around 4-5 times faster, something around 120ms against 500ms).

Steps to reproduce

The behavior is noticeable especially on the emulator (since is less reactive).
var win = Ti.UI.createWindow({
  navBarHidden : true,
  backgroundColor : 'green',
});

function createNewWin() {
  var win2 = Ti.UI.createWindow({
    navBarHidden : true,
    backgroundColor : 'black',
  });

  for( i = 0; i < 20; i++) {
    var view = Ti.UI.createView({
      backgroundColor : 'blue',
    });
    win2.add(view);
  }

  return win2;
}

var button = Ti.UI.createButton({
  title : 'Open New Win',
  width : 150,
  height : 60,
  top : 20
});

win.add(button);

button.addEventListener('click', function() {
  var win3 = createNewWin();
  win3.open();
});

win.open();

Link

Ticket related: http://support-admin.appcelerator.com/display/APP-175314

Comments

  1. Wilson Luu 2012-03-15

    Closing bug. Verified fix on: SDK build: 2.0.0.v20120315140247 Runtime: v8, rhino Titanium Studio, build: 2.0.0.201203142055 Device: Droid 1 (2.2.3)
  2. Michael Pettiford 2012-05-03

    Reopening/closing to add/remove labels
  3. Ping Wang 2013-03-07

    PR: https://github.com/appcelerator/titanium_mobile/pull/1586

JSON Source