1
我想刪除我的動作欄溢出菜單週圍的陰影,但我還沒有找到任何允許的屬性。我正在擴展Theme.AppCompat。 Android動作欄溢出菜單刪除陰影
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat">
<!-- Customize your theme here. -->
<item name="actionOverflowButtonStyle">@style/OverflowButton</item>
<item name="actionOverflowMenuStyle">@style/OverflowMenu</item>
<item name="actionBarStyle">@style/MyActionBarLogo</item>
<item name="android:dropDownListViewStyle">@style/PopupMenuListView</item>
<item name="dropDownListViewStyle">@style/PopupMenuListView</item>
<item name="android:textColor">@color/black</item>
<item name="android:popupMenuStyle">@style/PopupMenu</item>
</style>
<style name="MyActionBarLogo" parent="Widget.AppCompat.ActionBar">
<item name="background">@color/white</item>
<item name="displayOptions">useLogo|showHome</item>
<item name="elevation">0dp</item>
<item name="android:windowContentOverlay">@null</item>
</style>
<style name="OverflowButton" parent="@style/Widget.AppCompat.ActionButton.Overflow">
<item name="android:src">@mipmap/menu_logo</item>
</style>
<style name="OverflowMenu" parent="@style/Widget.AppCompat.PopupMenu.Overflow">
<item name="overlapAnchor">false</item>
<item name="android:dropDownVerticalOffset">52dp</item>
<item name="android:dropDownHorizontalOffset">10dp</item>
</style>
<style name="PopupMenuListView" parent="@style/Widget.AppCompat.ListView.DropDown">
<item name="android:divider">@drawable/menu_divider</item>
<item name="android:dividerHeight">1dp</item>
<item name="android:textColor">@color/black</item>
<item name="android:background">@color/white</item>
</style>
<style name="PopupMenu" parent="@style/Widget.AppCompat.ListPopupWindow">
<item name="android:popupBackground">@color/white</item>
</style>
那只是對動作條的影子,我已經刪除:) – tomek550
好難過,我會更新我的答案 – NaviRamyle
無法解析符號'@ style/Widget.Spinner.DropDown.ActionBar', 我已經在那裏添加了AppCompat,所以它現在是@ style/Widget.AppCompat.Spinner.DropDown.ActionBar,但是陰影仍然存在。 – tomek550