Advertisement
Guest User

Untitled

a guest
Jul 19th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.61 KB | None | 0 0
  1. package com.example.bracathon;
  2.  
  3. import android.content.Intent;
  4. import android.support.v7.app.AppCompatActivity;
  5. import android.os.Bundle;
  6. import android.view.View;
  7. import android.widget.LinearLayout;
  8.  
  9. import java.util.Objects;
  10.  
  11. public class ManagerHome extends AppCompatActivity {
  12.  
  13. LinearLayout addTask, notification, dues, ranks, report, automatedCall;
  14.  
  15. @Override
  16. protected void onCreate(Bundle savedInstanceState) {
  17. super.onCreate(savedInstanceState);
  18. setContentView(R.layout.activity_manager_home);
  19.  
  20. Objects.requireNonNull(getSupportActionBar()).setTitle("App");
  21.  
  22. initViews();
  23.  
  24. addTask.setOnClickListener(new View.OnClickListener() {
  25. @Override
  26. public void onClick(View v) {
  27. Intent intent = new Intent(ManagerHome.this, AddTask.class);
  28. startActivity(intent);
  29. }
  30. });
  31.  
  32. notification.setOnClickListener(new View.OnClickListener() {
  33. @Override
  34. public void onClick(View v) {
  35. Intent intent = new Intent(ManagerHome.this, Notification.class);
  36. startActivity(intent);
  37. }
  38. });
  39.  
  40. dues.setOnClickListener(new View.OnClickListener() {
  41. @Override
  42. public void onClick(View v) {
  43. Intent intent = new Intent(ManagerHome.this, Dues.class);
  44. startActivity(intent);
  45. }
  46. });
  47.  
  48. ranks.setOnClickListener(new View.OnClickListener() {
  49. @Override
  50. public void onClick(View v) {
  51. Intent intent = new Intent(ManagerHome.this, Ranking.class);
  52. startActivity(intent);
  53. }
  54. });
  55.  
  56. report.setOnClickListener(new View.OnClickListener() {
  57. @Override
  58. public void onClick(View v) {
  59. Intent intent = new Intent(ManagerHome.this, Report.class);
  60. startActivity(intent);
  61. }
  62. });
  63.  
  64. automatedCall.setOnClickListener(new View.OnClickListener() {
  65. @Override
  66. public void onClick(View v) {
  67. Intent intent = new Intent(ManagerHome.this, AutomatedCall.class);
  68. startActivity(intent);
  69. }
  70. });
  71. }
  72.  
  73. private void initViews() {
  74. addTask = findViewById(R.id.addTask);
  75. notification = findViewById(R.id.notification);
  76. dues = findViewById(R.id.dues);
  77. ranks = findViewById(R.id.poRanks);
  78. report = findViewById(R.id.report);
  79. automatedCall = findViewById(R.id.automatedCall);
  80. }
  81. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement