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

Android: Height and width animations have side effects

    Details

      Description

      When attempting to animate height and width on a view in Android, there are some interesting side effects going on in the parent view. Here's an app.js to repro:

      // Create application main window
      var main = Ti.UI.createWindow({
          backgroundColor:'#000'
      });
       
      var container = Ti.UI.createView({
          height:300,
          width:300,
          backgroundColor:'#fff'
      });
      main.add(container);
       
      var shifty = Ti.UI.createView({
          top:10,
          left:10,
          height:200,
          width:200,
          backgroundColor:'#ff0000'
      });
      container.add(shifty);
       
      var btn = Ti.UI.createButton({
          title:'do it',
          height:50,
          width:100,
          bottom:10
      });
      btn.addEventListener('click', function() {
          shifty.animate({
              height:50,
              width:50,
              duration:1500
          });
      });
      main.add(btn);
       
      main.open();
      

        Attachments

        1. droid3.png
          droid3.png
          16 kB
        2. samsung_s3.png
          samsung_s3.png
          28 kB
        3. samsung_s4.png
          samsung_s4.png
          37 kB

          Issue Links

            Activity

              People

              • Assignee:
                hpham Hieu Pham
                Reporter:
                kwhinnery Kevin Whinnery
                Reviewer:
                Ping Wang
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Backbone Issue Sync

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

                    Git Source Code