Skip to content

Instantly share code, notes, and snippets.

@ibrahimsn98
Last active August 19, 2018 15:38
Show Gist options
  • Save ibrahimsn98/aa138ac53b88a9d2894509e9a6aeda38 to your computer and use it in GitHub Desktop.
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