Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-15471] Android: View disappear after animating on 4.x device

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2013-12-12T16:28:39.000+0000
Affected Version/sRelease 3.2.0
Fix Version/sRelease 3.3.0
ComponentsAndroid
Labelsmodule_animation, qe-testadded
ReporterHieu Pham
AssigneeSunila
Created2013-10-13T20:38:09.000+0000
Updated2014-05-20T18:20:15.000+0000

Description

View dissappears after animating. Doesn't work on 4.2.x, works fine on 2.2 device. Test code:
var win = Ti.UI.createWindow({
    backgroundColor : '#4b4276',
    navBarHidden : true,
});
 
var animateLeft = Ti.UI.createAnimation({
    top : 200,
    duration : 400,
});
 
var loginView = Ti.UI.createView({
    height : 50,
    width : 200,
    top : 0,
    // comment out the line below or this will fail on Android
    borderRadius : 10
});
 
var txtUserName = Ti.UI.createTextField({
    backgroundColor : '#fff',
    hintText : 'Password',
    width : 150,
    height : 50,
    left : 0,
    font : {
        fontFamily : 'OpenSans-Light',
    },
    textAlign : Ti.UI.TEXT_ALIGNMENT_CENTER,
});
loginView.add(txtUserName);
var btnUserLogin = Ti.UI.createButton({
    backgroundImage : 'none',
    backgroundColor : '#92cf5c',
    font : {
        fontFamily : 'OpenSans-Light',
    },
    color : '#ffffff',
    title : 'OK',
    width : 50,
    height : 50,
    right : 0,
});
 
loginView.add(btnUserLogin);
 
win.addEventListener('open', function() {
    if (Ti.Platform.osname == 'android') {
        setTimeout(function() {
            loginView.animate(animateLeft);
        }, 1000);
    } else if (Ti.Platform.osname == 'iphone') {
        loginView.animate(animateLeft);
    }
 
});
 
win.add(loginView);
 
win.open();
1. Run code on 4.2.x device. Observe that view disappear after animating

Comments

  1. Sunila 2013-12-12

    Same fix we did for TIMOB-15882 should fix this. https://github.com/appcelerator/titanium_mobile/pull/5064
  2. Lokesh Choudhary 2014-05-20

    Verified the fix . The view does not disappear after animation. Closing. Environment: Appc Studio : 3.3.0.201405161313 Ti SDK : 3.3.0.v20140516180912 Mac OSX : 10.8.5 Alloy : 1.4.0-alpha CLI - 3.3.0-alpha3 Code Processor: 1.1.1 Samsung Galaxy S4 running android 4.4.2

JSON Source