Is it possible to make the Android options menu background non-translucent?

后端 未结 4 1004
无人共我
无人共我 2020-12-06 19:00

The options menu has a translucent background and I would like to make it solid and non-transparent. Is there a way?

4条回答
  •  孤城傲影
    2020-12-06 19:05

    If you don't want to style a whole theme and just change the options menu background then set the panelFullBackground property to a DRAWABLE RESOURCE of your liking. Setting it to a color directly doesn't work so either make one coloured - 9patch, if you want to save in size -image and set it to that or make a couple and make a selector drawable with an image for each state.

    I put my definition in a style that i use for all the activities in my project using:

    @drawable/optionsmenu_back

    optionsmenu_back being a 9patch image with a solid colour...

提交回复
热议问题