0
ナビゲーションドロワーを作成しました。ナビゲーションドロワのメインコンテンツにRecyclerViewがありますが、スクロールしていません。最初はRecyclerViewをNestedScrollViewなしで配置しましたが、動作しませんでしたので、NestedScrollView内に配置しようとしましたが、後者は動作しませんでした。Recyclerビューがナビゲーションドロワーでスクロールしていません
マイナビ引き出しXMLは次のとおりです。
<RelativeLayout
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"
tools:context="com.roushan.assignment1.NavDrawerActivity">
<android.support.design.widget.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppTheme.AppBarOverlay">
<android.support.v7.widget.Toolbar
android:id="@+id/nav_toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="@color/nav_toolbar_color"
app:popupTheme="@style/AppTheme.PopupOverlay" />
</android.support.design.widget.AppBarLayout>
<!-- MAIN CONTENT OF NAVIGATION DRAWER ACTIVITY -->
<android.support.v4.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fillViewport="true"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<android.support.v7.widget.RecyclerView
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:scrollbars="vertical">
</android.support.v7.widget.RecyclerView>
</android.support.v4.widget.NestedScrollView>
<android.support.v4.widget.DrawerLayout
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="56dp"
tools:openDrawer="start">
<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_drawer_header"
app:menu="@menu/activity_nav_drawer_drawer" >
</android.support.design.widget.NavigationView>
</android.support.v4.widget.DrawerLayout>
</RelativeLayout>
メインコンテンツは 'の前に' 'の中に入ります。また、必ずしも 'NestedScrollView'は必要ありません。 –
それは働いて..ありがとう.. –
問題はありません。 [下の回答を受け入れる](http://meta.stackexchange.com/questions/5234/how-does-accepting-an-answer-work)を実行してください。問題が解決した場合は、矢印の下にあるチェックマークを押してください。乾杯! –