Guest User

Untitled

a guest
Oct 22nd, 2017
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. package com.Catchirus.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.view.View.OnClickListener;
  8.  
  9. public class CatchirusActivity extends Activity implements OnClickListener {
  10. /** Called when the activity is first created. */
  11. @Override
  12. public void onCreate(Bundle savedInstanceState) {
  13. super.onCreate(savedInstanceState);
  14. setContentView(R.layout.main);
  15. // click-handlers for buttons
  16. View aboutButton = findViewById(R.id.about_button);
  17. aboutButton.setOnClickListener(this);
  18. }
  19.  
  20. public void onClick(View v) {
  21. switch (v.getId()) {
  22. case R.id.about_button:
  23. Intent i = new Intent(this, AboutActivity.class);
  24. startActivity(i);
  25. break;
  26. }
  27. }
  28. }
Add Comment
Please, Sign In to add comment