Skip to content

Instantly share code, notes, and snippets.

@ibrahimsn98
Last active August 19, 2018 15:38
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save ibrahimsn98/aa138ac53b88a9d2894509e9a6aeda38 to your computer and use it in GitHub Desktop.
android-mvvm-with-dagger-2
public abstract class BaseActivity extends DaggerAppCompatActivity {
@LayoutRes
protected abstract int layoutRes();
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(layoutRes());
ButterKnife.bind(this);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment