Skip to content

Instantly share code, notes, and snippets.

@larkintuckerllc
Created December 1, 2017 15:08
Show Gist options
  • Save larkintuckerllc/393e0dd4a079f034e7a2f2dc549a0b33 to your computer and use it in GitHub Desktop.
Save larkintuckerllc/393e0dd4a079f034e7a2f2dc549a0b33 to your computer and use it in GitHub Desktop.
How-to Dagger 2 with Android: Part 3 - 4
...
loginButton.setOnClickListener((v) -> {
String login = loginEditText.getText().toString().trim();
if (login.matches("")) {
return;
}
Credentials credentials = MyApplication
.plusAuthComponent()
.getCredentials();
credentials.setLogin(login);
startActivity(new Intent(this, Main2Activity.class));
});
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment