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

Android: Animated views should retain their initial properties

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Release 7.1.0
    • Component/s: Android
    • Labels:
      None
    • Story Points:
      3
    • Sprint:
      2018 Sprint 03 SDK

      Description

      Note that when you animate a view's size or position, the actual layout properties (such as top, left, width, height) are not changed by the animation.

      TEST CASE

      var win = Ti.UI.createWindow();
          view = Ti.UI.createView({
              backgroundColor:'red',
              width: 100, height: 100,
              left: 100,  top: 100
          });
       
      win.addEventListener('open', function () {
          var animation = Ti.UI.createAnimation({
              top: 150,
              duration: 1000
          });
       
          animation.addEventListener('complete', function () {
              // make sure to give it a time to layout
              setTimeout(function () {
                  console.log(`X: ${view.rect.x} == 150, TOP: ${view.top} == 100`);
              }, 500);
          });
       
          view.animate(animation);
       
      });
      win.add(view);
      win.open();
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                gmathews Gary Mathews
                Reporter:
                gmathews Gary Mathews
                Reviewer:
                Yordan Banev
                Tester:
                Lokesh Choudhary
              • Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

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

                    Git Source Code