Advertisement
Guest User

Untitled

a guest
Apr 24th, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.24 KB | None | 0 0
  1. package com.android;
  2.  
  3. import android.app.Activity;
  4. import android.content.Intent;
  5. import android.os.Bundle;
  6. import android.view.View;
  7. import android.widget.Button;
  8.  
  9. public class StudentInformationSystem extends Activity {
  10. Button btn;
  11. Button btnn;
  12.  
  13. @Override
  14. public void onCreate(Bundle savedInstanceState) {
  15. super.onCreate(savedInstanceState);
  16. setContentView(R.layout.activity_welcome);
  17.  
  18. btn = (Button) findViewById(R.id.btnRegistration);
  19. btnn = (Button) findViewById(R.id.btnLogin);
  20.  
  21. btn.setOnClickListener(new View.OnClickListener() {
  22.  
  23.  
  24. public void onClick(View v) {
  25. openRegisterActivity();
  26. }
  27. });
  28.  
  29. btnn.setOnClickListener(new View.OnClickListener() {
  30.  
  31.  
  32. public void onClick(View v) {
  33. openLoginActivity();
  34. }
  35. });
  36.  
  37.  
  38. }
  39.  
  40. public void openRegisterActivity(){
  41. Intent intent = new Intent(this, RegisterActivity.class);
  42. startActivity(intent);
  43. }
  44.  
  45. public void openLoginActivity(){
  46. Intent intent = new Intent(this, LoginActivity.class);
  47. startActivity(intent);
  48. }
  49.  
  50. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement