I am using a theme with NoActionBar. Manifest file:
android:theme="@style/Theme.MaterialComponents.Light.NoActionBar"
I am using another Action bar, which I include to the layout:
<include layout="@layout/toolbar" />
However, I always get two Toolbars, and the upper one is the one, which would be there if I did not use NoActionBar theme. I found out, that if I delete this part in styles.xml file, it works as it should - there is no second action bar:
<style name="Theme.MaterialComponents.Light.NoActionBar">
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
</style>
Of course I would like to keep this in the style.xml file as this helps to set up also the colour of the notification panel.