lundi 10 août 2015

Can some PLEASE tell me how to display a dialog box with an OK button




Code:


          alertDialog.setTitle("Bluetooth is not available!");
            alertDialog.setMessage("Please install this app on a mobile phone with bluetooth...");
            alertDialog.setButton(DialogInterface.BUTTON_POSITIVE, "OK", null);
            alertDialog.show();


This does not compile and NONE of the examples I have found in stack overflow will work.

It is either DialogInterface is unresolved or call to setButton is ambiguous. It is just around and around in circles with the same compile errors.

For once and for all how do you friggin well do it?

The precise imports I need and the precise paramaters I must pass to setButton



Aucun commentaire:

Enregistrer un commentaire