Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class AuthenticationActivity extends AppCompatActivity implements View.OnClickListener {
- EditText username, password;
- Button signInButton, registerButton;
- @Override
- protected void onCreate(Bundle savedInstanceState) {
- super.onCreate(savedInstanceState);
- setContentView(R.layout.activity_authentication);
- username = (EditText) findViewById(R.id.username);
- password = (EditText) findViewById(R.id.password);
- signInButton = (Button) findViewById(R.id.signInButton);
- registerButton = (Button) findViewById(R.id.registerButton);
- signInButton.setOnClickListener(this);
- registerButton.setOnClickListener(this);
- }
- @Override
- public void onClick(View v) {
- switch (v.getId()) {
- case R.id.signInButton:
- handleLogin();
- break;
- case R.id.registerButton:
- handleRegistration();
- break;
- }
- }
- private void handleLogin() {}
- private void handleRegistration() {}
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement