Java Code Examples for android.support.v7.app.AppCompatActivity#overridePendingTransition()

The following examples show how to use android.support.v7.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: IssuersActivity.java    From px-android with MIT License 5 votes vote down vote up
public static void start(@NonNull final AppCompatActivity from, final int requestCode,
    @NonNull final List<Issuer> issuers, @NonNull final Serializable cardInformation) {
    final Intent intent = new Intent(from, IssuersActivity.class);
    intent.putParcelableArrayListExtra(EXTRA_ISSUERS, new ArrayList<>(issuers));
    intent.putExtra(EXTRA_CARD_INFO, cardInformation);
    from.startActivityForResult(intent, requestCode);
    from.overridePendingTransition(R.anim.px_slide_right_to_left_in, R.anim.px_slide_right_to_left_out);
}
 
Example 2
Source File: IssuersActivity.java    From px-android with MIT License 5 votes vote down vote up
public static void startWithPaymentMethod(@NonNull final AppCompatActivity from, final int requestCode,
    @NonNull final List<Issuer> issuers, @NonNull final Serializable cardInformation,
    @NonNull final PaymentMethod paymentMethod) {
    final Intent intent = new Intent(from, IssuersActivity.class);
    intent.putParcelableArrayListExtra(EXTRA_ISSUERS, new ArrayList<>(issuers));
    intent.putExtra(EXTRA_CARD_INFO, cardInformation);
    intent.putExtra(EXTRA_PAYMENT_METHOD, (Parcelable) paymentMethod);
    from.startActivityForResult(intent, requestCode);
    from.overridePendingTransition(R.anim.px_slide_right_to_left_in, R.anim.px_slide_right_to_left_out);
}
 
Example 3
Source File: PickServerActivity.java    From Conversations with GNU General Public License v3.0 4 votes vote down vote up
public static void launch(AppCompatActivity activity) {
    Intent intent = new Intent(activity, PickServerActivity.class);
    intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);
    activity.startActivity(intent);
    activity.overridePendingTransition(0, 0);
}
 
Example 4
Source File: WelcomeActivity.java    From Conversations 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);
}
 
Example 5
Source File: PermissMe.java    From PermissMe with Apache License 2.0 3 votes vote down vote up
/**
 * Override the transition, safely
 *
 * @param activity
 * 		the Activity
 * @param enterAnim
 * 		the enter activity transition
 * @param exitAnim
 * 		the exit activity transition
 */
private static void overrideDefaultTransition(final AppCompatActivity activity,
                                              @AnimRes final int enterAnim,
                                              @AnimRes final int exitAnim) {
	if (activity != null) {
		activity.overridePendingTransition(enterAnim, exitAnim);
	}
}