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

Android: Animation stops working on Android after switching off/on "Reverse" function.

    Details

    • Type: Bug
    • Status: Open
    • Priority: Low
    • Resolution: Unresolved
    • Affects Version/s: Release 2.1.0, Release 3.1.0
    • Fix Version/s: None
    • Component/s: Android
    • Environment:

      Titanium Studio, build: 2.1.0.201206221045
      Titanium SDK: 2.1.0.v20120622174154
      Device: Samsung Galaxy tab (3.2)

      Description

      Description:
      Animation stops working on Android after switching off/on "Reverse" function.

      Steps to reproduce:
      1. Run the following code on Android:

      var win = Ti.UI.createWindow();
      win.backgroundColor = "white";
       
      var transform = Ti.UI.create2DMatrix().rotate(90);
       
      var v = Ti.UI.createView({
      	right: "10dp",
      	width: "100dp",
      	height: "100dp",
      	top: "10dp",
      	backgroundColor: "#444"
      });
       
      win.add(v);
       
      win.add(Ti.UI.createLabel({
      	text: "Reverse?:",
      	left: "10dp", width: "90dp",
      	color: "black",
      	height: "40dp", top: "10dp"
      }));
       
      win.add(Ti.UI.createLabel({
      	text: "Repeat:",
      	left: "10dp", width: "90dp",
      	color: "black",
      	height: "40dp", top: "55dp"
      }));
       
      var reverse = Ti.UI.createSwitch({
      	value: true,
      	left: "95dp", top: "10dp"
      });
       
      win.add(reverse);
       
      var repeat = Ti.UI.createTextField({
      	value: "1",
      	keyboardType: Ti.UI.KEYBOARD_NUMBER_PAD,
      	left: "95dp", top: "55dp",
      	width: "80dp", height: "40dp",
      	color: "black",
      	borderStyle: Ti.UI.INPUT_BORDERSTYLE_ROUNDED
      });
      win.add(repeat);
       
      var btnAnimate = Ti.UI.createButton({
      	title: "Animate",
      	top: "100dp", left: "10dp",
      	width: "90dp", height: "40dp"
      });
      win.add(btnAnimate);
       
      btnAnimate.addEventListener("click", function() {
      	var repeatCount = parseInt(repeat.value, 10);
      	if (isNaN(repeatCount) || repeatCount < 1) {
      		alert("Be sensible! Positive repeat count please!");
      		return;
      	}
       
      	v.animate({
      		transform: transform,
      		duration: 500,
      		autoreverse: reverse.value,
      		repeat: repeatCount
      	});
      });
       
       
      win.open();
      

      2. Press "Animate" button
      3. Switch "Reverse" off and press "Animate"
      4. Switch "Reverse" on and press "Animate"

      Actual result:
      Animation does not work

      Expected result:
      Animation should work

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                tsmolich Tamila Smolich
              • Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:

                  Backbone Issue Sync

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

                    Git Source Code