Java Code Examples for androidx.appcompat.app.AppCompatActivity#overridePendingTransition()

The following examples show how to use androidx.appcompat.app.AppCompatActivity#overridePendingTransition() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: General.java    From RedReader with GNU General Public License v3.0 5 votes vote down vote up
public static void recreateActivityNoAnimation(final AppCompatActivity activity) {

		// http://stackoverflow.com/a/3419987/1526861
		final Intent intent = activity.getIntent();
		activity.overridePendingTransition(0, 0);
		intent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);
		activity.finish();
		activity.overridePendingTransition(0, 0);
		activity.startActivity(intent);
	}
 
Example 2
Source File: WelcomeActivity.java    From Pix-Art-Messenger with GNU General Public License v3.0 4 votes vote down vote up
public static void launch(AppCompatActivity activity) {
    Intent intent = new Intent(activity, WelcomeActivity.class);
    intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
    activity.startActivity(intent);
    activity.overridePendingTransition(0, 0);
}