Android 在三个水平方向的CardView列表上使用嵌套滚动视图
我想在三个不同的卡片视图列表上应用垂直嵌套或简单滚动视图,这些列表在同一个XML中水平定向,这意味着所有三个卡片都有单独的回收器视图并水平滚动。我尝试了相对布局内部的相对布局、相对内部约束、约束内部约束等,但对我不起作用Android 在三个水平方向的CardView列表上使用嵌套滚动视图,android,xml,scrollview,android-nestedscrollview,Android,Xml,Scrollview,Android Nestedscrollview,我想在三个不同的卡片视图列表上应用垂直嵌套或简单滚动视图,这些列表在同一个XML中水平定向,这意味着所有三个卡片都有单独的回收器视图并水平滚动。我尝试了相对布局内部的相对布局、相对内部约束、约束内部约束等,但对我不起作用 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/
<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=".Dashboard">
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:ignore="MissingConstraints">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:paddingTop="16dp">
<LinearLayout
android:id="@+id/linearLayout1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:layout_marginTop="20dp"
android:layout_marginEnd="32dp"
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="MissingConstraints">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:orientation="vertical"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="MissingConstraints">
<com.google.android.material.textview.MaterialTextView
android:id="@+id/textviewUsername"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="@font/montserrat_bold"
android:text="Hello James"
android:textColor="@color/black"
android:textSize="20dp"
android:textStyle="bold" />
<com.google.android.material.textview.MaterialTextView
android:id="@+id/textViewWelcoming"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:fontFamily="@font/montserrat_medium"
android:text="Good Morning!"
android:textColor="@color/black"
android:textSize="12sp" />
</LinearLayout>
<androidx.appcompat.widget.AppCompatImageView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginStart="135dp"
android:src="@drawable/uuser"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="MissingConstraints"
tools:layout_editor_absoluteX="335dp" />
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/linearLayout1"
android:layout_marginTop="16dp"
android:scrollbars="horizontal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
tools:ignore="MissingConstraints" />
<LinearLayout
android:id="@+id/snappingLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/recyclerView1"
android:layout_marginTop="16dp"
android:clipChildren="false"
android:orientation="vertical">
<com.example.cedricistdesign.SnappingRecyclerView
android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipChildren="false"
tools:ignore="MissingClass" />
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/CardView2RecyclerView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/snappingLayout"
android:layout_marginTop="16dp"
android:scrollbars="horizontal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
tools:ignore="MissingConstraints" />
</RelativeLayout>
</androidx.core.widget.NestedScrollView>
<FrameLayout
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/navigationView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:background="@drawable/bottom_navigation_background"
app:itemIconTint="@drawable/bottom_navbar_color"
app:itemTextColor="@drawable/bottom_navbar_color"
app:labelVisibilityMode="unlabeled"
app:menu="@menu/navigation" />
</FrameLayout>
</RelativeLayout>