diff options
| author | Bananeweizen <bananeweizen@gmx.de> | 2013-01-27 08:50:47 +0100 |
|---|---|---|
| committer | Bananeweizen <bananeweizen@gmx.de> | 2013-01-27 08:50:47 +0100 |
| commit | 6180c4de937cbd1d148106bbd43d1beb60f8c8b1 (patch) | |
| tree | 07b9227017eaa8f8ed63b57222b15b21f25b5c8e /main/src/cgeo/geocaching/ui/CustomProgressDialog.java | |
| parent | 81b311085fd92e67676c3e19504b6c92c6d52209 (diff) | |
| download | cgeo-6180c4de937cbd1d148106bbd43d1beb60f8c8b1.zip cgeo-6180c4de937cbd1d148106bbd43d1beb60f8c8b1.tar.gz cgeo-6180c4de937cbd1d148106bbd43d1beb60f8c8b1.tar.bz2 | |
refactoring: move some more dialogs into new package
Diffstat (limited to 'main/src/cgeo/geocaching/ui/CustomProgressDialog.java')
| -rw-r--r-- | main/src/cgeo/geocaching/ui/CustomProgressDialog.java | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/main/src/cgeo/geocaching/ui/CustomProgressDialog.java b/main/src/cgeo/geocaching/ui/CustomProgressDialog.java deleted file mode 100644 index f7772be..0000000 --- a/main/src/cgeo/geocaching/ui/CustomProgressDialog.java +++ /dev/null @@ -1,44 +0,0 @@ -package cgeo.geocaching.ui; - -import cgeo.geocaching.utils.Log; - -import android.app.ProgressDialog; -import android.content.Context; -import android.os.Bundle; -import android.view.View; -import android.widget.TextView; - -import java.lang.reflect.Field; -import java.lang.reflect.Method; - -/** - * Modified progress dialog class which allows hiding the absolute numbers - * - */ -public class CustomProgressDialog extends ProgressDialog { - - public CustomProgressDialog(Context context) { - super(context); - } - - @Override - protected void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - - try { - Method method = TextView.class.getMethod("setVisibility", Integer.TYPE); - - Field[] fields = this.getClass().getSuperclass().getDeclaredFields(); - - for (Field field : fields) { - if (field.getName().equalsIgnoreCase("mProgressNumber")) { - field.setAccessible(true); - TextView textView = (TextView) field.get(this); - method.invoke(textView, View.GONE); - } - } - } catch (Exception e) { - Log.e("Failed to invoke the progressDialog method 'setVisibility' and set 'mProgressNumber' to GONE.", e); - } - } -}
\ No newline at end of file |
