2
我試圖將背景更改爲「android.support.v7.widget.PopupMenu」。更改樣式爲android.support.v7.widget.PopupMenu
我想我已經做了我在互聯網上發現的一切來改變背景。
資源
<style name="CustomActionBarTheme" parent="@style/Theme.AppCompat.Light">
<item name="android:popupMenuStyle">@style/MyPopupMenu</item>
</style>
<style name="MyPopupMenu" parent="@style/Widget.AppCompat.Light.PopupMenu">
<item name="android:popupBackground">#888888</item>
</style>
當然我在活動中設置 「CustomActionBarTheme」 裏的彈出窗口/價值觀/ styles.xml
<style name="CustomActionBarTheme" parent="@style/Theme.AppCompat.Light">
<item name="popupMenuStyle">@style/MyPopupMenu</item>
</style>
<style name="MyPopupMenu" parent="@style/Widget.AppCompat.Light.PopupMenu">
<item name="android:popupBackground">#888888</item>
</style>
RES /值-V14/styles.xml所示。
我在做什麼錯?
你實際上並不需要'安卓popupMenuStyle'在所有使用程序兼容性時。 –