Back to project page mvp-notes.
The source code is released under:
Apache License
If you think the Android project mvp-notes 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 com.corneliudascalu.mvpnotes.common; //from ww w . ja v a 2 s . c o m import android.app.DialogFragment; import android.os.Bundle; import java.util.List; import dagger.ObjectGraph; /** * @author Corneliu Dascalu <corneliu.dascalu@gmail.com> */ public abstract class InjectedDialogFragment extends DialogFragment { private ObjectGraph objectGraph; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); objectGraph = ObjectGraphHolder .createScopedObjectGraph(getActivity().getApplication(), getModules().toArray()); objectGraph.inject(this); } protected abstract List<Object> getModules(); @Override public void onDestroy() { super.onDestroy(); objectGraph = null; } }