Skip to content

Instantly share code, notes, and snippets.

@lukaspili
Created March 6, 2015 22:56
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 lukaspili/a85175fe529950d48941 to your computer and use it in GitHub Desktop.
Save lukaspili/a85175fe529950d48941 to your computer and use it in GitHub Desktop.
public class SimpleScreen {
@dagger.Component(dependencies = SimpleMortarActivity.Component.class)
@CustomScope(Component.class)
public static interface Component
extends SimpleMortarActivity.Component {
void inject(SimpleView view);
}
@CustomScope(Component.class)
public static class Presenter extends ViewPresenter<SimpleView> {
@Inject
public Presenter() {
}
@Override
protected void onLoad(Bundle savedInstanceState) {
super.onLoad(savedInstanceState);
// CALLED EACH TIME WE SHOW THE NEW VIEW
// SO AFTER ROTATION AS WELL
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment