0
Извините, мой плохой английский.Ошибка с панелью инструментов
У меня есть следующий файл "activity_main.xml", проблема в том, что панель инструментов НЕ появляется, кто-то говорит мне, как заставить ее выглядеть?
<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"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<RelativeLayout
android:id="@+id/anchor_point"
android:layout_width="match_parent"
android:layout_height="match_parent">
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/holo_blue_light"
/>
</RelativeLayout>
<android.support.design.widget.NavigationView
android:id="@+id/navigation"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
app:elevation="4dp"
app:headerLayout="@layout/drawer_header"
app:menu="@menu/menu_main"/>
</android.support.v4.widget.DrawerLayout>
с этим другим "activity_main.xml" панели инструментов появляется, но не хватает панели навигации
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res /android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:ads="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<android.support.v7.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/holo_blue_light"
>
</android.support.v7.widget.Toolbar>
<RelativeLayout
android:layout_below="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/container">
</RelativeLayout>
</RelativeLayout>
попробуйте добавить эту строку в navigationview в вашем activity_main xml 'android: layout_below = "@ + id/toolbar"' .. дайте мне знать дальше .. –