Add to your top layout: android:fitsSystemWindows="true"
For example:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/vg"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true">