So you created an overflow menu that contains another sub-menu in Android’s ActionBar. Everything works well after you styled the background color of Widget.AppCompat.PopupMenu.

Once you tried a long click on the overflow MenuItem and proceed to selected a sub MenuItem, you notice the selected background color of the item is not transparent.

The cause for this is because you used android:background. The correct attribute to use is android:colorBackground.

That should fix it.

See sample XML code:

And in your theme style, add this:

The solution to this is easy. Delete the .gradle folder in your project folder. Then look for the icon in Android Studio (see image).

It says Sync Project with Gradle Files. Click that button and all should be well.

Related Posts Plugin for WordPress, Blogger...