I am just starting to learn android, I am learning to add AppBar. But if I use Relative Layout as the root then Status Bar don\'t use the color \"colorPrimaryDark\" defined
The styling of the statusbar is done by the
android:fitsSystemWindows
tag. This is currently not supported for RelativeLayout. Either you try another layout like FrameLayout which could work but for know i would suggest to stick to the CoordinatorLayout.
Maybe you get some more details here: https://medium.com/google-developers/why-would-i-want-to-fitssystemwindows-4e26d9ce1eec