app/src/main/java/org/taitasciore/android/paymettest/details/DetailsFragment.java
@Override
    public void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setRetainInstance(true);

        MarvelApp marvelApp = ((MarvelApp) getActivity().getApplication());
        DetailsComponent detailsComponent = DaggerDetailsComponent.builder()
                .networkComponent(marvelApp.getNetworkComponent())
                .detailsModule(new DetailsModule(this))
                .build();
        detailsComponent.inject(this);

        mComicId = getArguments().getInt("comic_id");
    }
/**
     * Presenter is injected via Dagger
     * @param savedInstanceState
     */
Presenter is injected via Dagger
@param savedInstanceState
Presenter is injected via Dagger @param savedInstanceState
@Override
    public void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setRetainInstance(true);
        MarvelApp marvelApp = ((MarvelApp) getActivity().getApplication());
        DetailsComponent detailsComponent = DaggerDetailsComponent.builder()
                .networkComponent(marvelApp.getNetworkComponent())
                .detailsModule(new DetailsModule(this))
                .build();
        detailsComponent.inject(this);
        mComicId = getArguments().getInt("comic_id");
    }
@ Override public void onCreate ( @ Nullable Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setRetainInstance ( true ) ; MarvelApp marvelApp = ( ( MarvelApp ) getActivity ( ) . getApplication ( ) ) ; DetailsComponent detailsComponent = DaggerDetailsComponent . builder ( ) . networkComponent ( marvelApp . getNetworkComponent ( ) ) . detailsModule ( new DetailsModule ( this ) ) . build ( ) ; detailsComponent . inject ( this ) ; mComicId = getArguments ( ) . getInt ( "comic_id" ) ; }
Presenter is injected via Dagger
 @param savedInstanceState
Presenter is injected via Dagger @param savedInstanceState