0
我用下面的樣式:生成的風格沒有被應用在Android上的應用程序
長話短說,它使ActionBar
紫色。
我已經從.zip文件中取出所有文件,並將它們放置在我的項目中。在文件中styles_zhc_style.xml
的<resources>
我有:
<style name="Theme.Zhc_style" parent="@style/Theme.AppCompat.Light.DarkActionBar">
<item name="android:actionBarItemBackground">@drawable/selectable_background_zhc_style</item>
<item name="android:popupMenuStyle">@style/PopupMenu.Zhc_style</item>
<item name="android:dropDownListViewStyle">@style/DropDownListView.Zhc_style</item>
<item name="android:actionBarTabStyle">@style/ActionBarTabStyle.Zhc_style</item>
<item name="android:actionDropDownStyle">@style/DropDownNav.Zhc_style</item>
<item name="android:actionBarStyle">@style/ActionBar.Solid.Zhc_style</item>
<item name="android:actionModeBackground">@drawable/cab_background_top_zhc_style</item>
<item name="android:actionModeSplitBackground">@drawable/cab_background_bottom_zhc_style</item>
<item name="android:actionModeCloseButtonStyle">@style/ActionButton.CloseMode.Zhc_style</item>
<!-- Light.DarkActionBar specific -->
<item name="android:actionBarWidgetTheme">@style/Theme.Zhc_style.Widget</item>
</style>
我已經改變了我的Android清單以下幾點:
<application
android:allowBackup="true"
android:name="com.zhc.android.ZHCApp"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/Theme.Zhc_style" >
<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>
我最小的SDK版本是16,我的目標SDK版本是21
我仍然在我的應用程序之上得到黑暗的ActionBar。當使用樣式生成器更改設置以使基本主題爲「Light」並再次移動所有文件時,我發現ActionBar確實變成了輕量級主題。更輕的ActionBar,黑色而不是白色字母......但仍然沒有紫色。
我在做什麼錯?