【问题标题】:modify titlebar color and setting icon修改标题栏颜色和设置图标
【发布时间】:2014-02-27 14:48:08
【问题描述】:

可以更改标题栏的外观吗?我会使其透明并使用自定义图像更改默认设置图标。我的主题是这样写的:

<style name="AppBaseTheme" parent="android:Theme.Light">

</style>

<!-- Application theme. -->
<style name="AppTheme" parent="AppBaseTheme">

    <item name="android:windowBackground">@drawable/my_bg</item>

</style>

【问题讨论】:

    标签: android styles titlebar


    【解决方案1】:
    <style name="AppTheme" parent="@android:style/Theme.DeviceDefault">
        <item name="android:textColor">#colorhere</item>
        <item name="android:windowTitleBackgroundStyle">@style/WindowTitleBackground</item>
    </style>
    
    <style name="WindowTitleBackground">     
        <item name="android:background">#colorhere</item>    
    </style>
    

    别忘了检查

    <application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
    

    【讨论】:

      【解决方案2】:

      看看Android Action Bar Style Generator,它是一个非常有用的工具来设计你的动作栏。

      【讨论】:

        猜你喜欢
        • 2013-04-08
        • 1970-01-01
        • 2016-09-13
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多