Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to achieve this folding effect in android?

This is the effect on the ios Like the effect of paper folded PaperFold for iOS :https://github.com/honcheng/PaperFold-for-iOS

like image 821
xman1243 Avatar asked Sep 12 '12 12:09

xman1243


2 Answers

I suppose you can use scale animations on ImageViews that simulate the paper already folded. The scale effect would be used when you scroll through and expand the entire paper as you continue to scroll through the sets of images. Once you fully scroll through the paper ImageView and the animation is completed, you just kill the animation and have a normal view of a full page paper. Just make a separate folder for animation and inside that folder, create an XML file, select scale and play around with the attributes to test the best suitable effects for your animation.

Hope this helps!

like image 92
Morelka Avatar answered Sep 20 '22 16:09

Morelka


There is a library that helps to implement not accordion-like but another quite interesting folding effect: http://www.youtube.com/watch?v=GzWGhp_NDTg

The explanation & code here http://cases.azoft.com/creating-paper-folding-animation-in-android/

like image 26
ice.cube Avatar answered Sep 21 '22 16:09

ice.cube