Skip to content

Instantly share code, notes, and snippets.

@frogermcs
Created August 13, 2016 15:09
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 frogermcs/b5a54d5089a9dcd5cbfaa9b7175b53cd to your computer and use it in GitHub Desktop.
Save frogermcs/b5a54d5089a9dcd5cbfaa9b7175b53cd to your computer and use it in GitHub Desktop.
//UserDetailsActivity
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_user_details);
tvUser = (TextView) findViewById(R.id.tvUser);
tvUserUrl = (TextView) findViewById(R.id.tvUserUrl);
//This check has to be called. Otherwise, when user is not logged in, presenter won't be injected and this line will cause NPE
if (isUserSessionStarted()) {
presenter.onCreate();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment