I\'m using a template from Android Studio that used AppCompat Toolbar. Unfortunately, the toolbar casts shadow on the status bar so it doesn\'t
AppCompat Toolbar
I tried all the other answers and none worked. What fixed it was adding this to the AppBarLayout:
app:elevation="0dp"