Skip to content

Instantly share code, notes, and snippets.

@ppamorim
Created June 29, 2015 03:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ppamorim/298ee79a88ed98c3a723 to your computer and use it in GitHub Desktop.
Save ppamorim/298ee79a88ed98c3a723 to your computer and use it in GitHub Desktop.
public abstract class AbstractActivity extends AppCompatActivity {
@Override protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(getLayoutId()); //This guy accept a Integer and View...
ButterKnife.bind(this);
}
protected abstract int getLayoutId();
protected abstract View getLayoutId();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment