[TIMOB-9942] animation and opacity prevents the button with backgroundImage from being showed correctly
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Medium |
Status | Closed |
Resolution | Invalid |
Resolution Date | 2012-07-17T16:21:44.000+0000 |
Affected Version/s | Release 2.1.0 |
Fix Version/s | Sprint 2012-15 API |
Components | iOS |
Labels | api |
Reporter | Qing Gao |
Assignee | Vishal Duggal |
Created | 2012-07-11T14:46:20.000+0000 |
Updated | 2013-03-13T19:00:39.000+0000 |
Description
Run the sample code below.
Expected behavior: The "close" button shows up in the navigation bar.
Actual behavior: The "close" button does not show up unless the height property of that button is set.
var win = Ti.UI.createWindow({
backgroundColor:'#ffffff'
});
var object = { parentView:Ti.UI.createView({ left:10, right:10, top:10, bottom:10, opacity:0.0 }) };
var outScale = Ti.UI.create2DMatrix().scale(0.1);
var inScale = Ti.UI.create2DMatrix().scale(1.0);
var contentContainer = Ti.UI.createView({ left:20, right:20, top:20, bottom:20, borderRadius:10 });
var navBar = Ti.UI.createView({ top:0, left:0, right:0, height:44});
var navCloseBtn = Ti.UI.createButton({ right:10, width:58, backgroundImage:'ad-bar-close-btn.png' });
//walk around with height property being set.
//var navCloseBtn = Ti.UI.createButton({ right:10, width:58,height:41, backgroundImage:'ad-bar-close-btn.png' });
var title = Ti.UI.createLabel({ text:"title", color:'#333', left:20, top:3, height:41 });
object.parentView.transform = outScale;
navBar.add(title);
navBar.add(navCloseBtn);
object.controllers = {
show: function() {
win.add(object.parentView);
object.parentView.animate({ transform:inScale, opacity:1.0, duration:250 }, function(e) {
});
}
};
contentContainer.add(navBar);
object.parentView.add(contentContainer);
win.add(object.parentView);
object.controllers.show();
win.open();
In 1_8_X undefined height followed fill behavior on buttons, since 2_0_X undefined height follows size behavior. To return to 1_8_X behavior explicitly set
Invalid test case