Skip to content

fragment下监听onActivityForResult - #968

Closed
wangrunxiang wants to merge 1 commit into
alibaba:developfrom
wangrunxiang:develop
Closed

fragment下监听onActivityForResult#968
wangrunxiang wants to merge 1 commit into
alibaba:developfrom
wangrunxiang:develop

Conversation

@wangrunxiang

Copy link
Copy Markdown
Contributor

增加方法,实现Fragment.startActivityForResult,用来方便在fragment下监听onActivityForResult

@CLAassistant

CLAassistant commented Nov 23, 2021

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


wangrunxiang seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@zhi1ong

zhi1ong commented Aug 29, 2026

Copy link
Copy Markdown
Member

感谢贡献。这个 PR 当前不能合入:startActivity 中对 fragment != null 和 currentContext instanceof Activity 使用了两个独立的 if。Fragment 调用时通常两个条件都成立,会先调用 Fragment.startActivityForResult,再调用 ActivityCompat.startActivityForResult,导致目标 Activity 被启动两次。此外,新 API 固定依赖 android.support.v4.app.Fragment 和已弃用的 onActivityResult 模型,不符合后续 AndroidX / Activity Result 的兼容方向。相关能力由 #905 统一跟踪;关闭此 PR,后续请基于最新 develop 和 #905 的 API 方案重新提交。

@zhi1ong zhi1ong closed this Aug 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants