Open
Conversation
|
确实有必要,虽然不清楚为什么作者要把该方法定义为project,但是我在自己的项目中只能重新继承了callback然后暴露出onSuccess供调用。不是很方便 |
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.
建议把onSucess 设为公开函数,这样有利于android 代码开发时的分层!比如在界面层返回的是一个对象,这样可以把网络访问层的代码单独放置一层请求返回的是StringRequestCallback,但是通过Json处理后转为对象,就可以在成功的时候,直接用界面层传过来的其他回调指针,又可以回到UI层处理!代码写出来更清晰逻辑!