Android Open Source - mvp-notes Injected Dialog Fragment






From Project

Back to project page mvp-notes.

License

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.

Java Source Code

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;
    }
}




Java Source Code List

com.corneliudascalu.mvpnotes.AppModule.java
com.corneliudascalu.mvpnotes.MVPNotesApp.java
com.corneliudascalu.mvpnotes.common.BaseInjectedActivity.java
com.corneliudascalu.mvpnotes.common.InjectedDialogFragment.java
com.corneliudascalu.mvpnotes.common.ObjectGraphCreator.java
com.corneliudascalu.mvpnotes.common.ObjectGraphHolder.java
com.corneliudascalu.mvpnotes.data.interactor.InteractorsModule.java
com.corneliudascalu.mvpnotes.data.interactor.NoteInteractor.java
com.corneliudascalu.mvpnotes.data.interactor.impl.NoteInteractorImpl.java
com.corneliudascalu.mvpnotes.data.model.DatabaseModule.java
com.corneliudascalu.mvpnotes.data.model.Note.java
com.corneliudascalu.mvpnotes.data.model.SimpleDatabase.java
com.corneliudascalu.mvpnotes.ui.view.details.NoteDetailsDialogFragment.java
com.corneliudascalu.mvpnotes.ui.view.details.NoteDetailsModule.java
com.corneliudascalu.mvpnotes.ui.view.details.SimpleNoteDetailsPresenter.java
com.corneliudascalu.mvpnotes.ui.view.details.interfaces.NoteDetailsPresenter.java
com.corneliudascalu.mvpnotes.ui.view.details.interfaces.NoteDetailsView.java
com.corneliudascalu.mvpnotes.ui.view.main.NotesActivity.java
com.corneliudascalu.mvpnotes.ui.view.main.NotesModule.java
com.corneliudascalu.mvpnotes.ui.view.main.NotesPresenter.java
com.corneliudascalu.mvpnotes.ui.view.main.NotesView.java
com.corneliudascalu.mvpnotes.ui.view.main.OnNoteOperationListener.java
com.corneliudascalu.mvpnotes.ui.view.main.SimpleNotesPresenter.java
com.corneliudascalu.mvpnotes.util.DateTimeDeserializer.java
com.corneliudascalu.mvpnotes.util.DateTimeSerializer.java