Created
March 11, 2017 05:20
-
-
Save Logan676/eb60d7762ac3117fd780a43c55c530c4 to your computer and use it in GitHub Desktop.
优雅地启动activity的方法
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, CommonUtils.getString(R.string.transition_book_img));//与xml文件对应 | |
ActivityCompat.startActivity(context, intent, options.toBundle()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment