Advertisement
Guest User

Untitled

a guest
Jan 24th, 2017
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. public class AuthenticationActivity extends AppCompatActivity implements View.OnClickListener {
  2.  
  3. EditText username, password;
  4. Button signInButton, registerButton;
  5.  
  6. @Override
  7. protected void onCreate(Bundle savedInstanceState) {
  8. super.onCreate(savedInstanceState);
  9. setContentView(R.layout.activity_authentication);
  10.  
  11. username = (EditText) findViewById(R.id.username);
  12. password = (EditText) findViewById(R.id.password);
  13. signInButton = (Button) findViewById(R.id.signInButton);
  14. registerButton = (Button) findViewById(R.id.registerButton);
  15.  
  16. signInButton.setOnClickListener(this);
  17. registerButton.setOnClickListener(this);
  18. }
  19.  
  20. @Override
  21. public void onClick(View v) {
  22. switch (v.getId()) {
  23. case R.id.signInButton:
  24. handleLogin();
  25. break;
  26. case R.id.registerButton:
  27. handleRegistration();
  28. break;
  29. }
  30. }
  31.  
  32. private void handleLogin() {}
  33. private void handleRegistration() {}
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement