Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><strong>Update:</strong> Back in Sep, 2011 an Android engineer fixed this issue for the most part. The attributes that were ignored in XML now work, with the exception of <code>repeatCount</code> and <code>fillEnabled</code> which are still ignored (on purpose for some reason). This means it still isn't easy to repeat an <code>AnimationSet</code> unfortunately.</p> <p>For details please see the overview in the <a href="http://developer.android.com/reference/android/view/animation/AnimationSet.html" rel="noreferrer">updated docs</a> (explains which attributes are ignored, which work, and which are passed onto children). And for a deeper understanding of what <code>fillAfter</code>, <code>fillBefore</code>, and <code>fillEnabled</code> actually do, see the engineer's (Chet Haase) blog post about it <a href="http://graphics-geek.blogspot.com/2011/08/mysterious-behavior-of-fillbefore.html" rel="noreferrer">here</a>.</p> <hr> <h2>Original Answer</h2> <p>To expand upon answers by Pavel and others: it is true that the <code>&lt;set&gt;</code> tag is ridiculously buggy. It can't deal correctly with <code>repeatCount</code> and a number of other attributes.</p> <p>I spent a few hours figuring out what it can and can't deal with and have submitted a bug report/issue here: <a href="https://code.google.com/p/android/issues/detail?id=17662" rel="noreferrer">Issue 17662</a></p> <p>In summary (this concerns <code>AnimationSet</code>s):</p> <blockquote> <p>setRepeatCount() / android:repeatCount</p> <blockquote> <p>This attribute (as well as repeatMode) does not work in code or XML. This makes repeating an entire set of animations difficult.</p> </blockquote> <p>setDuration() / android:duration </p> <blockquote> <p>Setting this on an AnimationSet in code WORKS (overrides all durations of children animations), but not when included in the tag in XML</p> </blockquote> <p>setFillAfter() / android:fillAfter </p> <blockquote> <p>This works in both code and XML for the tag. Strangely I have gotten it to also work without the need to set fillEnabled to true.</p> </blockquote> <p>setFillBefore() / android:fillBefore </p> <blockquote> <p>Seems to have no effect/ignored in both code and XML</p> </blockquote> <p>setFillEnabled() / android:fillEnabled</p> <blockquote> <p>Seems to have no effect/ignored in both code and XML. I can still get fillAfter to work even without including fillEnabled or setting fillEnabled to false.</p> </blockquote> <p>setStartOffset() / android:startOffset</p> <blockquote> <p>This works only in code and not XML.</p> </blockquote> </blockquote>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload