aboutsummaryrefslogtreecommitdiffstats
path: root/java/org
diff options
context:
space:
mode:
authorPo Lu2023-09-23 08:31:45 +0800
committerPo Lu2023-09-23 08:31:45 +0800
commitd2f024af612d5951c7572725d4054ca732154576 (patch)
tree542959b4fdf5d9b98ef16a66054735b2fd1c1317 /java/org
parentd1d444c2b789a90da584227ae314f29d79131848 (diff)
downloademacs-d2f024af612d5951c7572725d4054ca732154576.tar.gz
emacs-d2f024af612d5951c7572725d4054ca732154576.zip
Display background dialogs using the correct style
* java/org/gnu/emacs/EmacsDialog.java (toAlertDialog): Wrap CONTEXT within EmacsStyle such that dialogs are displayed in the same style used by activities.
Diffstat (limited to 'java/org')
-rw-r--r--java/org/gnu/emacs/EmacsDialog.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/java/org/gnu/emacs/EmacsDialog.java b/java/org/gnu/emacs/EmacsDialog.java
index af3bf538410..bad1ddde227 100644
--- a/java/org/gnu/emacs/EmacsDialog.java
+++ b/java/org/gnu/emacs/EmacsDialog.java
@@ -41,6 +41,7 @@ import android.widget.Button;
41import android.widget.LinearLayout; 41import android.widget.LinearLayout;
42import android.widget.FrameLayout; 42import android.widget.FrameLayout;
43 43
44import android.view.ContextThemeWrapper;
44import android.view.View; 45import android.view.View;
45import android.view.ViewGroup; 46import android.view.ViewGroup;
46import android.view.Window; 47import android.view.Window;
@@ -158,6 +159,13 @@ public final class EmacsDialog implements DialogInterface.OnDismissListener
158 TypedArray attributes; 159 TypedArray attributes;
159 Window window; 160 Window window;
160 161
162 /* Wrap the context within a style wrapper. Any dialog properties
163 tied to EmacsStyle (such as those applied by the system ``dark
164 theme'') will thus affect the dialog irrespective of whether
165 CONTEXT is an activity or the service. */
166
167 context = new ContextThemeWrapper (context, R.style.EmacsStyle);
168
161 size = buttons.size (); 169 size = buttons.size ();
162 styleId = -1; 170 styleId = -1;
163 171