Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-13235] Android: ImageView: 'Autorotate' property behavior should match on iOS and Android

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2013-03-28T22:25:57.000+0000
Affected Version/sRelease 3.1.0
Fix Version/sRelease 3.1.0, 2013 Sprint 07 Core, 2013 Sprint 07
ComponentsAndroid
Labelsmodule_imageview, qe-sdk3.1.0, qe-testadded
ReporterDhirendra Jha
AssigneeAllen Yeung
Created2013-03-28T08:09:29.000+0000
Updated2014-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

FileDateSize
s2.jpg2013-03-28T22:19:15.000+00002323112

Comments

  1. Thomas Huelbert 2013-03-28

    Dhirendra, is this behavior new?
  2. Allen Yeung 2013-03-28

    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.
  3. Allen Yeung 2013-03-28

    https://github.com/appcelerator/titanium_mobile/pull/4049
  4. Shyam Bhadauria 2013-04-06

    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

JSON Source