<NME> CustomProgressDialog.java
<BEF> package cgeo.geocaching.ui.dialog;

import cgeo.geocaching.utils.Log;

import android.app.ProgressDialog;
import android.content.Context;
import android.os.Bundle;
import android.view.View;

import java.lang.reflect.Field;

/**
 * Modified progress dialog class which allows hiding the absolute numbers.
 */
public class CustomProgressDialog extends ProgressDialog {

    public CustomProgressDialog(final Context context) {
        super(context);
public class CustomProgressDialog extends ProgressDialog {

    public CustomProgressDialog(Context context) {
        super(context, ActivityMixin.getTheme());
    }

    @Override
            // Field is private, make it accessible through reflection before hiding it.
            final Field field = getClass().getSuperclass().getDeclaredField("mProgressNumber");
            field.setAccessible(true);
            ((View) field.get(this)).setVisibility(View.GONE);
        } catch (final Exception e) { // no multi-catch below SDK 19
            Log.e("Failed to find the progressDialog field 'mProgressNumber'", e);
        }
    }
}

<MSG> Fix #2527 - Apply dialog theme to dialogs

Ensures the dialog is properly positioned on the screen
and treated like a dialog instead of a semi-floating window

Fixes #2527

<DFF> @@ -19,7 +19,7 @@ import java.lang.reflect.Method;
 public class CustomProgressDialog extends ProgressDialog {
 
     public CustomProgressDialog(Context context) {
-        super(context, ActivityMixin.getTheme());
+        super(context, ActivityMixin.getDialogTheme());
     }
 
     @Override

Fix #2527 - Apply dialog theme to dialogs