Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于依赖注入的使用 #19

Closed
iwenchao opened this issue Apr 17, 2018 · 1 comment
Closed

关于依赖注入的使用 #19

iwenchao opened this issue Apr 17, 2018 · 1 comment

Comments

@iwenchao
Copy link

initInject()在每个activity中进行注入,方式不是很友好;
我这有个不太成熟的建议:通过反射的方式,统一在基类中注入

@JsonChao
Copy link
Owner

Thank your issue, 首先,反射比较耗性能,其次,在基类中注入会显得不够灵活,之所以使用抽象方法的方式让对应的Activity或Fragment实现,就是为了能够具备灵活的依赖注入~

@JsonChao JsonChao reopened this Apr 17, 2018
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

No branches or pull requests

2 participants