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

Android: autoreverse=true works once, then element disappears; callback works fine

    Details

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

      Titanium 3.1.1GA
      Galaxy Nexus, 4.2.2
      Motorola Droid 2.2.3

      Description

      The following simple app demonstrates the issue with autoreverse:

      Tap the first label and it will animate to zero opacity and back once. Tap it again and it disappears (goes to opacity=0 instantly). This label is animated using autoreverse=true

      Tapping the second box, the label correctly animates to zero opacity and back to opacity=1 as many times as you want to tap the label. This label is animated using a callback function with autoreverse unspecified.

      index.xml

      <Alloy>
      	<Window class="container">
      		<Label id="label" onClick="doClick">Click Me</Label>
      		<Label id="label2" onClick="doClick2">Click Me</Label>
      	</Window>
      </Alloy>
      

      index.tss

      ".container": {
      	backgroundColor:"white",
      	layout: 'vertical'
      },
      "Label": {
      	width: 300,
      	height: 100,
      	top: 50,
      	color: "#fff",
      	backgroundColor: 'red',
      	textAlign: Ti.UI.TEXT_ALIGNMENT_CENTER
      },
      "#label2": {
      	backgroundColor: 'green'
      }
      

      index.js

      function doClick(e) {  
          $.label.animate({
          	opacity: 0,
          	duration: 2000,
          	autoreverse: true
          });
      }
       
      function doClick2(e) {  
          $.label2.animate({
          	opacity: 0,
          	duration: 2000
          }, function() {
          	$.label2.animate({
          		opacity: 1,
          		duration: 2000
          	})
          });
      }
      $.index.open();
      

      Possible regression. See TIMOB-8091

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              skypanther Tim Poulsen
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:

                Backbone Issue Sync

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

                  Git Integration