Note that there are some explanatory texts on larger screens.

plurals
  1. POUnknown animation name: objectAnimator. Using Nine Old Androids. Still getting error
    primarykey
    data
    text
    <p>I have 2 fragments that I want to swap between using a card flip animation.</p> <p>Here is one of my animation files:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;set&gt; &lt;!-- Rotate. --&gt; &lt;objectAnimator xmlns:android="http://schemas.android.com/apk/res/android" android:valueFrom="0" android:valueTo="180" android:propertyName="rotationY" android:interpolator="@android:anim/accelerate_decelerate_interpolator" android:duration="@integer/card_flip_time_full" /&gt; &lt;!-- Half-way through the rotation (see startOffset), set the alpha to 0. --&gt; &lt;objectAnimator xmlns:android="http://schemas.android.com/apk/res/android" android:valueFrom="1.0" android:valueTo="0.0" android:propertyName="alpha" android:startOffset="@integer/card_flip_time_half" android:duration="1" /&gt; &lt;/set&gt; </code></pre> <p>I have 4 files like this. They are pretty much taken straight from this <a href="http://developer.android.com/training/animation/cardflip.html" rel="nofollow">Google Demo</a>. I have a minimum sdk of 8, so I am using the highly recommended <a href="https://github.com/JakeWharton/NineOldAndroids" rel="nofollow">Nine Old Androids</a> library. However, I am still getting the following error: <code>Uknown animation name: objectAnimator</code>. I can import the package for objectAnimator in my java files, so I am pretty certain I have everything configured properly with the JAR file. Earlier I set the <code>objectAnimator</code> to <code>translate</code> (and changed the attribute values) and it did do an animation, just not the more complicated one I am going for.</p> <p>Does anyone have any advice on what I might be doing wrong? I am beginning to grasp at straws.</p> <p><strong>Edit:</strong> Just in case it helps, here is my flipCard function:</p> <pre><code>public void flipSalesCard(FragmentManager fm) { if (salesShowingBack) { salesShowingBack = false; Fragment smallSSF = new SmallSalesSectionFragment(); FragmentTransaction trans = fm.beginTransaction(); trans.setCustomAnimations(R.anim.card_flip_left_in, R.anim.card_flip_left_out); trans.replace(R.id.SalesInfoFragment, smallSSF); trans.addToBackStack(null); trans.commit(); return; } salesShowingBack = true; Fragment expandedSSF = new ExpandedSalesSectionFragment(); FragmentTransaction trans = fm.beginTransaction(); trans.setCustomAnimations(R.anim.card_flip_right_in, R.anim.card_flip_right_out); trans.replace(R.id.SalesInfoFragment, expandedSSF); trans.addToBackStack(null); trans.commit(); } </code></pre>
    singulars
    1. This table or related slice is empty.
    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.
 

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