Skip to content Skip to sidebar Skip to footer

How To Dismis Custom Dialog From A Custom Button In Dialog?

Hi there, @Override protected Dialog onCreateDialog(int id) { AlertDialog.Builder builder = new AlertDialog.Builder(this); inviteView = getLayoutInflater()

Solution 1:

try this

AlertDialog.Builder builder = new AlertDialog.Builder(this);
AlertDialog alertDialog; 
alertDialog = builder.create();

sendSmsButton = (Button) builder.findViewById(R.id.sendSMSButton);

sendSmsButton.setOnClickListener(new OnClickListener() {

        @Override
        public void onClick(View v) {
            // TODO Auto-generated method stub
            alertDialog.dismiss();
        }
    });

Post a Comment for "How To Dismis Custom Dialog From A Custom Button In Dialog?"