0
我是Android開發新手。 最初,actionBar上的tabView包含藍色(如果它具有焦點)。我只想將其改爲另一種顏色。所以actionBar的其他樣式組件應該保持不變。更改操作欄上TabView的顏色
我寫了下面的代碼:
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<style name="CustomActivityTheme" parent="@android:style/Theme.Holo.Light">
<item name="android:actionBarStyle">@style/MyActionBarTabStyle</item>
</style>
<style name="MyActionBarTabStyle" parent="android:style/Widget.Holo.Light.ActionBar.TabView">
<item name="android:background">@drawable/ab_transparent_tabdesign</item>
</style>
</resources>
而且在表現我寫這
<activity
android:label="@string/app_name"
android:name=".mainActivity"
android:theme="@style/CustomActivityTheme"
>
</activity>
當我運行我的應用程序,操作欄完全消失! 我真的可以使用一些幫助。 謝謝
有答案的人嗎? – CemKacmaz