Change the highlight color of the selected item for the menu menu of the hard menu

I used the action bar style generator to create a custom theme for the application for the application, and it works well after several settings. My custom theme is based on Holo (dark version) and changes the colors of the backlight. The overflow menu of the action bar correctly displays my custom state_pressed color in overflow items when I click them. I set android:colorPressedHighlight to the color I want, and placed a suitable template for android:selectableItemBackground .

The problem is one of my test devices, which has a hard menu button. (This is a Samsung Galaxy S III.) When I show the overflow menu using the hard menu button, tapping an item from this menu gives it a default blue backlight. It either uses a different attr instead of android:selectableItemBackground , or takes it from a different style. I would like to know what he uses, or what style he accepts, so that I can set this color.

PS Before anyone tells me this, I know that you can use android:panelBackground to set the background of the bottom menu. But I do not want to change the general background of the menu, only the background of the element.

+6
source share

Source: https://habr.com/ru/post/949212/


All Articles