更新时间:2023-11-30 17:41:34
您必须用你想放的背景图像创建你自己的风格。在您的style.xml,你应该建立类似这样:
You have to create your own style with the image you want to put on background. In your style.xml, you should create something similar to this:
值/ styles.xml
<style name="Theme.MyAppTheme" parent="@style/Theme.AppCompat.Light">
<item name="actionBarStyle">@style/ActionBarTabStyle.MyAppTheme</item>
</style>
<style name="ActionBar.Solid.MyAppTheme" parent="@style/Widget.AppCompat.Light.ActionBar.Solid">
<item name="background">@drawable/your_background_image</item>
</style>
值-V14 / styles.xml
<style name="Theme.MyAppTheme" parent="@style/Theme.AppCompat.Light">
<item name="android:actionBarStyle">@style/ActionBarTabStyle.MyAppTheme</item>
</style>
<style name="ActionBar.Solid.MyAppTheme" parent="@style/Widget.AppCompat.Light.ActionBar.Solid">
<item name="android:background">@drawable/your_background_image</item>
</style>
和您可以使用此9片图像:
and you can use this 9-patch image :