1, custom toolbar, we need to turn off actionbar, so we usually add the following code:
<item name="Windowactionbar" >false</item>
<item name="Windownotitle" >true</item>
You need to turn off some of the system's settings to avoid bugs when using custom headers
There will be a number of functions between different versions of Android, as well as changes in the code logic, in which programming is to pay extra attention
<resources> <!--This should be the function part of specifying the system status bar color above version 21-<!--This is not mentioned in the first line of code-<style name="Fruitactivitytheme"Parent="Apptheme"> <item name="Windowactionbar">false</item> <item name="Windownotitle">true</item> <item name="Android:statusbarcolor"> @android:color/transparent</item> </style></resources>
Android Entry-Level tutorial "The first line of code" problems encountered