Back to project page DistributedMemory.
The source code is released under:
Apache License
If you think the Android project DistributedMemory listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package org.faudroids.distributedmemory.common; /*from w ww . j a va2 s . c o m*/ import android.app.Activity; import android.os.Bundle; import java.util.List; import dagger.ObjectGraph; public abstract class BaseActivity extends Activity { private ObjectGraph objectGraph; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); this.objectGraph = ((Injector) getApplication()).createScopedGraph(getModules().toArray()); this.objectGraph.inject(this); } @Override protected void onDestroy() { objectGraph = null; super.onDestroy(); } protected abstract List<Object> getModules(); }