I am trying to add customised radio button in alert dialog box. Now I want to add listener on that. I have tried to add listener using Radio group but it shows null pointer exception. This is my code. Please how to add listener whereby I want to dismiss the dialog box on clicking any of the radio buttons
final AlertDialog.Builder alt_bld = new AlertDialog.Builder(this);
LayoutInflater eulaInflater = LayoutInflater.from(this);
View eulaLayout = eulaInflater.inflate(R.layout.alertdialogcustom, null);
alt_bld.setView(eulaLayout);
RadioGroup rgroup = (RadioGroup)findViewById(R.id.group1);
Thanks Astha