didi / DRouter

Android Router Framework
Apache License 2.0
745 stars 93 forks source link

请问使用共享元素动画做转场动画,怎么跳转 #25

Closed oooo7777777 closed 2 years ago

oooo7777777 commented 2 years ago

val bundle = ActivityOptionsCompat.makeSceneTransitionAnimation(mContext, Pair(view.findViewById(R.id.ivCover), "ivCover")).toBundle() val intent = Intent(mContext, CourseDetailsActivity::class.java) intent.putExtra("cover", item.cover) intent.putExtra("title", item.name) startActivity(intent, bundle)

weigao123 commented 2 years ago

使用 Extend.START_ACTIVITY_OPTIONS,把Bundle放到这个参数里

weigao123 commented 2 years ago

.putExtra(Extend.START_ACTIVITY_OPTIONS, Bundle())

wflian commented 2 years ago

这只支持Activity吧?Fragment不支持吧?

oooo7777777 commented 2 years ago

这是来自QQ邮箱的假期自动回复邮件。   您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。

MarkLDS commented 1 year ago

这只支持Activity吧?Fragment不支持吧?

我也遇到了 兄弟这个后面有解决吗