Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid Animation with Gridviews: Scaling from a thumbnail to a full-size image
    primarykey
    data
    text
    <p>I currently have a <code>GridView</code> filled with thumbnail images. Now normally I'd load the fullsize versions of these thumbnails in a 'detail' activity via an <code>onClickListener</code>.</p> <p>However I'm trying to replicate the effect where, if I click on a thumbnail, it should scale up to show the fullsize image, and when you tap on the fullsize image it should scale back down to the thumbnail. I've tried a simple scale animation, but can't seem to get my head around animating the image from (and back to) it's initial position.</p> <p>Note: If anyone has a HTC One X, the effect I'm chasing is exactly like the Gallery app on that phone. The Jellybean powered Nexus 7 also has the same effect when you click on an image.</p> <p>My most recent attempt has been (fired onClick):</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;scale xmlns:android="http://schemas.android.com/apk/res/android" android:interpolator="@android:anim/linear_interpolator" android:fromXScale="1.0" android:toXScale="1.0" android:fromYScale="0.0" android:toYScale="1.0" android:pivotY="50%" android:fillAfter="true" android:fillEnabled="true" android:startOffset="200" android:duration="200" /&gt; </code></pre> <p><strong>Update</strong>: Tried looking at the source for Google's Gallery3D app (http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android-apps/4.1.1_r1/com/android/gallery3d/app), which is the one the Nexus uses, but it's massively complicated.</p>
    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.
    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