Advertisement
Putra-Kun123

MenuActivity.java

Feb 23rd, 2020
8,664
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.40 KB | None | 0 0
  1. package notes.bapakkau;
  2.  
  3. import android.app.Activity;
  4. import android.content.Intent;
  5. import android.os.Bundle;
  6. import android.view.View;
  7. import android.view.View.OnClickListener;
  8. import android.widget.Button;
  9.  
  10. public class MenuActivity extends Activity {
  11. Button input, tampil, keluar, ganti;
  12. /** Called when the activity is first created. */
  13. @Override
  14. public void onCreate(Bundle savedInstanceState) {
  15. super.onCreate(savedInstanceState);
  16. setContentView(R.layout.menu);
  17. input=(Button)findViewById(R.id.btninput);
  18. tampil=(Button)findViewById(R.id.btntampil);
  19. keluar=(Button)findViewById(R.id.btnkeluar);
  20. ganti=(Button)findViewById(R.id.btnganti);
  21. input.setOnClickListener(new OnClickListener() {
  22. public void onClick(View arg0) {
  23. Intent i=new Intent (getBaseContext(),InputActivity.class);
  24. startActivity(i);
  25. }
  26. });
  27. tampil.setOnClickListener(new OnClickListener() {
  28. public void onClick(View arg0) {
  29. Intent i=new Intent (getBaseContext(),TampilActivity.class);
  30. startActivity(i);
  31. }
  32. });
  33. keluar.setOnClickListener(new OnClickListener() {
  34. public void onClick(View arg0) {
  35. finish();
  36. }
  37. });
  38. ganti.setOnClickListener(new OnClickListener() {
  39. public void onClick(View arg0) {
  40. Intent i=new Intent (getBaseContext(),GantiActivity.class);
  41. startActivity(i);
  42. }
  43. });
  44. }
  45. }
  46. // ig harymalau
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement