Change background popupMenu in Android

the following styles working perfectly for me.

<style name="popupMenuStyle" parent="Theme.AppCompat.Light.DarkActionBar">
    <item name="android:textColor">@color/color_white</item>
    <item name="android:itemBackground">@color/color_red</item>
</style>

here, parent should be the AppTheme parent

and in your code use these lines.

Context wrapper = new ContextThemeWrapper(context, R.style.popupMenuStyle);
PopupMenu popup = new PopupMenu(wrapper, v);

i hope it will work.

Leave a Comment