gpt4 book ai didi

android - Toolbar NavigationIcon 宽松主题

转载 作者:塔克拉玛干 更新时间:2023-11-02 21:38:13 24 4
gpt4 key购买 nike

根据我想要的 actionBar 颜色(深色或浅色),我为我的应用程序使用了两个主题:- Theme.AppCompat.Light.NoActionBar- Theme.AppCompat.NoActionBar

这是我的工具栏布局:

<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:minHeight="?attr/actionBarSize"
app:theme="@style/ThemeOverlay.AppCompat.ActionBar"
>

<TextView
android:id="@+id/toolbar_title"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_gravity="center"
android:maxLines="1"
android:ellipsize="end"
android:textAppearance="?android:attr/textAppearanceLarge"
/>

</android.support.v7.widget.Toolbar>

在我的 list 中,我将应用程序主题设置为浅色,并将一些 Activity 的属性主题设置为深色。

我发现我的工具栏有奇怪的行为。假设我在一个带有白色工具栏的 Activity 中(该 Activity 使用浅色主题)并且我导航到一个带有红色工具栏(具有深色主题)的 Activity 。当我回到带有白色工具栏的 Activity 时,导航图标(向左的箭头)现在是白色的。就像它带走了我的黑暗主题。

希望我把情况解释清楚。

谢谢!

最佳答案

编辑已在支持库 v22.0.0 中修复

最后,我发现这是 appCompat 中的一个错误。它是固定的,但仍未合并/发布。

https://code.google.com/p/android/issues/detail?id=78289

关于android - Toolbar NavigationIcon 宽松主题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26808917/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com