自定义样式地图上的选项菜单显示不正确
在android
中的应用程序引发的问题我的应用上有自定义主题。问题是选项菜单显示不正确,因此选项菜单显示屏幕上的剪切。
我想知道为什么会发生?
这是我的样式文件xml
<style name="AppTheme" parent="@android:style/Theme.Holo.Light">
<item name="android:typeface">normal</item>
<item name="android:typeface">sans</item>
<item name="android:typeface">serif</item>
<item name="android:typeface">monospace</item>
<item name="android:actionBarItemBackground">@drawable/selectable_background_example</item>
<item name="android:popupMenuStyle">@style/PopupMenu.Example</item>
<item name="android:dropDownListViewStyle">@style/DropDownListView.Example</item>
<item name="android:actionBarTabStyle">@style/ActionBarTabStyle.Example</item>
<item name="android:actionDropDownStyle">@style/DropDownNav.Example</item>
<item name="android:actionBarStyle">@style/ActionBar.Solid.Example</item>
<item name="android:actionModeBackground">@drawable/cab_background_top_example</item>
<item name="android:actionModeSplitBackground">@drawable/cab_background_bottom_example</item>
<item name="android:actionModeCloseButtonStyle">@style/ActionButton.CloseMode.Example</item>
</style>
<style name="ActionBar.Solid.Example" parent="@android:style/Widget.Holo.Light.ActionBar.Solid">
<item name="android:background">@drawable/ab_solid_example</item>
<item name="android:backgroundStacked">@drawable/ab_stacked_solid_example</item>
<item name="android:backgroundSplit">@drawable/ab_bottom_solid_example</item>
<item name="android:progressBarStyle">@style/ProgressBar.Example</item>
</style>
<style name="ActionBar.Transparent.Example" parent="@android:style/Widget.Holo.Light.ActionBar">
<item name="android:background">@drawable/ab_transparent_example</item>
<item name="android:progressBarStyle">@style/ProgressBar.Example</item>
</style>
<style name="PopupMenu.Example" parent="@android:style/Widget.Holo.Light.ListPopupWindow">
<item name="android:popupBackground">@drawable/menu_dropdown_panel_example</item>
</style>
<style name="DropDownListView.Example" parent="@android:style/Widget.Holo.Light.ListView.DropDown">
<item name="android:listSelector">@drawable/selectable_background_example</item>
</style>
<style name="ActionBarTabStyle.Example" parent="@android:style/Widget.Holo.Light.ActionBar.TabView">
<item name="android:background">@drawable/tab_indicator_ab_example</item>
</style>
<style name="DropDownNav.Example" parent="@android:style/Widget.Holo.Light.Spinner">
<item name="android:background">@drawable/spinner_background_ab_example</item>
<item name="android:popupBackground">@drawable/menu_dropdown_panel_example</item>
<item name="android:dropDownSelector">@drawable/selectable_background_example</item>
</style>
<style name="ProgressBar.Example" parent="@android:style/Widget.Holo.Light.ProgressBar.Horizontal">
<item name="android:progressDrawable">@drawable/progress_horizontal_example</item>
</style>
<style name="ActionButton.CloseMode.Example" parent="@android:style/Widget.Holo.Light.ActionButton.CloseMode">
<item name="android:background">@drawable/btn_cab_done_example</item>
</style>
<!-- this style is only referenced in a Light.DarkActionBar based theme -->
<style name="Theme.Example.Widget" parent="@android:style/Theme.Holo">
<item name="android:popupMenuStyle">@style/PopupMenu.Example</item>
<item name="android:dropDownListViewStyle">@style/DropDownListView.Example</item>
</style>
答案 0 :(得分:0)
对于那些遇到同样问题的人来说,在我的情况下,解决方案是通过在清单文件中添加这一行来解决的。
<supports-screens
android:anyDensity="true" />