package study.sol.radioex1;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.RadioGroup;
import android.widget.Toast;

public class RadioEx1Activity extends Activity implements OnClickListener{
    /** Called when the activity is first created. */
	
	RadioGroup rg;
	Button  bt;
	
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
        rg= (RadioGroup) findViewById(R.id.radioGroup1);
        bt=(Button) findViewById(R.id.button1);
        
        bt.setOnClickListener(this);
        
    }

	@Override
	public void onClick(View v) {
		// TODO Auto-generated method stub
		
		String result ="";
		
		if(v.getId()==R.id.button1){
			
			if(rg.getCheckedRadioButtonId()== R.id.radio0){
				result="³²ÀÚ";	
			}else{
				result="¿©ÀÚ";
			}
		}

	 Toast.makeText(this, result, Toast.LENGTH_SHORT).show();
	//Toast.makeText(this, result, Toast.LENGTH_SHORT).show();
	}
}