Originally created a navigation drawer template, this template created automatic markup (
). In general, I try to use BottomNavigationView, I added activity_main.xml to the main markup, I launch the application and the menu in the middle, but it must be tied to Bottom.
activity_main.xml
<?xml version="1.0" encoding="utf-8"?> <android.support.v4.widget.DrawerLayout android:id="@+id/drawer_layout" 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:openDrawer="start"> <include layout="@layout/app_bar_main" android:layout_width="match_parent" android:layout_height="match_parent"/> <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_main" app:menu="@menu/activity_main_drawer"/> <android.support.design.widget.BottomNavigationView android:id="@+id/bottom_navigation" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignParentBottom="true" app:itemBackground="@color/navigation" app:itemIconTint="@color/bottom_navigation_item_background_colors" app:itemTextColor="@color/bottom_navigation_item_background_colors" app:menu="@menu/bottomnavigationview" /> </android.support.v4.widget.DrawerLayout> Content: content_main
<?xml version="1.0" encoding="utf-8"?> <ScrollView android:id="@+id/scrollViewcontent" android:layout_width="match_parent" android:layout_height="match_parent"> <LinearLayout android:id="@+id/content_main" android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="left" android:orientation="vertical" android:padding="30dp"> <TextView android:id="@+id/fio" android:layout_width="wrap_content" android:layout_height="wrap_content" android:drawableLeft="@drawable/star_512" android:drawablePadding="8dp" android:text="@string/fion"/> <EditText android:id="@+id/fiontext" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="10dp" android:layout_marginTop="15dp" android:clickable="true" android:ems="10" android:focusable="true" android:focusableInTouchMode="true" android:hint=" " android:inputType="textMultiLine" android:lineSpacingMultiplier="2" android:maxLength="20" android:maxLines="2" android:text="" /> <TextView android:id="@+id/fionuri" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="20dp" android:text="@string/adrespropiski"/> <TextView android:id="@+id/naselpun" android:layout_width="wrap_content" android:layout_height="wrap_content" android:drawableLeft="@drawable/star_512" android:drawablePadding="8dp" android:text="@string/naselpunkt"/> <EditText android:id="@+id/naspunkt" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginBottom="10dp" android:layout_marginTop="20dp" android:clickable="true" android:ems="10" android:focusable="true" android:focusableInTouchMode="true" android:hint=" " android:inputType="textMultiLine" android:lineSpacingMultiplier="2" android:maxLength="20" android:maxLines="2" android:selectAllOnFocus="false" android:text=""/> <TextView android:id="@+id/adres_ul" android:layout_width="wrap_content" android:layout_height="wrap_content" android:drawableLeft="@drawable/star_512" android:drawablePadding="8dp" android:text="@string/adres"/> <EditText android:id="@+id/ulica" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginBottom="10dp" android:layout_marginTop="20dp" android:clickable="true" android:ems="10" android:focusable="true" android:focusableInTouchMode="true" android:hint=" " android:inputType="textMultiLine" android:lineSpacingMultiplier="2" android:maxLength="20" android:maxLines="5" android:selectAllOnFocus="false" android:text=""/> <TextView android:id="@+id/phonetext" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginTop="15dp" android:drawableLeft="@drawable/star_512" android:drawablePadding="8dp" android:text="@string/dom"/> <EditText android:id="@+id/dom" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="10dp" android:clickable="true" android:ems="10" android:focusable="true" android:focusableInTouchMode="true" android:hint="" android:inputType="phone" android:maxLength="30"/> <TextView android:id="@+id/email" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="15dp" android:drawableLeft="@drawable/star_512" android:drawablePadding="8dp" android:text="@string/email"/> <EditText android:id="@+id/emailfild" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="10dp" android:clickable="true" android:ems="10" android:focusable="true" android:focusableInTouchMode="true" android:hint="" android:inputType="textEmailAddress" android:maxLength="20"/> <TextView android:id="@+id/mesag" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="15dp" android:drawableLeft="@drawable/star_512" android:drawablePadding="8dp" android:text="@string/messag"/> <EditText android:id="@+id/mesages" android:layout_width="match_parent" android:layout_height="match_parent" android:layout_marginTop="10dp" android:clickable="true" android:ems="10" android:focusable="true" android:focusableInTouchMode="true" android:hint="введите ваше сообщение" android:inputType="textMultiLine" android:maxLength="1000" android:maxLines="5"/> </LinearLayout> </ScrollView> UPDATE: with markup:
<?xml version="1.0" encoding="utf-8"?> <RelativeLayout android:layout_width="match_parent" android:layout_height="match_parent"> <include layout="@layout/app_bar_main" android:layout_width="match_parent" android:layout_height="match_parent" /> <android.support.design.widget.BottomNavigationView android:id="@+id/bottom_navigation" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_alignParentBottom="true" app:itemBackground="@color/navigation" app:itemIconTint="@color/bottom_navigation_item_background_colors" app:itemTextColor="@color/bottom_navigation_item_background_colors" app:menu="@menu/bottomnavigationview" /> </RelativeLayout> <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_main" app:menu="@menu/activity_main_drawer" /> 

android:layout_alignParentBottom="false". - post_zeew