use of android.support.v4.app.ActivityOptionsCompat in project FastHub by k0shk0sh.
the class ActivityHelper method startReveal.
public static void startReveal(@NonNull Fragment fragment, Intent intent, @NonNull View sharedElement, int requestCode) {
if (!PrefGetter.isAppAnimationDisabled()) {
ActivityOptionsCompat options = ActivityOptionsCompat.makeClipRevealAnimation(sharedElement, sharedElement.getWidth() / 2, sharedElement.getHeight() / 2, sharedElement.getWidth(), sharedElement.getHeight());
fragment.startActivityForResult(intent, requestCode, options.toBundle());
} else {
fragment.startActivityForResult(intent, requestCode);
}
}
use of android.support.v4.app.ActivityOptionsCompat in project FastHub by k0shk0sh.
the class ActivityHelper method startReveal.
public static void startReveal(@NonNull Activity activity, Intent intent, @NonNull View sharedElement, int requestCode) {
if (!PrefGetter.isAppAnimationDisabled()) {
ActivityOptionsCompat options = ActivityOptionsCompat.makeClipRevealAnimation(sharedElement, sharedElement.getWidth() / 2, sharedElement.getHeight() / 2, sharedElement.getWidth(), sharedElement.getHeight());
activity.startActivityForResult(intent, requestCode, options.toBundle());
} else {
activity.startActivityForResult(intent, requestCode);
}
}
use of android.support.v4.app.ActivityOptionsCompat in project butter-android by butterproject.
the class TVStreamLoadingActivity method startActivity.
public static Intent startActivity(Activity activity, StreamInfo info, Pair<View, String>... elements) {
Intent intent = new Intent(activity, TVStreamLoadingActivity.class);
intent.putExtra(EXTRA_STREAM_INFO, info);
ActivityOptionsCompat options = ActivityOptionsCompat.makeSceneTransitionAnimation(activity, elements);
ActivityCompat.startActivity(activity, intent, options.toBundle());
return intent;
}
use of android.support.v4.app.ActivityOptionsCompat in project Ruisi by freedom10086.
the class UserDetailActivity method openWithAnimation.
public static void openWithAnimation(Activity activity, String username, ImageView imgAvatar, String uid) {
Intent intent = new Intent(activity, UserDetailActivity.class);
intent.putExtra("loginName", username);
intent.putExtra("avatarUrl", UrlUtils.getAvaterurlm(uid));
needAnimate = true;
ActivityOptionsCompat options = ActivityOptionsCompat.makeSceneTransitionAnimation(activity, imgAvatar, NAME_IMG_AVATAR);
ActivityCompat.startActivity(activity, intent, options.toBundle());
}
use of android.support.v4.app.ActivityOptionsCompat in project Ruisi by freedom10086.
the class LaunchActivity method enterHome.
private void enterHome() {
if (isForeGround) {
ActivityOptionsCompat compat = ActivityOptionsCompat.makeCustomAnimation(this, R.anim.fade_in, R.anim.fade_out);
Intent i = new Intent();
ActivityCompat.startActivity(this, new Intent(this, HomeActivity.class), compat.toBundle());
new Handler().postDelayed(() -> finish(), 305);
}
}
Aggregations