Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to define flip animation
    primarykey
    data
    text
    <p>I want to make flip like animation of my ImageView after I click on that. My intent is to shrink width of an image to 0 and immediately after that expand it back to 1.0. This should simulate flip of the image. </p> <p>This is what I actually have. After click on the image it shrink image from 1.0 to 0.</p> <p>My question is how to continue with expanding part of animation?</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;set xmlns:android="http://schemas.android.com/apk/res/android" android:shareInterpolator="false"&gt; &lt;scale android:interpolator="@android:anim/linear_interpolator" android:fromXScale="1.0" android:toXScale="0.0" android:fromYScale="1.0" android:toYScale="1.0" android:pivotX="50%" android:pivotY="50%" android:duration="200" /&gt; &lt;/set&gt; </code></pre> <p><strong>EDIT</strong></p> <p>I added another block for reverse part of animation but it does not work as expected. It seem that startOffset is not taken in effect or something like that. In other words animation is messed-up it seems that also first part of animation is affected by this additional code. What I am doing wrong?</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;set xmlns:android="http://schemas.android.com/apk/res/android" android:shareInterpolator="false"&gt; &lt;scale android:interpolator="@android:anim/linear_interpolator" android:fromXScale="1.0" android:toXScale="0.0" android:fromYScale="1.0" android:toYScale="1.0" android:pivotX="50%" android:pivotY="50%" android:duration="200" /&gt; &lt;set android:startOffset="200"&gt; &lt;scale android:interpolator="@android:anim/linear_interpolator" android:fromXScale="0.0" android:toXScale="1.0" android:fromYScale="1.0" android:toYScale="1.0" android:pivotX="50%" android:pivotY="50%" android:duration="200" /&gt; &lt;/set&gt; &lt;/set&gt; </code></pre>
    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. 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