From d686c55a0a86ef845795fc03a8a5de44b5fe73cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Sch=C3=BCrmann?= Date: Wed, 17 Sep 2014 13:45:16 +0200 Subject: Work on new result handling (WIP) --- .../keychain/ui/dialog/CustomAlertDialogBuilder.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/dialog/CustomAlertDialogBuilder.java') diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/dialog/CustomAlertDialogBuilder.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/dialog/CustomAlertDialogBuilder.java index 4b40b7ef1..b33bb2763 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/dialog/CustomAlertDialogBuilder.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/ui/dialog/CustomAlertDialogBuilder.java @@ -2,12 +2,14 @@ package org.sufficientlysecure.keychain.ui.dialog; import android.app.Activity; import android.app.AlertDialog; +import android.view.ContextThemeWrapper; import android.view.View; import android.widget.TextView; import org.sufficientlysecure.keychain.R; -/** This class extends AlertDiaog.Builder, styling the header using emphasis color. +/** + * This class extends AlertDiaog.Builder, styling the header using emphasis color. * Note that this class is a huge hack, because dialog boxes aren't easily stylable. * Also, the dialog NEEDS to be called with show() directly, not create(), otherwise * the order of internal operations will lead to a crash! @@ -15,7 +17,9 @@ import org.sufficientlysecure.keychain.R; public class CustomAlertDialogBuilder extends AlertDialog.Builder { public CustomAlertDialogBuilder(Activity activity) { - super(activity); + // if the progress dialog is displayed from the application class, design is missing + // hack to get holo design (which is not automatically applied due to activity's Theme.NoDisplay + super(new ContextThemeWrapper(activity, R.style.Theme_AppCompat_Light)); } @Override -- cgit v1.2.3