I do not use animation because it do not use fingers while going to another activity and I do not use page curl animation because it uses single activity for all pages. I want to go from one activity to other like we turn a page in book.
Asked
Active
Viewed 1,512 times
1
-
this page curl is used on single activity. but i want to go from one activity to another using this effect – user3690737 Jun 02 '14 at 09:56
1 Answers
1
Use
overridePendingTransition(R.anim.grow_from_middle,R.anim.shrink_to_middle);
grow_from_middle.xml
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<scale
android:interpolator="@android:anim/linear_interpolator"
android:fromXScale="0.0"
android:toXScale="1.0"
android:fromYScale="0.7"
android:toYScale="1.0"
android:fillAfter="false"
android:startOffset="200"
android:duration="200" />
<translate
android:fromXDelta="50%"
android:toXDelta="0"
android:startOffset="200"
android:duration="200"/>
</set>
shrink_to_middle.xml
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<scale
android:interpolator="@android:anim/linear_interpolator"
android:fromXScale="1.0"
android:toXScale="0.0"
android:fromYScale="1.0"
android:toYScale="0.7"
android:fillAfter="false"
android:duration="200" />
<translate
android:fromXDelta="0"
android:toXDelta="50%"
android:duration="200"/>
</set>
From Android: Flip Animation using XML for animation in android