android:fitsSystemWindows = true
On several occasions I have come across this property for the preparation of layouts, however on many occasions this same cause unexpected behavior, which take time to identify that this causes it.
Definition obtained from the official site:
Boolean internal attribute to adjust view based on windows system such as the status bar.
What I understand is that this property makes my layout cover the whole screen, but I have seen it implemented in different places and I do not see exactly what function it plays or if it can be dispensed with.