How to switch activity without animation in Android?
You can create a style,
<style name="noAnimTheme" parent="android:Theme">
<item name="android:windowAnimationStyle">@null</item>
</style>
and set it as theme for your activity in the manifest:
<activity android:name=".ui.ArticlesActivity" android:theme="@style/noAnimTheme">
</activity>
You can also define a style to specify custom entry and exit animations.
http://developer.android.com/reference/android/R.attr.html#windowEnterAnimation
Disable Transition Animation Between Activities
if you want to do it for all activities then do it in this way:
switching activities without animation
Just assign style with no animation to each activity in manifest.
Or through code do it in this way:
Disable activity slide-in animation when launching new activity?
Android, how to disable the 'wipe' effect when starting a new activity?
CaseyB response is good we can set an animation
getWindow().setWindowAnimations(int);
but since Android SDK 2.0 you will use overridePendingTransition(), to change the transition animation, this is an example loading my App from the SplashScreen.
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.SplashScreen);
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
Intent mainIntent = new Intent(SplashScreen.this, AndroidNews.class);
SplashScreen.this.startActivity(mainIntent);
SplashScreen.this.finish();
overridePendingTransition(R.anim.mainfadein,
R.anim.splashfadeout);
}
}, 3000);
}
}
Disable activity slide transition change in android?
Well! this is not possible. It can be possible with API level 5 using overridePendingTransition (0,0);
and using addFlags(65536); in lower levels also but with startActivity();
Related Topics
How to Make Alarm Manager Work When Android 6.0 in Doze Mode
Gles10.Glgetintegerv Returns 0 in Lollipop Only
Why Do I Get Access Denied to Data Folder When Using Adb
Install_Failed_Duplicate_Permission... C2D_Message
Monodroid: Error When Calling Constructor of Custom View - Twodscrollview
How to Open a Different Activity on Recyclerview Item Onclick
Edittext Error Icon and Show Password Missplaced
Overflow Auto Doesn't Work in Android Browser
Camera Orientation Issue in Android
Intent Action for Network Events in Android Sdk
How to Send Http Post Request and Receive Response
Does Android Keep the .Apk Files? If So Where
Android Webview Style Background-Color:Transparent Ignored on Android 2.2
Android Sharedpreference Security
Android Webview App Won't Let Video Player Go Full Screen
Version Conflict Updating to Play-Services 9.4.0 Android Studio 2.2
Receive Gcm Notification Even When the App Is Closed (Slide/Swiped Away)