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

demo里面有个DemoService,如何注入Presenter的,或者有没有demo参考一下 #121

Closed
amin168 opened this issue Aug 1, 2017 · 5 comments

Comments

@amin168
Copy link

amin168 commented Aug 1, 2017

No description provided.

@amin168
Copy link
Author

amin168 commented Aug 1, 2017

还有就是Service的生命周期,我看Presenter都是ActivityScope,我是不是要自定义一个Scope的管理的

@JessYanCoding
Copy link
Owner

1.建议你去看看 dagger 的教学文章,如果真的看懂了,结合 Activity 的注入方式,是肯定能写出 service 的注入方式的,我不可能也没精力把所有可能发生的注入方式都写到demo上,对我来说他们都是差不多的,我也希望用我的框架的人,是真的能学到东西而不是只会用我给你的现成的东西

2.Scope 你用框架定义的,还是自己自定义都是没有任何区别的,你如果认真看懂了 dagger ,自然明白我的意思

@amin168
Copy link
Author

amin168 commented Aug 2, 2017

@JessYanCoding 昨晚想了一下,貌似知道怎么做了,谢谢哈

@amin168 amin168 closed this as completed Aug 2, 2017
@JessYanCoding
Copy link
Owner

嗯,加油✊

@Sum41forever
Copy link
Contributor

详细解答在这里,把相同的问题定位在一起
Presenter 怎么注入的,注入对象的来源
复用的Presenter 注入简单示例

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

3 participants