mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-06 06:20:55 -08:00
Circumvent another styling issue in Android 15 QPR1
* java/org/gnu/emacs/EmacsView.java (popupMenu): On Android 15 and later, reload the default theme before displaying popup menus.
This commit is contained in:
parent
ec517d1dcf
commit
d6aea7cc94
1 changed files with 12 additions and 0 deletions
|
|
@ -707,6 +707,8 @@ public final class EmacsView extends ViewGroup
|
||||||
popupMenu (EmacsContextMenu menu, int xPosition,
|
popupMenu (EmacsContextMenu menu, int xPosition,
|
||||||
int yPosition, boolean force)
|
int yPosition, boolean force)
|
||||||
{
|
{
|
||||||
|
ContextThemeWrapper context;
|
||||||
|
|
||||||
if (popupActive && !force)
|
if (popupActive && !force)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
@ -720,6 +722,16 @@ public final class EmacsView extends ViewGroup
|
||||||
contextMenu = menu;
|
contextMenu = menu;
|
||||||
popupActive = true;
|
popupActive = true;
|
||||||
|
|
||||||
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.VANILLA_ICE_CREAM)
|
||||||
|
{
|
||||||
|
context = (ContextThemeWrapper) getContext ();
|
||||||
|
/* It is necessary to reload the current theme before attempting
|
||||||
|
to display a new popup menu, or any previously applied system
|
||||||
|
theme will continue to apply to it. */
|
||||||
|
context.setTheme (R.style.EmacsStyleOpen);
|
||||||
|
context.setTheme (R.style.EmacsStyle);
|
||||||
|
}
|
||||||
|
|
||||||
/* Use showContextMenu (float, float) on N to get actual popup
|
/* Use showContextMenu (float, float) on N to get actual popup
|
||||||
behavior. */
|
behavior. */
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N)
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue