Android 未应用操作栏样式主题生成器主题
因此,我使用动作栏样式生成器创建了一个主题,其样式兼容模式设置为Android 未应用操作栏样式主题生成器主题,android,Android,因此,我使用动作栏样式生成器创建了一个主题,其样式兼容模式设置为AppCompat。我下载了ZIP文件,复制并粘贴了我文件夹中的所有文件,但emulator运行时,主题没有显示出来 styles\u actionstyle.xml <?xml version="1.0" encoding="utf-8"?> <resources> <style name="Theme.Actionstyle" parent="@style/Theme.AppCompat.
AppCompat
。我下载了ZIP
文件,复制并粘贴了我文件夹中的所有文件,但emulator运行时,主题没有显示出来
styles\u actionstyle.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Theme.Actionstyle" parent="@style/Theme.AppCompat.Light.DarkActionBar">
<item name="actionBarItemBackground">@drawable/selectable_background_actionstyle</item >
<item name="popupMenuStyle">@style/PopupMenu.Actionstyle</item>
<item name="dropDownListViewStyle">@style/DropDownListView.Actionstyle</item>
<item name="actionBarTabStyle">@style/ActionBarTabStyle.Actionstyle</item>
<item name="actionDropDownStyle">@style/DropDownNav.Actionstyle</item>
<item name="actionBarStyle">@style/ActionBar.Solid.Actionstyle</item>
<item name="actionModeBackground">@drawable/cab_background_top_actionstyle</item>
<item name="actionModeSplitBackground">@drawable/cab_background_bottom_actionstyle</item>
<item name="actionModeCloseButtonStyle">@style/ActionButton.CloseMode.Actionstyle</item>
<!-- Light.DarkActionBar specific -->
<item name="actionBarWidgetTheme">@style/Theme.Actionstyle.Widget</item>
</style>
<style name="ActionBar.Solid.Actionstyle" parent="@style/Widget.AppCompat.Light.ActionBar.Solid.Inverse">
<item name="background">@drawable/ab_solid_actionstyle</item>
<item name="backgroundStacked">@drawable/ab_stacked_solid_actionstyle</item>
<item name="backgroundSplit">@drawable/ab_bottom_solid_actionstyle</item>
<item name="progressBarStyle">@style/ProgressBar.Actionstyle</item>
</style>
<style name="ActionBar.Transparent.Actionstyle" parent="@style/Widget.AppCompat.ActionBar">
<item name="background">@drawable/ab_transparent_actionstyle</item>
<item name="progressBarStyle">@style/ProgressBar.Actionstyle</item>
</style>
<style name="PopupMenu.Actionstyle" parent="@style/Widget.AppCompat.PopupMenu">
<item name="android:popupBackground">@drawable/menu_dropdown_panel_actionstyle</item>
</style>
<style name="DropDownListView.Actionstyle" parent="@style/Widget.AppCompat.ListView.DropDown">
<item name="android:listSelector">@drawable/selectable_background_actionstyle</item>
</style>
<style name="ActionBarTabStyle.Actionstyle" parent="@style/Widget.AppCompat.ActionBar.TabView">
<item name="android:background">@drawable/tab_indicator_ab_actionstyle</item>
</style>
<style name="DropDownNav.Actionstyle" parent="@style/Widget.AppCompat.Spinner.DropDown.ActionBar">
<item name="android:background">@drawable/spinner_background_ab_actionstyle</item>
<item name="android:popupBackground">@drawable/menu_dropdown_panel_actionstyle</item>
<item name="android:dropDownSelector">@drawable/selectable_background_actionstyle</item>
</style>
<style name="ProgressBar.Actionstyle" parent="@style/Widget.AppCompat.ProgressBar.Horizontal">
<item name="android:progressDrawable">@drawable/progress_horizontal_actionstyle</item>
</style>
<style name="ActionButton.CloseMode.Actionstyle" parent="@style/Widget.AppCompat.ActionButton.CloseMode">
<item name="android:background">@drawable/btn_cab_done_actionstyle</item>
</style>
<!-- this style is only referenced in a Light.DarkActionBar based theme -->
<style name="Theme.Actionstyle.Widget" parent="@style/Theme.AppCompat">
<item name="popupMenuStyle">@style/PopupMenu.Actionstyle</item>
<item name="dropDownListViewStyle">@style/DropDownListView.Actionstyle</item>
</style>
</resources>
@可绘制/可选择的\u背景\u动作风格
@style/PopupMenu.Actionstyle
@style/DropDownListView.Actionstyle
@style/actionbartastyle.Actionstyle
@style/DropDownNav.Actionstyle
@style/ActionBar.Solid.Actionstyle
@可拉伸/驾驶室\背景\顶部\动作风格
@可拉伸/驾驶室\背景\底部\动作风格
@样式/ActionButton.CloseMode.Actionstyle
@style/Theme.Actionstyle.Widget
@可拉伸/ab_实心_动作风格
@可拉伸/ab_堆叠_实心_动作风格
@可拉伸/ab_底部_实心_动作风格
@style/ProgressBar.Actionstyle
@可拉伸/ab_透明_动作风格
@style/ProgressBar.Actionstyle
@可绘图/菜单\下拉菜单\面板\动作风格
@可绘制/可选择的\u背景\u动作风格
@可绘图/制表符指示器操作样式
@可绘制/微调器\u背景\u ab\u动作风格
@可绘图/菜单\下拉菜单\面板\动作风格
@可绘制/可选择的\u背景\u动作风格
@可绘制/进度\水平\动作样式
@可拉伸/btn\u驾驶室\u完成\u动作风格
@style/PopupMenu.Actionstyle
@style/DropDownListView.Actionstyle
V14版本:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Theme.Actionstyle" parent="@style/Theme.AppCompat.Light.DarkActionBar">
<item name="android:actionBarItemBackground">@drawable/selectable_background_actionstyle</item>
<item name="android:popupMenuStyle">@style/PopupMenu.Actionstyle</item>
<item name="android:dropDownListViewStyle">@style/DropDownListView.Actionstyle</item>
<item name="android:actionBarTabStyle">@style/ActionBarTabStyle.Actionstyle</item>
<item name="android:actionDropDownStyle">@style/DropDownNav.Actionstyle</item>
<item name="android:actionBarStyle">@style/ActionBar.Solid.Actionstyle</item>
<item name="android:actionModeBackground">@drawable/cab_background_top_actionstyle</item>
<item name="android:actionModeSplitBackground">@drawable/cab_background_bottom_actionstyle</item>
<item name="android:actionModeCloseButtonStyle">@style/ActionButton.CloseMode.Actionstyle</item>
<!-- Light.DarkActionBar specific -->
<item name="android:actionBarWidgetTheme">@style/Theme.Actionstyle.Widget</item>
</style>
<style name="ActionBar.Solid.Actionstyle" parent="@style/Widget.AppCompat.Light.ActionBar.Solid.Inverse">
<item name="android:background">@drawable/ab_background_textured_actionstyle</item>
<item name="android:backgroundStacked">@drawable/ab_stacked_solid_actionstyle</item>
<item name="android:backgroundSplit">@drawable/ab_background_textured_actionstyle</item>
<item name="android:progressBarStyle">@style/ProgressBar.Actionstyle</item>
</style>
<style name="ActionBar.Transparent.Actionstyle" parent="@style/Widget.AppCompat.ActionBar">
<item name="android:background">@drawable/ab_transparent_actionstyle</item>
<item name="android:progressBarStyle">@style/ProgressBar.Actionstyle</item>
</style>
<!-- this style is only referenced in a Light.DarkActionBar based theme -->
<style name="Theme.Actionstyle.Widget" parent="@style/Theme.AppCompat">
<item name="android:popupMenuStyle">@style/PopupMenu.Actionstyle</item>
<item name="android:dropDownListViewStyle">@style/DropDownListView.Actionstyle</item>
</style>
</resources>
@可绘制/可选择的\u背景\u动作风格
@style/PopupMenu.Actionstyle
@style/DropDownListView.Actionstyle
@style/actionbartastyle.Actionstyle
@style/DropDownNav.Actionstyle
@style/ActionBar.Solid.Actionstyle
@可拉伸/驾驶室\背景\顶部\动作风格
@可拉伸/驾驶室\背景\底部\动作风格
@样式/ActionButton.CloseMode.Actionstyle
@style/Theme.Actionstyle.Widget
@可绘制/ab_背景_纹理_动作风格
@可拉伸/ab_堆叠_实心_动作风格
@可绘制/ab_背景_纹理_动作风格
@style/ProgressBar.Actionstyle
@可拉伸/ab_透明_动作风格
@style/ProgressBar.Actionstyle
@style/PopupMenu.Actionstyle
@style/DropDownListView.Actionstyle
清单文件:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mycompany.blooddonation2" >
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/Theme.Actionstyle" >
<activity
android:name=".MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
我可以通过使用“activity”类而不是“ActionBarActivity”类扩展我的主要活动来解决问题。我可以通过使用“activity”类而不是“ActionBarActivity”类扩展我的主要活动来解决问题。