Last active
August 4, 2018 22:20
-
-
Save paulocns/59016d7c3107f6512bc1c538c6cfc6a6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public abstract class BaseFragment extends Fragment { | |
@Inject | |
ProjectViewModelFactory viewModelFactory; | |
@Override | |
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) { | |
super.onViewCreated(view, savedInstanceState); | |
DevCampApplication app = (DevCampApplication) getActivity().getApplication(); | |
DaggerBaseFragmentComponent.builder().applicationComponent(app.getApplicationComponent()) | |
.build().inject(this); | |
} | |
protected ProjectViewModelFactory getViewModelFactory(){ | |
return viewModelFactory; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment