NavigationIcon Toolbar Lost Subject

I use two themes for my application depending on the color of the actionBar that I want (dark or light color): - Theme.AppCompat.Light.NoActionBar - Theme.AppCompat.NoActionBar

Here is my toolbar layout:

<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> 

In my manifest, I set the theme of the application for lighting, and some actions have an attribute theme set to dark.

I see strange behavior with my toolbar. Let me say that I am working with a white toolbar (activity uses a light theme), and I am moving on to activity with a red toolbar (with a dark theme). When I return to action using the white toolbar, the navigation icon (left arrow) is now white. As if it took my dark theme.

I hope I clearly explained the situation.

Thanks!

+6
source share
1 answer

EDIT Fixed in support library v22.0.0

Finally, I found out that this is a bug in appCompat. It is fixed, but still not merged / released.

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

+1
source

Source: https://habr.com/ru/post/977897/


All Articles