我正在尝试设置可绘制在我的活动图像的ActionBar,使用@style,却看不到任何结果... 这是我@styles:如何设置动作条图像与@style
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="android:actionBarStyle">@style/MyActionBarTheme</item>
</style>
<style name="MyCustomTheme" parent="@android:style/Theme.Holo.Light">
<item name="android:actionBarStyle">@style/MyActionBarTheme</item>
</style>
<style name="MyActionBarTheme" parent="@android:style/Widget.Holo.Light.ActionBar">
<item name="android:background">@drawable/bgd</item>
</style>
这是我的活动代码:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:theme="@style/MyCustomTheme"
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.roughike.bottombar.BottomBar
android:id="@+id/bottomBar"
android:layout_width="match_parent"
android:layout_height="52dp"
android:layout_alignParentBottom="true"
app:bb_behavior="shifting|underNavbar"
app:bb_tabXmlResource="@xml/bottombar_tabs_main_screen"/>
THAS的我有什么:
这是动作条,我想:
您是否在清单中包含了MyCustomTheme风格? –
你的App主题是什么?你有没有使用Theme.AppCompat相关的Activity或App主题?你能提供你的清单代码吗? –