Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-7986

Android: Create window now opens a new blank (black) window then draws in the content.

    Details

      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

          Issue Links

            Activity

              People

              • Assignee:
                ingo Ingo Muschenetz
                Reporter:
                nsharma Nikhil Sharma
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-12382
                    Sync status:
                    ERROR
                    Last received:
                    Last sent:

                    Git Source Code