There is a markup:
<?xml version="1.0" encoding="utf-8"?> <android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:fitsSystemWindows="true" tools:context=".cityActivity"> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <android.support.design.widget.AppBarLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:theme="@style/AppTheme.Base.AppBarOverlay"> <include layout="@layout/toolbar"/> </android.support.design.widget.AppBarLayout> <android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/drawer_layout" android:layout_width="match_parent" android:layout_height="match_parent" android:fitsSystemWindows="true" tools:openDrawer="start"> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" app:layout_behavior="@string/appbar_scrolling_view_behavior" tools:context=".cityActivity" android:orientation="vertical"> <RelativeLayout android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" android:paddingLeft="5dp" android:paddingRight="5dp" android:background="?attr/colorPrimary" android:id="@+id/searchLayout"> <EditText android:layout_width="match_parent" android:layout_height="wrap_content" android:id="@+id/etSearch" android:drawableLeft="@android:drawable/ic_menu_search" android:hint="Название города" android:background="@drawable/rounded_edittext" android:layout_centerVertical="true" android:layout_alignParentLeft="true" android:layout_alignParentStart="true" android:textSize="15dp" android:focusableInTouchMode="true"/> </RelativeLayout> <ListView android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/list" android:layout_alignParentRight="true" android:layout_alignParentEnd="true" android:choiceMode="singleChoice" android:layout_below="@+id/searchLayout" android:divider="@color/divider" android:dividerHeight="1dp" android:focusableInTouchMode="true"> </ListView> </LinearLayout> <android.support.design.widget.NavigationView android:id="@+id/nav_view" android:layout_width="wrap_content" android:layout_height="match_parent" android:layout_gravity="start" android:fitsSystemWindows="true" app:headerLayout="@layout/nav_header_city2" app:menu="@menu/activity_city2_drawer" /> </android.support.v4.widget.DrawerLayout> </LinearLayout> </android.support.design.widget.CoordinatorLayout> In the preview we can see the gap between the toolbar and RelativeLayout with EditText:
On the device, the gap is even greater. I studied everything I could, without your help.
UPD
And in the next activation, where I do not use the curtain or CoordinatorLayout, or the AppBarLayout widget, everything is fine:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="ru.qwerq.qwerq.sferaActivity" android:focusableInTouchMode="true"> <include layout="@layout/toolbar"/> <RelativeLayout android:layout_width="match_parent" android:layout_height="?attr/actionBarSize" android:orientation="horizontal" android:paddingLeft="5dp" android:paddingRight="5dp" android:background="?attr/colorPrimary"> <EditText android:layout_width="match_parent" android:layout_height="wrap_content" android:id="@+id/etSearch" android:drawableLeft="@android:drawable/ic_menu_search" android:hint="Название категории" android:background="@drawable/rounded_edittext" android:layout_centerVertical="true" android:layout_alignParentLeft="true" android:layout_alignParentStart="true" android:textSize="15dp" /> </RelativeLayout> <ListView android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/list" android:layout_alignParentRight="true" android:layout_alignParentEnd="true" android:choiceMode="singleChoice" android:divider="@color/divider" android:dividerHeight="1dp"> </ListView> </LinearLayout> 
