1
I’m having problems with the AlertDialog
, when opened it exhibits the accents and neither cedilla, in the place appears that old "triangle with interrogation in". What to do to solve?
public void alertaInternet(){
AlertDialog.Builder alertDialog = new AlertDialog.Builder(mContext);
// Definindo Dialog Title
alertDialog.setTitle("Sem conexão a internet!");
// Definindo Dialog Message
alertDialog.setMessage("O aplicativo precisa de conexão a internet para prosseguir.");
// Ao pressionar o botão OK
alertDialog.setNegativeButton("Fechar", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
dialog.cancel();
}
});
// Mostrando Alert Message
alertDialog.show();
}
Post the code you’re using.
– stderr
ready, already edited up.
– Eric123
I already had this problem using Android Studio, I created the message in my string.xml and recovered to display. <string name="message">The application needs internet connection to proceed. </string> alertDialog.setMessage(getString(R.string.message));
– Bruno Santiago
I was able to solve by changing the decoding of the file from "windows-1252" to "UTF-8".
– Eric123