[TIMOB-11015] iOS: Orientation - While changing orientation from landscape to portrait, view does not resize smoothly.
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Low |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2013-03-26T08:35:35.000+0000 |
Affected Version/s | Release 2.1.3 |
Fix Version/s | Release 3.0.2 |
Components | iOS |
Labels | qe-ios090112 |
Reporter | Anshu Mittal |
Assignee | Shameer Jan |
Created | 2012-09-20T03:19:50.000+0000 |
Updated | 2017-03-17T18:45:56.000+0000 |
Description
While changing orientation from landscape to portrait, view does not resize smoothly whereas it resizes smoothly while changing the orientation from portrait to landscape.
Steps to reproduce:
1. create a test app using the code below.
2. launch the test app.
3. Click 'press me' button.
4. Now change the orientation to landscape. Red and blue view should resize smoothly.
5. Now change the orintation to portrait. Red and blue view resize again.
Actual:
5. Red and blue view do not resize smoothly. Change in size is noticable.
Expected:
Resizing of view should be smooth.
var win1 = Titanium.UI.createWindow({
backgroundColor:'#fff'
});
var btn = Ti.UI.createButton({
width: 70,
height: 70,
title: 'press me',
color: 'black'
});
win1.add(btn);
btn.addEventListener('click', function() {
var abtn = Ti.UI.createButton({
width: 40,
height: 40,
title: 'close',
color: 'black'
});
var wnd = Ti.UI.createWindow({
title : "Title Bar",
modal : true,
backgroundColor : "#FFF",
orientationModes : [Titanium.UI.PORTRAIT, Titanium.UI.UPSIDE_PORTRAIT, Titanium.UI.LANDSCAPE_LEFT, Titanium.UI.LANDSCAPE_RIGHT],
layout : "vertical"
});
var view = Ti.UI.createView({
backgroundColor : "#F00",
height : 200
});
var view2 = Ti.UI.createView({
backgroundColor : "#00F",
height : 216
});
var text = Ti.UI.createTextArea({
backgroundColor : "#0F0",
suppressReturn : false
});
view.add(text);
wnd.add(view);
wnd.add(view2);
view.add(abtn)
wnd.open();
abtn.addEventListener('click', function() {
wnd.close();
});
Ti.Gesture.addEventListener("orientationchange", function(event) {
view.height = 200;
view2.height = 216;
if(event.orientation === Ti.UI.LANDSCAPE_LEFT || event.orientation === Ti.UI.LANDSCAPE_RIGHT) {
view.height = 106;
view2.height = 162;
}
});
});
win1.open();
Issue does not reproduces Tested with Titanium Studio, build: 3.0.1.201212181159 Titanium SDK version: 3.1.0 Titanium SDK version: 3.0.2 iOS iPhone Simulator: iOS SDK version: 5.1,6.0
Closing ticket as the issue cannot be reproduced.