I would like to have two different android.support.v7.widget.Toolbars files in my application, one dark, one light and switch between them when necessary. However, when I install another theme on the second toolbar, it seems to reset the theme on the first toolbar.
Is this a mistake or an alleged behavior?
Toolbar 1:
<android.support.v7.widget.Toolbar xmlns:sothree="http://schemas.android.com/apk/res-auto" xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/main_toolbar" android:layout_height="?attr/actionBarSize" android:layout_width="match_parent" android:layout_gravity="top" android:background="@drawable/action_bar_background" sothree:theme="@style/ThemeOverlay.AppCompat.ActionBar" sothree:contentInsetStart="0dp"/>
Toolbar 2:
<android.support.v7.widget.Toolbar xmlns:sothree="http://schemas.android.com/apk/res-auto" xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/clip_toolbar" android:layout_height="?attr/actionBarSize" android:layout_width="match_parent" android:layout_gravity="top" android:background="@android:color/transparent" sothree:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar" sothree:popupTheme="@style/ThemeOverlay.AppCompat.Light" sothree:contentInsetStart="0dp"/>
source share