Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-15471

Android: View disappear after animating on 4.x device

    Details

      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

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                sunila Sunila
                Reporter:
                hpham Hieu Pham
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    TIMOB-17638
                    Sync status:
                    ERROR
                    Last received:
                    Last sent:

                    Git Integration