Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-7986] Android: Create window now opens a new blank (black) window then draws in the content.

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionDuplicate
Resolution Date2013-03-07T00:52:39.000+0000
Affected Version/sRelease 1.8.0.1, Release 1.8.1, Release 1.8.2
Fix Version/sRelease 3.1.0, 2013 Sprint 05 API, 2013 Sprint 05
ComponentsAndroid
Labelsapi, module_window, qe-testadded
ReporterNikhil Sharma
AssigneeIngo Muschenetz
Created2012-03-13T22:32:00.000+0000
Updated2013-07-16T07:16:35.000+0000

Description

Create window now opens a new blank (black) window then the controls are added in. This create window behavior works fine with Ti SDK 1.7.5 and 1.7.6 but 1.8.0.1 onwards it is opening a black window and then showing the content. The black screen is not visible in Ti sdk 1.7.5 and 1.7.6 .

Repro Steps

1. Run the below code. 2. Press the button "Open a new widow" and you can see the black screen.
var win = Titanium.UI.createWindow({  
    title:'Window1',
    backgroundColor:'#fff'
});
var versionLabel = Ti.UI.createLabel({
	text: 'SDK ver: ' + Titanium.version,
	width: 'auto',
	height: 'auto',
	top: '50dp'
});
var button = Ti.UI.createButton({
	title: 'Open a new window',
	backgroundColor:'red',
	width: 'auto',
	top: '100dp',
	height: '30dp'
});

button.addEventListener('click', function(){
	var newWin = Ti.UI.createWindow({
		title: 'Window2',
		fullscreen:'true'
		
	});
	var headerImg = Ti.UI.createImageView({
			image: '/images/APPC_logo.png',
			backgroundColor: 'red',
			top: 0,
			left: 0,
			width: '100%',
			height: '40dp'
		}),
		tableView = Ti.UI.createTableView({
			top: '40dp',
			height: '200dp',
			backgroundColor: 'blue'
		}),
		webView = Ti.UI.createWebView({
			url: 'http://www.google.com/',
			top: '241dp',
			bottom: 0,
			backgroundColor: 'green'
		}),
		rows = [],
		row,
		label;
	
	for (var i=0; i < 40; i++) {
		row = Ti.UI.createTableViewRow();
		label = Ti.UI.createLabel({
			text: 'Label ' + i,
			width: 'auto',
			height: 'auto',
			left: 0
		});
		row.add(label);
		rows.push(row);
	};	
	tableView.setData(rows);
	
	
	newWin.add(headerImg);
	newWin.add(tableView);
	newWin.add(webView);
	newWin.open();
win.add(versionLabel);
win.add(button);
win.open();

Attachments

FileDateSize
APPC_logo.png2012-03-13T22:32:00.000+00005738

Comments

  1. Ivan Skugor 2012-03-14

    This could be related to this issue: https://gist.github.com/2023001 (except "children" array part)
  2. Ben Collier 2012-03-14

    We're getting this as well. Preventing us from releasing an app and making us hesitant on using Titanium for our next major project..
  3. Ping Wang 2013-03-07

    This is a duplicate of TIMOB-7584. Can not reproduce with latest master and 3.0.0.GA.
  4. Dhirendra Jha 2013-07-16

    Environments - Appcelerator Studio - 3.1.2.201307121651 Titanium SDK - 3.1.2.v20130710144553, 3.1.1.GA acs - 1.0.3 npm - 1.3.2 titanium - 3.1.1 titanium-code-processor - 1.0.1 Device - Galaxy Nexus (v4.0.4) Now its not reproducible. Does not show black window. Hence closing this issue.

JSON Source