Skip to content

Instantly share code, notes, and snippets.

@blackmann
Created July 26, 2016 22:29
Show Gist options
  • Save blackmann/e8a8b0783394f22d0e7f4cdecafe5560 to your computer and use it in GitHub Desktop.
Save blackmann/e8a8b0783394f22d0e7f4cdecafe5560 to your computer and use it in GitHub Desktop.
import android.os.Bundle;
import android.support.annotation.Nullable;
public class MainActivity extends BaseActivity {
@Override
protected int getMenuRes() {
return R.menu.menu_main;
}
// just go on and setContentView, the magic happens here
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// the BaseActivity.setContentView will be called instead
setContentView(R.layout.activity_main);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment