use of android.support.v4.app.ActivityOptionsCompat in project TicktockMusic by Lauzy.
the class Navigator method navigateToPlayActivity.
public void navigateToPlayActivity(Context context, ImageView imageView) {
if (context == null) {
return;
}
Intent intent = PlayActivity.newInstance(context);
if (imageView == null) {
context.startActivity(intent);
return;
}
ActivityOptionsCompat optionsCompat = ActivityOptionsCompat.makeSceneTransitionAnimation(((Activity) context), imageView, context.getString(R.string.play_view_transition_name));
context.startActivity(intent, optionsCompat.toBundle());
}
use of android.support.v4.app.ActivityOptionsCompat in project anitrend-app by AniTrend.
the class CompatUtil method startSharedTransitionActivity.
/**
* Starts a shared transition of activities connected by views
* <br/>
*
* @param base The calling activity
* @param target The view from the calling activity with transition name
* @param data Intent with bundle and or activity to start
*/
public static void startSharedTransitionActivity(FragmentActivity base, View target, Intent data) {
Pair participants = new Pair<>(target, ViewCompat.getTransitionName(target));
ActivityOptionsCompat transitionActivityOptions = ActivityOptionsCompat.makeSceneTransitionAnimation(base, participants);
ActivityCompat.startActivity(base, data, transitionActivityOptions.toBundle());
}
use of android.support.v4.app.ActivityOptionsCompat in project anitrend-app by AniTrend.
the class CompatUtil method startSharedImageTransition.
/**
* Starts a shared transition of activities connected by views
* by making use of the provided transition name
* <br/>
*
* @param base The calling activity
* @param target The view from the calling activity with transition name
* @param data Intent with bundle and or activity to start
*/
public static void startSharedImageTransition(FragmentActivity base, View target, Intent data, @StringRes int transitionName) {
ViewCompat.setTransitionName(target, base.getString(transitionName));
ActivityOptionsCompat transition = ActivityOptionsCompat.makeSceneTransitionAnimation(base, target, ViewCompat.getTransitionName(target));
base.startActivity(data, transition.toBundle());
}
use of android.support.v4.app.ActivityOptionsCompat in project MaterializeYourApp by antoniolg.
the class DetailActivity method navigate.
public static void navigate(AppCompatActivity activity, View transitionImage, ViewModel viewModel) {
Intent intent = new Intent(activity, DetailActivity.class);
intent.putExtra(EXTRA_IMAGE, viewModel.getImage());
intent.putExtra(EXTRA_TITLE, viewModel.getText());
ActivityOptionsCompat options = ActivityOptionsCompat.makeSceneTransitionAnimation(activity, transitionImage, EXTRA_IMAGE);
ActivityCompat.startActivity(activity, intent, options.toBundle());
}
use of android.support.v4.app.ActivityOptionsCompat in project animate by hitherejoe.
the class SharedTransitionsActivity method startToolbarTransition.
@OnClick(R.id.text_shared_toolbar)
public void startToolbarTransition() {
Intent intent = new Intent(SharedTransitionsActivity.this, SharedTransitionToolbarActivity.class);
Pair squareParticipant = new Pair<>(mRelativeView, ViewCompat.getTransitionName(mRelativeView));
Pair toolbarParticipants = new Pair<>(mToolbarView, ViewCompat.getTransitionName(mToolbarView));
ActivityOptionsCompat transitionActivityOptions = ActivityOptionsCompat.makeSceneTransitionAnimation(SharedTransitionsActivity.this, squareParticipant, toolbarParticipants);
ActivityCompat.startActivity(SharedTransitionsActivity.this, intent, transitionActivityOptions.toBundle());
}
Aggregations