AndroidStudio.Butに添付されているDrawerLayoutを使用してアクティビティを作成しました。私はRecyclerViewを使用したときに、RecyclerViewが画面全体を埋めました...?DrawerLayoutはRecyclerViewと競合していますか? RecyclerViewは画面全体を塗りつぶします
<?xml version="1.0" encoding="utf-8"?>
<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">
<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.v7.widget.RecyclerView
android:layout_marginTop="20dp"
android:id="@+id/titleList"
android:layout_width="match_parent"
android:layout_height="80dp"/>
</android.support.v4.widget.DrawerLayout>
The Button on the left top can't be used.Guess it was coverd by RecyclerView
dsajfhkjasldfkj
。あなたは 'View'コンテンツにそれを置く必要があります。すなわち、 ''のレイアウトです。あなたはおそらく 'content_main'レイアウトを持っています。それはそこに行くだろう。 –