From 018dfb0cbc638de524e505c22ce76ea34b2d7a06 Mon Sep 17 00:00:00 2001 From: Parneet Singh <111801812+parneet-guraya@users.noreply.github.com> Date: Fri, 28 Feb 2025 12:26:38 +0530 Subject: [PATCH] [android] Remove unused `ProgressDialogFragment` file (#10354) Signed-off-by: parneet-guraya --- .../dialog/ProgressDialogFragment.java | 69 ------------------- .../layout/indeterminated_progress_dialog.xml | 21 ------ 2 files changed, 90 deletions(-) delete mode 100644 android/app/src/main/java/app/organicmaps/dialog/ProgressDialogFragment.java delete mode 100644 android/app/src/main/res/layout/indeterminated_progress_dialog.xml diff --git a/android/app/src/main/java/app/organicmaps/dialog/ProgressDialogFragment.java b/android/app/src/main/java/app/organicmaps/dialog/ProgressDialogFragment.java deleted file mode 100644 index 4b7a2ebb72..0000000000 --- a/android/app/src/main/java/app/organicmaps/dialog/ProgressDialogFragment.java +++ /dev/null @@ -1,69 +0,0 @@ -package app.organicmaps.dialog; - -import android.app.Activity; -import android.content.DialogInterface; -import android.os.Bundle; -import android.view.LayoutInflater; -import android.view.View; -import android.view.ViewGroup; -import android.widget.TextView; - -import androidx.annotation.Nullable; -import androidx.fragment.app.DialogFragment; -import androidx.fragment.app.Fragment; - -import app.organicmaps.R; - -public class ProgressDialogFragment extends DialogFragment -{ - private static final String ARG_MESSAGE = "title"; - private static final String ARG_CANCELABLE = "cancelable"; - private static final String ARG_RETAIN_INSTANCE = "retain_instance"; - - public ProgressDialogFragment() - { - // Do nothing by default. - } - - protected void setCancelResult() - { - Fragment targetFragment = getTargetFragment(); - if (targetFragment != null) - targetFragment.onActivityResult(getTargetRequestCode(), Activity.RESULT_CANCELED, null); - } - - @Override - public void onCreate(@Nullable Bundle savedInstanceState) - { - super.onCreate(savedInstanceState); - Bundle args = requireArguments(); - setRetainInstance(args.getBoolean(ARG_RETAIN_INSTANCE, true)); - setCancelable(args.getBoolean(ARG_CANCELABLE, false)); - } - - @Nullable - @Override - public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable - Bundle savedInstanceState) - { - View view = inflater.inflate(R.layout.indeterminated_progress_dialog, container, false); - Bundle args = requireArguments(); - TextView messageView = view.findViewById(R.id.message); - messageView.setText(args.getString(ARG_MESSAGE)); - return view; - } - - @Override - public void onCancel(DialogInterface dialog) - { - setCancelResult(); - } - - @Override - public void onDestroyView() - { - if (getDialog() != null && getRetainInstance()) - getDialog().setDismissMessage(null); - super.onDestroyView(); - } -} diff --git a/android/app/src/main/res/layout/indeterminated_progress_dialog.xml b/android/app/src/main/res/layout/indeterminated_progress_dialog.xml deleted file mode 100644 index 0eb143649a..0000000000 --- a/android/app/src/main/res/layout/indeterminated_progress_dialog.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - -