工具栏导航图标松散主题

6
我使用两个主题来为我的应用程序选择不同的操作栏颜色(深色或浅色): - 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>

在我的清单文件中,我将应用程序主题设置为浅色,有些活动的主题属性设置为深色。
我看到了奇怪的行为。假设我在一个白色工具栏的活动中(该活动使用浅色主题),然后导航到一个红色工具栏的活动中(该活动使用深色主题)。当我回到带有白色工具栏的活动时,导航图标(左指向箭头)现在变成了白色。好像它采用了我的深色主题。
希望我清楚地解释了情况。
谢谢!
1个回答

1

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接