I have to display many error messages and alert dialogues in my application.
I do not want to use Toast, I prefer to use AlertDialog.
Instead of creating a new alert dialog in every activity, how do I create and maintain one alert dialog and just change the error message string in it?
Whatever activity I am in, I must be able to access the AlertDialog instance to show and dismiss it.
How can I achieve this? Kindly give me some lead on this.
make one class and paste this function…(may be Utils.java)
and call this by writing..