I'm showing an alert dialog by doing:
new AlertDialog.Builder(this)
.setTitle(R.string.label_searching)
.setMessage(R.string.label_search_noresults)
.setCancelable(false)
.setPositiveButton(DialogInterface.BUTTON_POSITIVE, null)
.create().show();
However, this exception is thrown:
FATAL EXCEPTION: main android.content.res.Resources$NotFoundException: String resource ID #0xffffffff at android.content.res.Resources.getText(Resources.java:242) at android.content.Context.getText(Context.java:282) at android.app.AlertDialog$Builder.setPositiveButton(AlertDialog.java:487)
When I comment out the following line:
.setPositiveButton(DialogInterface.BUTTON_POSITIVE, null)
The dialog is shown, but obviously there's no button displayed. And I need to show a button in the dialog!!
What am I doing wrong?
Use it accordingly