Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-11298] Android: Animation - A blue view disappears after device is rotated to a landscape mode

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2013-02-12T19:02:31.000+0000
Affected Version/sRelease 3.0.0, 2012 Sprint 22 Core
Fix Version/sRelease 3.1.0, 2013 Sprint 03, 2013 Sprint 04 Core, 2013 Sprint 04
ComponentsAndroid
Labelscore, exalture, module_animation, qe-and100112, qe-testadded
ReporterTamila Smolich
AssigneeSunila
Created2012-10-08T20:34:15.000+0000
Updated2014-06-19T12:43:41.000+0000

Description

Description: A blue view disappears after device is rotated to landscape mode. This is not a regression, the behavior exists as far back as 2.1.2 at least. Steps: 1. Run the following code:
var win1 = Titanium.UI.createWindow({backgroundColor:'#FFFFFF'});
 
var ds =[];
expandableView = Ti.UI.createView({top:0,height:60,backgroundColor:'red'});
nextview = Ti.UI.createView({layout:'vertical',top:-60,height:60,backgroundColor:'blue'});
var row1 = Titanium.UI.createTableViewRow({height:100});
row1.add(expandableView);
 
ds.push(row1);
 
var row2 = Titanium.UI.createTableViewRow({height:100});
row2.add(nextview);
 
ds.push(row2);
 
var btn1 = Ti.UI.createButton({
                    title : 'Yes',
                    width : '50%',
                    height : 30,
                    bottom : 0,
                    left : 0,
                    font : {
                        fontSize : 13,
                        fontWeight : 'bold',
                        fontFamily : 'Helvetica Neue'
                    },
                    color : '#FFFFFF',
                    backgroundImage:'none',
                    backgroundColor:'yellow'
                });
         
            var btn2 = Ti.UI.createButton({
                    title : 'No',
                    width : '50%',
                    height : 30,
                    bottom : 2,
                    right : 0,
                    font : {
                        fontSize : 13,
                        fontWeight : 'bold',
                        fontFamily : 'Helvetica Neue'
                    },
                    color : '#858686',
                    backgroundImage:'none',
                    backgroundColor:'green'
                });
btn1.addEventListener('click',function(){
    nextview.animate({top:0,duration:500})
});
btn2.addEventListener('click',function(){
    nextview.animate({top:-60,duration:500})
});
var tableView = Titanium.UI.createTableView({
            data : ds,
            scrollable : true,
            separatorColor : 'transparent',
            separatorStyle: 'none',
            top:0
    });
  
win1.add(tableView);
win1.add(btn1);
win1.add(btn2);
win1.open();
2. Click on yellow button 3. Rotate device to the landscape mode Expected result: A blue view should not disappear Actual result: The blue view dissapears

Comments

  1. Sunila 2013-02-06

    Propate animation property back to Proxy after the animation is completed
  2. Allen Yeung 2013-02-12

    PR: https://github.com/appcelerator/titanium_mobile/pull/3845
  3. Paras Mishra 2013-02-27

    Blue view stays in landscape screen. Verified on : Device : Google Nexus, Android Version: 4.1 SDK version: 3.1.0.v20130226151819 CLI version : 3.0.24 OS : MAC OSX 10.7.5 XCode : 4.5.1

JSON Source