问题是我无法滚动通过recyclerview和cardview嵌套在其中的内容,作为适配器的重复布局,但是 Touch 无法滚动,但是当我按下时键盘按键内容正在滚动
<?xml version="1.0" encoding="utf-8"?>
<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"
android:background="@color/bgSec"
tools:context=".MainActivity">
<android.support.v4.widget.DrawerLayout
android:id="@+id/drawer_layout"
android:elevation="50dp"
android:layout_width="match_parent"
android:fitsSystemWindows="true"
android:layout_height="match_parent">
<include layout="@layout/app_bar"
android:layout_height="match_parent"
android:layout_width="match_parent"/>
<android.support.design.widget.NavigationView
android:id="@+id/nav_view"
android:layout_gravity="start"
android:fitsSystemWindows="true"
app:headerLayout="@layout/header_layout"
app:menu="@menu/side_menu"
android:layout_width="wrap_content"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:orientation="vertical"
android:layout_gravity="bottom"
android:background="#000"
android:layout_height="150dp">
</LinearLayout>
</android.support.design.widget.NavigationView>
</android.support.v4.widget.DrawerLayout>
<android.support.v7.widget.RecyclerView
android:id="@+id/recycler_view"
android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_alignParentStart="true"
android:layout_alignParentTop="true"/>
</RelativeLayout>
和card_view.xml在下面
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_height="wrap_content"
android:layout_width="wrap_content">
<android.support.v7.widget.CardView
android:id="@+id/card_view"
android:background="@color/bgWhite"
app:cardElevation="5dp"
android:layout_width="match_parent"
android:layout_margin="10dp"
android:layout_height="300dp">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="None"
android:id="@+id/category_name"/>
</android.support.v7.widget.CardView>
</RelativeLayout>
预计通过触摸滚动,但改为通过键盘下箭头键滚动