If I were in javascript I could open an Alert dialog with alert("Hello world")
What’s the simplest way to make an alert box in Android?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Where
thisis an instance of Context (perhaps you are within anActivity)R.string.whateveris defined instrings.xmlfile which I suppose you master like a Jedi until you ask (or perhaps follow tutorials on localization). Can be replaced with a plain old quoted stringsetPositiveButtontells that the dialog will have a button that is going to simply dismiss the dialog (noticenull) and is labeled “OK”