[TIMOB-13235] Android: ImageView: 'Autorotate' property behavior should match on iOS and Android
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | High |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2013-03-28T22:25:57.000+0000 |
Affected Version/s | Release 3.1.0 |
Fix Version/s | Release 3.1.0, 2013 Sprint 07 Core, 2013 Sprint 07 |
Components | Android |
Labels | module_imageview, qe-sdk3.1.0, qe-testadded |
Reporter | Dhirendra Jha |
Assignee | Allen Yeung |
Created | 2013-03-28T08:09:29.000+0000 |
Updated | 2014-06-19T12:43:48.000+0000 |
Description
Steps to Reproduce:
1. Create an application with code below and launch the application
2. Click and verify Tab 1, Tab 2 and Tab 3.
Actual:
1. In Tab 1, image appears in portrait mode on both iOS and Android
2. In Tab 2, image appears in landscape mode on iOS but appears in potrait on Android
3. In Tab 3, image appears in potrait mode on iOS but appears in landscape on Android
Expected: Should match the image autorotate properties on iOS and Android.
var win1 = Titanium.UI.createWindow({
backgroundColor:'white',
title:'AUTOROTATE - TRUE'
});
var image1 = Ti.UI.createImageView({
autorotate: true,
image: 's2.jpg'
})
win1.add(image1);
var win2 = Titanium.UI.createWindow({
backgroundColor:'white',
title:'AUTOROTATE - FALSE'
});
var image2 = Ti.UI.createImageView({
autorotate: false,
image: 's2.jpg'
})
win2.add(image2);
var win3 = Titanium.UI.createWindow({
backgroundColor:'white',
title:'AUTOROTATE - UNDEFINED'
});
var image3 = Ti.UI.createImageView({
image: 's2.jpg'
})
win3.add(image3);
var tab1 = Ti.UI.createTab({
title:'TAB1',
window:win1
})
var tab2 = Ti.UI.createTab({
title:'TAB2',
window:win2
})
var tab3 = Ti.UI.createTab({
title:'TAB3',
window:win3
})
var tabGrp = Ti.UI.createTabGroup();
tabGrp.addTab(tab1);
tabGrp.addTab(tab2);
tabGrp.addTab(tab3);
tabGrp.open();
Attachments
File | Date | Size |
---|---|---|
s2.jpg | 2013-03-28T22:19:15.000+0000 | 2323112 |
Dhirendra, is this behavior new?
The behavior is Tab 2 is incorrect. Tab 3 is fine, since the default behavior for iOS and Android are different (for performance reasons). Will look into this.
https://github.com/appcelerator/titanium_mobile/pull/4049
Behaviour is now same on both iOS and android. Environment used for verification - Titanium SDK: 3.1.0.v20130405170202 Titanium Studio:3.1.0.201304011603 Device: Samsung GALAXY Tab (3.2) and Nexus 7 Android 4.1 and iPad 4 iOS 6.0