I'm trying for a radio group which contain 6 radio button , I set my radio Buttons but I want to set a dialog which if a user didn't check any radio button and click the convert button the dialog say sth
my java code :

```
public class Third extends Activity    {

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.third);

    Button d = (Button) findViewById(R.id.btn4);
    d.setOnClickListener(new OnClickListener() {
            @Override
            public void onClick(View arg0) {
                    dialog();
                }
            public void dialog(){

                final Dialog dialog = new Dialog(Third.this);
                dialog.setContentView(R.layout.dialog);
                dialog.setTitle("please enter a unit");
                dialog.show();
                 RadioGroup rg = (RadioGroup) dialog.findViewById(R.id.rg);
                rg.setOnCheckedChangeListener(new OnCheckedChangeListener() {
                RadioButton rb1 = (RadioButton) dialog.findViewById(R.id.rb1);
                  public void onCheckedChanged(RadioGroup arg0, int arg1) {
                       if (rb1.isChecked()){

                         dialog.dismiss();
                         Button btc = (Button)findViewById(R.id.btn5);
                         btc.setOnClickListener(new OnClickListener() {

                            @Override
                            public void onClick(View arg0) {

                            EditText ft1 = (EditText)findViewById(R.id.f3);
                            TextView txv3 = (TextView)findViewById(R.id.txv3);
                            if(ft1.getText().toString().length() == 0 ){return;}
                            int first = Integer.parseInt(ft1.getText().toString());
                            double equal = first *0.0328;   
                            DecimalFormat formatf = new DecimalFormat("#.####");
                            String x = formatf.format(equal)+"    feet or foot";
                            txv3.setText(x);}
                    });
                }
                else { 

                     Button no = (Button)findViewById(R.id.btn5);
                    no.setOnClickListener(new OnClickListener() {

                        @Override
                        public void onClick(View arg0) {
                            dialog();
                        }

                        public void dialog(){

                            final Dialog dialog = new Dialog(Third.this);
                            dialog.setContentView(R.layout.dialog_nothing);
                            dialog.setTitle("The unit is not chosse");
                            dialog.show();
                        }
                    });

```