Skip to content

Instantly share code, notes, and snippets.

@galex
Created October 24, 2010 20:27
Show Gist options
  • Save galex/643964 to your computer and use it in GitHub Desktop.
Save galex/643964 to your computer and use it in GitHub Desktop.
AlertDialog alertDialog = new AlertDialog.Builder(this).create();
alertDialog.setTitle(this.getResources().getString(R.string.no_internet_dialog_title));
alertDialog.setMessage(this.getResources().getString(R.string.no_internet_dialog_message));
alertDialog.setCancelable(false);
alertDialog.setButton(this.getResources().getString(R.string.no_internet_dialog_button_text), new OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
// I just close the app if there is no internet connection
OxydroidActivity.this.finish();
}
});
alertDialog.show();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment