mirror of
https://codeberg.org/OpenTracksApp/OpenTracks.git
synced 2026-10-12 05:43:07 +02:00
Remove confirm play in earth dialog
This commit is contained in:
@@ -23,7 +23,6 @@ import android.app.Dialog;
|
||||
import android.app.ProgressDialog;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.view.View;
|
||||
|
||||
/**
|
||||
* Utilities for creating dialogs.
|
||||
@@ -44,22 +43,16 @@ public class DialogUtils {
|
||||
*/
|
||||
public static Dialog createConfirmationDialog(
|
||||
Context context, int titleId, String message, DialogInterface.OnClickListener okListener) {
|
||||
return createConfirmationDialog(context, titleId, message, null, okListener);
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(context)
|
||||
.setCancelable(true)
|
||||
.setIcon(android.R.drawable.ic_dialog_alert)
|
||||
.setMessage(message)
|
||||
.setNegativeButton(R.string.generic_no, null)
|
||||
.setPositiveButton(R.string.generic_yes, okListener)
|
||||
.setTitle(titleId);
|
||||
return builder.create();
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a confirmation dialog.
|
||||
*
|
||||
* @param context the context
|
||||
* @param titleId the title
|
||||
* @param view the view
|
||||
* @param okListener the listener when OK is clicked
|
||||
*/
|
||||
public static Dialog createConfirmationDialog(
|
||||
Context context, int titleId, View view, DialogInterface.OnClickListener okListener) {
|
||||
return createConfirmationDialog(context, titleId, null, view, okListener);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Creates a spinner progress dialog.
|
||||
*
|
||||
@@ -85,21 +78,6 @@ public class DialogUtils {
|
||||
return createProgressDialog(false, context, messageId, onCancelListener, formatArgs);
|
||||
}
|
||||
|
||||
private static Dialog createConfirmationDialog(Context context, int titleId, String message,
|
||||
View view, DialogInterface.OnClickListener okListener) {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(context).setCancelable(true)
|
||||
.setIcon(android.R.drawable.ic_dialog_alert).setNegativeButton(R.string.generic_no, null)
|
||||
.setPositiveButton(R.string.generic_yes, okListener).setTitle(titleId);
|
||||
if (message != null) {
|
||||
builder.setMessage(message);
|
||||
}
|
||||
if (view != null) {
|
||||
builder.setView(view);
|
||||
}
|
||||
|
||||
return builder.create();
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a progress dialog.
|
||||
*
|
||||
|
||||
@@ -57,8 +57,6 @@ public class PreferencesUtils {
|
||||
public static final boolean CHART_SHOW_SPEED_DEFAULT = true;
|
||||
public static final String CHART_X_AXIS_DEFAULT = "DISTANCE";
|
||||
|
||||
public static final boolean CONFIRM_PLAY_EARTH_DEFAULT = true;
|
||||
|
||||
public static final String DEFAULT_ACTIVITY_DEFAULT = "";
|
||||
|
||||
public static final String DRIVE_DELETED_LIST_DEFAULT = "";
|
||||
|
||||
Reference in New Issue
Block a user