Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.ira.listas;
- import android.app.Activity;
- import android.os.Bundle;
- import android.view.View;
- import android.view.View.OnClickListener;
- import android.widget.CheckBox;
- import android.widget.Toast;
- import android.app.Activity;
- import android.os.Bundle;
- import android.view.View;
- import android.view.View.OnClickListener;
- import android.widget.Button;
- import android.widget.CheckBox;
- import android.widget.Toast;
- public class segundo extends Activity implements OnClickListener
- {
- Button b1;
- CheckBox c1, c2;
- Toast msg;
- public void onCreate(Bundle icicle)
- {
- super.onCreate(icicle);
- setContentView(R.layout.segundo);
- c1 = (CheckBox) findViewById(R.id.checkBox1);
- c1.setOnClickListener(this);
- }
- public void onClick(View arg0)
- {
- // TODO Auto-generated method stub
- if (c1.isChecked()==true)
- {
- msg = Toast.makeText(segundo.this, "marcado", Toast.LENGTH_SHORT);
- msg.show();
- }
- if (c1.isChecked()==false)
- {
- msg = Toast.makeText(segundo.this,"NO marcado", Toast.LENGTH_SHORT);
- msg.show();
- }
- }
- }
Add Comment
Please, Sign In to add comment