Advertisement
Guest User

Untitled

a guest
Apr 2nd, 2016
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. protected void onCreate(Bundle savedInstanceState) {
  2. super.onCreate(savedInstanceState);
  3. setContentView(R.layout.login);
  4. setupVariables();
  5. }
  6.  
  7. private void setupVariables() {
  8. username = (EditText) findViewById(R.id.username);
  9. password = (EditText) findViewById(R.id.password);
  10. login = (Button) findViewById(R.id.button);
  11.  
  12. }
  13.  
  14. public void Login(View view) {
  15. if (username.getText().toString().equals("admin") && password.getText().toString().equals("secret")) {
  16. /* switches activity if the username and password matches the string */
  17. }
  18. else {
  19.  
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement