Guest User

Untitled

a guest
Jun 25th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.41 KB | None | 0 0
  1. package com.ira.listas;
  2.  
  3. import android.app.Activity;
  4. import android.os.Bundle;
  5. import android.view.View;
  6. import android.view.View.OnClickListener;
  7. import android.widget.CheckBox;
  8. import android.widget.Toast;
  9. import android.app.Activity;
  10. import android.os.Bundle;
  11. import android.view.View;
  12. import android.view.View.OnClickListener;
  13. import android.widget.Button;
  14. import android.widget.CheckBox;
  15. import android.widget.Toast;
  16.  
  17. public class segundo extends Activity implements OnClickListener
  18. {
  19. Button b1;
  20. CheckBox c1, c2;
  21. Toast msg;
  22.  
  23. public void onCreate(Bundle icicle)
  24. {
  25. super.onCreate(icicle);
  26. setContentView(R.layout.segundo);
  27.  
  28. c1 = (CheckBox) findViewById(R.id.checkBox1);
  29. c1.setOnClickListener(this);
  30. }
  31.  
  32. public void onClick(View arg0)
  33. {
  34. // TODO Auto-generated method stub
  35. if (c1.isChecked()==true)
  36. {
  37. msg = Toast.makeText(segundo.this, "marcado", Toast.LENGTH_SHORT);
  38. msg.show();
  39. }
  40. if (c1.isChecked()==false)
  41. {
  42. msg = Toast.makeText(segundo.this,"NO marcado", Toast.LENGTH_SHORT);
  43. msg.show();
  44. }
  45.  
  46.  
  47. }
  48.  
  49. }
Add Comment
Please, Sign In to add comment