'How can i make actionbar not overlap layout on a specific device

actionbar overlaping the layout

on pixel 2 it goes under but on pixel 4 it don't. If i add padding in the xml file it fixes the problem on pixel 2 but its gonna look ugly on the pixel 4. I have tried "android:fitsSystemWindows="false".



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source