1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-14 15:30:29 -08:00

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.
This commit is contained in:
Po Lu 2023-09-23 08:31:45 +08:00
parent d1d444c2b7
commit d2f024af61

View file

@ -41,6 +41,7 @@ import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.FrameLayout;
import android.view.ContextThemeWrapper;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
@ -158,6 +159,13 @@ public final class EmacsDialog implements DialogInterface.OnDismissListener
TypedArray attributes;
Window window;
/* Wrap the context within a style wrapper. Any dialog properties
tied to EmacsStyle (such as those applied by the system ``dark
theme'') will thus affect the dialog irrespective of whether
CONTEXT is an activity or the service. */
context = new ContextThemeWrapper (context, R.style.EmacsStyle);
size = buttons.size ();
styleId = -1;