Project: titanium
Issue TIMOB-5799: Android: Child element does not respect opacity of parent
h3. Original test case. A child element attached to a parent with an opacity of 0 is still visible, but should be hidden. {code} var win = Ti.UI.createWindow({	title: "Window",	backgroundColor: "#FFF" }); var view = Ti.UI.createView({	width: 50,	height: 50,	left: 0,	top: 0,	backgroundColor: "transparent",	opacity: 0 }); var img = Ti.UI.createImageView({	image: "KS_nav_ui.png",	width: 40,	height: 40,	left: 0,	top: 0 }); view.add(img); win.add(view); win.open(); {code} h3. Child and Parent View w/ sliders to control opacity. Try adjusting the opacity of the parent and child views. The child's opacity should be properly composited with that of the parent. As you lower the opacity of the parent, the child should also become more transparent. But if you only lower the child's opacity, the parent should not be affected. {code} var win = Ti.UI.createWindow({	layout: 'vertical',	backgroundColor: 'white' }); var parent = Ti.UI.createView({	backgroundColor: "blue",	width: 200, height: 200 }); win.add(parent); var child = Ti.UI.createView({	backgroundColor: "black",	width: '50%', height: '50%' }); parent.add(child); function createOpacitySlider(title, view) {	var container = Ti.UI.createView({	width: '75%', height: 75,	layout: 'horizontal'	});	container.add(Ti.UI.createLabel({	text: title,	left: 5	}));	var slider = Ti.UI.createSlider({	min: 0, max: 100,	value: 100	});	container.add(slider);	slider.addEventListener('change', function(e) {	view.opacity = e.value / 100;	});	return container; } win.add(createOpacitySlider('Parent', parent)); win.add(createOpacitySlider('Child', child)); win.open(); {code}
Story points: 3