Android和依赖注入Android

2023-09-12 10:51:10 作者:独享你的温柔√

我一直在四处寻找,白费,在Android开发使用依赖注入容器的一些信息。具体来说,如何覆盖创建一个活动的方式被杀死回来(无论何种原因)的时候,也将工作的。

I've been looking around, in vain, for some information on using a dependency injection container in Android development. Specifically, how to override the creation of an Activity in a way that will also work when coming back from being killed (for whatever reason).

有没有人有这方面的经验吗?

Has anyone got any experience in this area?

推荐答案

这似乎可以使用的谷歌吉斯2.0 与Android。你也可以考虑 roboguice 。

It appears you can use Google Guice 2.0 with Android. You might also look into roboguice.

编辑:

春天是现在也可用于Android