首页图标向上指示灯COMPAT操作栏 [英] Home Icon Up Indicator Compat Action Bar

查看:150
本文介绍了首页图标向上指示灯COMPAT操作栏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图改变上升的指标,我已经实现了新的COMPAT操作栏,我不能够自定义它。

I'm trying to change the "up" indicator, I've implemented the new compat action bar and I'm not able to customize it.

我已经试过增加值-V11 / styles.xml

I've tried adding to values-v11/styles.xml

<style name="MyActionBar" parent="@style/Widget.AppCompat.Light.ActionBar">
    <item name="android:icon">@drawable/ic_action_logo_barra_de_acciones_blanco</item>
    <item name="android:background">@drawable/action_bar_style</item>
    <item name="android:homeAsUpIndicator">@drawable/arrow_up_black</item>
</style>

和值/ styles.xml

and to values/styles.xml

<style name="MyActionBar" parent="@style/Widget.AppCompat.Light.ActionBar">
    <item name="background">@drawable/action_bar_style</item>
    <item name="icon">@drawable/ic_action_logo_barra_de_acciones_blanco</item>
    <item name="homeAsUpIndicator">@drawable/arrow_up_black</item>
</style>

但仍然没有工作。

But is still not working.

在此先感谢,迭戈。

推荐答案

对不起,也许已经晚了,但我有同样的问题,并通过主题定义homeAsUpIndicator之前动作条的风格解决它。 这是我的RES /价值/ styles.xml

Sorry, maybe already late, but I had same issue and solved it by defining "homeAsUpIndicator" in main theme before ActionBar style. Here is my res/values/styles.xml

<style name="AppBaseTheme" parent="@style/Theme.AppCompat.Light">
</style>

<style name="AppTheme"  parent="AppBaseTheme">
    <item name="homeAsUpIndicator">@drawable/abc_ic_ab_back_holo_dark</item>
    <item name="actionBarStyle">@style/Widget.Styled.ActionBar</item>
</style>

<style name="Widget.Styled.ActionBar" parent="@style/Widget.AppCompat.Light.ActionBar">
    <item name="background">@drawable/messages_form_banner</item>
</style>

我希望它会帮助你。

I hope it will help you.

这篇关于首页图标向上指示灯COMPAT操作栏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆