Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-5268] iOS: Redraw is shown when a view with a vertical layout is hidden/shown

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-04-16T16:15:07.000+0000
Affected Version/sRelease 1.7.2
Fix Version/sSprint 2012-05, Release 2.0.0, Release 1.8.3
ComponentsiOS
Labelsmodule_view, parity, qe-testadded
ReporterKevin Whinnery
AssigneeVishal Duggal
Created2011-09-12T10:05:00.000+0000
Updated2012-04-16T16:15:07.000+0000

Description

When hiding or showing a view with a vertical layout, the view's children are shown "flickering" for a moment as the view appears to be re-drawn with the vertical layout. Tested on 4.3 simulator and iPod Touch 4th gen with iOS 4.3. Same behavior is not displayed on Android versions I tested. Tested on mobile SDK 1.7.2 (current production release) and on 1.8.x continuous build, issue is present in both SDKs. Simple example:
var w = Ti.UI.createWindow({
	backgroundColor:'white'
});

var v = Ti.UI.createView({
	height:300,
	width:200,
	layout:'vertical'
});

var v1 = Ti.UI.createView({
	height:10,
	width:100,
	backgroundColor:'red',
	top:10
});
var v2 = Ti.UI.createView({
	height:10,
	width:100,
	backgroundColor:'green',
	top:10
});
var v3 = Ti.UI.createView({
	height:10,
	width:100,
	backgroundColor:'blue',
	top:10
});
v.add(v1);
v.add(v2);
v.add(v3);
w.add(v);

var hidden = false;
var btn = Ti.UI.createButton({
	title:'toggle',
	height:44,
	width:150,
	bottom:5
});
btn.addEventListener('click', function() {
	if(hidden) {
		v.show();
	}
	else {
		v.hide();
	}
	hidden = !hidden;
});

w.add(btn);

w.open();

Comments

  1. Paul Dowsett 2011-12-02

    Reassigning this ticket with several watchers, due to Reggie's absence.
  2. Vishal Duggal 2012-02-29

    Pull pending #1541
  3. Wilson Luu 2012-03-06

    Closing bug. Verified fix on: SDK build: 2.0.0.v20120305174654 Runtime: V8, Rhino Titanium Studio, build: 1.0.9.201202141208 Devices: Nexus S (2.3.6), iphone 3GS (4.3)
  4. Stephen Tramer 2012-04-16

    Reopening to add fixversion, remove tags

JSON Source