My activity opens a dialog. When it closes I need the function ReloadTable()
to be executed. So I am trying to use setOnDismissListener
but its not get
Use following code
final AlertDialog.Builder builder = new AlertDialog.Builder(MyActivity.this);
final View dailogView = LayoutInflater.from(MyActivity.this).inflate(R.layout.dialog_layout, null);
builder.setView(dailogView);
final AlertDialog dialog=builder.create();
dialog.show();
DismissListener
dialog.setOnDismissListener(new DialogInterface.OnDismissListener() {
@Override
public void onDismiss(DialogInterface dialogInterface) {
// your code after dissmiss dialog
}
});