8

i am working on animation, i want to give animation to the child view of costume grid view. and that animation like 3d Transition for chile(image view) of android.

I am using the concept is as per http://www.inter-fuser.com/2009/08/android-animations-3d-flip.html.

But i can not able to animate the imageview of gridview.

Please help me.

amity
  • 942
  • 1
  • 8
  • 24
  • By right if you apply an animation on the parent grid view it will apply to all child views.. thus it should work.. did u start the animation? – Rejinderi Oct 01 '11 at 15:56
  • I have try it but not working. as per api demo of android i can able to rotate whole grid view but not able to rotate only one image of grid view at a time. – amity Oct 05 '11 at 04:00
  • Hi rejinderi have you ever try this type of animation? if yes then please help me. – amity Oct 05 '11 at 09:05

3 Answers3

2

You have to apply setStaticTransformationsEnabled(true); at the constructor of your custom GridView. Then apply the transformations at the protected boolean getChildStaticTransformation(View child, Transformation t) and return true to that overriden function

weakwire
  • 9,284
  • 8
  • 53
  • 78
0

Since you are talking about 3D, i guess probably you should take a look at RenderScript

and openGL.

Regarding Renderscript,tutorial are at Part-I and Part-II

For Best example for the usage of renderscript is Youtube and Books app for Honeycomb 3.0 and above.

Ads
  • 6,681
  • 12
  • 47
  • 72
  • I don't really see the need for renderscript.Too complicated and including it's own logic. Android View is hardware accelerated on Tablets the performance on <480 x800 resolution phones is good without the use of GPU and if that not good enough for some reason there is always OpenGL. But yeah RenderScript is another alternative – weakwire Oct 12 '11 at 03:34
  • so it means that 3D chile and carousel is possible without openGL and rendersript? – Ads Oct 12 '11 at 05:20
  • hey thats great.let us know how could u do it.will be useful to the guys just like me.. – Ads Oct 12 '11 at 08:20
  • @adhavan I got some hint from this link and i have make some changes in it. http://code.google.com/p/android-flip3d/source/browse/src/?r=9c57a72f60591a422ae72a1b8f86e447cb0f7e57 – amity Oct 12 '11 at 09:03
  • yes is possible and very efficient if done correctly.caching views when needed – weakwire Oct 12 '11 at 14:53
0

The flip animation in your link doesn't produce believable 3D flips. A simple rotation on the y-axis isn't sufficient. The zoom effect is also needed to create that nice iOS flip feel. For that, take a look at this example: https://code.google.com/p/android-3d-flip-view-transition.

There is also a video here: http://youtu.be/52mXHqX9f3Y

Ephraim
  • 2,234
  • 1
  • 21
  • 18