Guest User

Untitled

a guest
Jul 20th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. public abstract class BaseFragment extends Fragment {
  2.  
  3. @Inject
  4. ProjectViewModelFactory mViewModelFactory;
  5.  
  6. @Override
  7. public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
  8. super.onViewCreated(view, savedInstanceState);
  9. DevCampApplication app = (DevCampApplication) getActivity().getApplication();
  10. DaggerBaseFragmentComponent.builder().applicationComponent(app.getApplicationComponent())
  11. .build().inject(this);
  12. }
  13. protected ProjectViewModelFactory getViewModelFactory(){
  14. return mViewModelFactory;
  15. }
  16. }
Add Comment
Please, Sign In to add comment