Animation between one activity to another activity in android.
Animation between Activity A to Activity B.
<alpha xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="@android:anim/accelerate_interpolator"
android:fromAlpha="0.0"
android:toAlpha="1.0"
android:duration="1000" />
anim/splashfadeout.xml
<?xml version="1.0" encoding="utf-8"?>
<alpha xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="@android:anim/decelerate_interpolator"
android:zAdjustment="top"
android:fromAlpha="1.0"
android:toAlpha="0.0"
android:duration="1000" />
just u have to this code in onCreate();
overridePendingTransition(R.anim.mainfadein, R.anim.splashfadeout);
or
calling another activity.
Animation between Activity A to Activity B.
anim/mainfadein.xml
<?xml version="1.0" encoding="utf-8"?><alpha xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="@android:anim/accelerate_interpolator"
android:fromAlpha="0.0"
android:toAlpha="1.0"
android:duration="1000" />
anim/splashfadeout.xml
<?xml version="1.0" encoding="utf-8"?>
<alpha xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="@android:anim/decelerate_interpolator"
android:zAdjustment="top"
android:fromAlpha="1.0"
android:toAlpha="0.0"
android:duration="1000" />
just u have to this code in onCreate();
overridePendingTransition(R.anim.mainfadein, R.anim.splashfadeout);
or
calling another activity.
Intent in=new Intent(this,ActivityB.class);
startActivity();
overridePendingTransition(R.anim.mainfadein, R.anim.splashfadeout);
http://androidroadies.blogspot.in/
ReplyDelete