fragment下监听onActivityForResult - #968
Closed
wangrunxiang wants to merge 1 commit into
Closed
Conversation
|
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. |
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 方案重新提交。 |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
增加方法,实现Fragment.startActivityForResult,用来方便在fragment下监听onActivityForResult