Cab*_*zas 5 android themes android-actionbar
当我改变主题风格时
<style name="Theme.mystyle" parent="@style/Theme.AppCompat.Light">
Run Code Online (Sandbox Code Playgroud)
至
<style name="Theme.mystyle" parent="@style/Theme.AppCompat.Light.DarkActionBar">
Run Code Online (Sandbox Code Playgroud)
根本不工作.
<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>
Run Code Online (Sandbox Code Playgroud)
检查此生成器以获取工作样式: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>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3862 次 |
| 最近记录: |