Back to project page sthlmtraveling.
The source code is released under:
Apache License
If you think the Android project sthlmtraveling listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.markupartist.sthlmtraveling; //ww w. j a va 2s . c om import android.app.Activity; import android.app.AlertDialog; import android.content.DialogInterface.OnClickListener; public class DialogHelper { /** * Creates a dialog to display in case of network problems. * @param activity the activity * @param onClickListener the on click listener for the retry button * @return a dialog */ public static AlertDialog createNetworkProblemDialog(Activity activity, OnClickListener onClickListener) { return new AlertDialog.Builder(activity) .setIcon(android.R.drawable.ic_dialog_alert) .setTitle(activity.getText(R.string.attention_label)) .setMessage(activity.getText(R.string.network_problem_message)) .setPositiveButton(activity.getText(R.string.retry), onClickListener) .setNegativeButton(activity.getText(android.R.string.cancel), null) .create(); } }