首页图标向上指示灯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.我已经...

我试图改变上升的指标,我已经实现了新的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.

阅读全文

相关推荐

最新文章