当我更改主题样式时
<style name="Theme.mystyle" parent="@style/Theme.AppCompat.Light">
to
<style name="Theme.mystyle" parent="@style/Theme.AppCompat.Light.DarkActionBar">
根本不工作。
<style name="PopupMenu.mystyle" parent="@style/Widget.AppCompat.Light.PopupMenu">
<item name="android:textStyle">bold</item>
<item name="android:popupBackground">@drawable/menu_dropdown_panel</item>
</style>
检查此生成器以获取工作样式:http://jgilfelt.github.com/android-actionbarstylegenerator/ http://jgilfelt.github.com/android-actionbarstylegenerator/
基本上,当切换到 DarkActionBar 时,您需要更新样式以遵循:
<style name="Theme.Example" parent="@style/Theme.AppCompat.Light.DarkActionBar">
<item name="android:popupMenuStyle">@style/PopupMenu.Example</item>
<!-- Light.DarkActionBar specific -->
<item name="android:actionBarWidgetTheme">@style/Theme.Example.Widget</item>
</style>
<!-- this style is only referenced in a Light.DarkActionBar based theme -->
<style name="Theme.Example.Widget" parent="@style/Theme.AppCompat">
<item name="android:popupMenuStyle">@style/PopupMenu.Example</item>
<item name="android:dropDownListViewStyle">@style/DropDownListView.Example</item>
</style>
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)