小编Tim*_*out的帖子

改变背景android标题栏

我知道这个问题已被提出,但我无法弄清楚如何让它运作起来.我想改变标题栏的背景.

我不想改变我的应用程序或我的背景风格.

我在这个网站上关注了各种帖子,但似乎都没有给出令人满意的结果.

我认为它就像设置一样简单

<style name="AppTheme" parent="AppBaseTheme">
<item name="android:windowTitleBackgroundStyle">@drawable/backrepeat</item>
</style>
Run Code Online (Sandbox Code Playgroud)

在styles.xml中

然而,这并没有给出任何改变.

对于completness,下面是我的backrepeat文件

<bitmap
xmlns:android="http://schemas.android.com/apk/res/android"
android:src="@drawable/bg_diamonds"
android:tileMode="repeat"
android:dither="true" 
/>
Run Code Online (Sandbox Code Playgroud)

和manifest.xml中的代码

<application
android:allowBackup="true"
android:icon="@drawable/maxmm_start_icon"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
Run Code Online (Sandbox Code Playgroud)

android titlebar custom-titlebar

7
推荐指数
2
解决办法
3万
查看次数

标签 统计

android ×1

custom-titlebar ×1

titlebar ×1