use of android.support.v4.app.ActivityOptionsCompat in project Meizhi by drakeet.
the class MainActivity method startPictureActivity.
private void startPictureActivity(Meizhi meizhi, View transitView) {
Intent intent = PictureActivity.newIntent(MainActivity.this, meizhi.url, meizhi.desc);
ActivityOptionsCompat optionsCompat = ActivityOptionsCompat.makeSceneTransitionAnimation(MainActivity.this, transitView, PictureActivity.TRANSIT_PIC);
try {
ActivityCompat.startActivity(MainActivity.this, intent, optionsCompat.toBundle());
} catch (IllegalArgumentException e) {
e.printStackTrace();
startActivity(intent);
}
}
use of android.support.v4.app.ActivityOptionsCompat in project CloudReader by youlookwhat.
the class OneMovieDetailActivity method start.
/**
* @param context activity
* @param positionData bean
* @param imageView imageView
*/
public static void start(Activity context, SubjectsBean positionData, ImageView imageView) {
Intent intent = new Intent(context, OneMovieDetailActivity.class);
intent.putExtra("bean", positionData);
ActivityOptionsCompat options = ActivityOptionsCompat.makeSceneTransitionAnimation(context, imageView, //与xml文件对应
CommonUtils.getString(R.string.transition_movie_img));
ActivityCompat.startActivity(context, intent, options.toBundle());
}
use of android.support.v4.app.ActivityOptionsCompat in project CloudReader by youlookwhat.
the class SlideScrollViewActivity method start.
/**
* @param context activity
* @param positionData bean
* @param imageView imageView
*/
public static void start(Activity context, SubjectsBean positionData, ImageView imageView) {
Intent intent = new Intent(context, SlideScrollViewActivity.class);
intent.putExtra("bean", positionData);
ActivityOptionsCompat options = ActivityOptionsCompat.makeSceneTransitionAnimation(context, imageView, //与xml文件对应
CommonUtils.getString(R.string.transition_movie_img));
ActivityCompat.startActivity(context, intent, options.toBundle());
}
use of android.support.v4.app.ActivityOptionsCompat in project CloudReader by youlookwhat.
the class BookDetailActivity method start.
/**
* @param context activity
* @param positionData bean
* @param imageView imageView
*/
public static void start(Activity context, BooksBean positionData, ImageView imageView) {
Intent intent = new Intent(context, BookDetailActivity.class);
intent.putExtra(EXTRA_PARAM, positionData);
ActivityOptionsCompat options = ActivityOptionsCompat.makeSceneTransitionAnimation(context, imageView, //与xml文件对应
CommonUtils.getString(R.string.transition_book_img));
ActivityCompat.startActivity(context, intent, options.toBundle());
}
use of android.support.v4.app.ActivityOptionsCompat in project android-topeka by googlesamples.
the class CategorySelectionFragment method startQuizActivityWithTransition.
private void startQuizActivityWithTransition(Activity activity, View toolbar, Category category) {
final Pair[] pairs = TransitionHelper.createSafeTransitionParticipants(activity, false, new Pair<>(toolbar, activity.getString(R.string.transition_toolbar)));
@SuppressWarnings("unchecked") ActivityOptionsCompat sceneTransitionAnimation = ActivityOptionsCompat.makeSceneTransitionAnimation(activity, pairs);
// Start the activity with the participants, animating from one to the other.
final Bundle transitionBundle = sceneTransitionAnimation.toBundle();
Intent startIntent = QuizActivity.getStartIntent(activity, category);
ActivityCompat.startActivityForResult(activity, startIntent, REQUEST_CATEGORY, transitionBundle);
}
Aggregations