Set <item name="android:windowTranslucentStatus">true</item> In the definition file of toolbar in the theme of the app, add android:fitsSystemWindows="true" At this time, you need to redefine the height of the toolbar. It is ok to increase the height of statusBar based on the height of toolbar
Set <item name="android:windowTranslucentStatus">true</item>
In the definition file of toolbar in the theme of the app, add android:fitsSystemWindows="true"
At this time, you need to redefine the height of the toolbar. It is ok to increase the height of statusBar based on the height of toolbar