0

For some reason, when clicking the positive button on an AlertDialog the dialog closes but none of the defined methods within the handler is executed.

Currently, this only happens on a Huawei-ALE-L21 running Android 6.0. For all other devices, the button click is registered and the app works like a charm.

Here is the code:

private void showDialog() {
    mInterface.getAlertDialog(getString(R.string.for_your_safety), getString(R.string.for_your_safety_text), true)
            .setPositiveButton(R.string.allright, new DialogInterface.OnClickListener() {
                @Override
                public void onClick(DialogInterface dialog, int which) { //method implementation

                }
            })
            .setNeutralButton(R.string.read, new DialogInterface.OnClickListener() {
                @Override
                public void onClick(DialogInterface dialog, int which) { //method implementation

                }
            })
            .create()
            .show();
}

Any ideas or solutions?

vanNiewoehner
  • 51
  • 1
  • 1
  • 4

0 Answers0