如何在列表视图下方添加水平滚动视图
How to add horizontal scroll view below a listview
如何将水平滚动视图放在列表视图下方?我有一个列表视图,下面是一个带有一堆单选按钮的水平滚动视图。这是我的代码:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">
<ListView
android:id="@+id/list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="@+id/radioGroup">
</ListView>
<RadioGroup
android:id="@+id/radioGroup"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="horizontal"
android:layout_alignParentBottom="true"
android:layout_alignParentStart="true">
<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:button="@null"
android:checked="true"
android:gravity="center"
android:padding="5dp"
android:text="/>
<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:button="@null"
android:gravity="center"
android:padding="5dp"
android:text="A-"/>
<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:button="@null"
android:gravity="center"
android:padding="5dp"
android:text="B+"/>
<RadioButton
android:id="@+id/bNegative"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:button="@null"
android:gravity="center"
android:padding="5dp"
android:text="/>
</RadioGroup>
</RelativeLayout>
我需要能够正常滚动列表视图,即垂直滚动视图和水平滚动视图。现在我无法滚动列表视图,但可以滚动水平滚动视图。请帮帮我
通过设置 recyclerview 的方向,使用 recyclerview 根据您的要求水平和垂直滚动
滚动垂直设置方向
android:orientation="vertical "
并水平滚动设置方向
android:orientation="horizontal"
如何将水平滚动视图放在列表视图下方?我有一个列表视图,下面是一个带有一堆单选按钮的水平滚动视图。这是我的代码:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">
<ListView
android:id="@+id/list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="@+id/radioGroup">
</ListView>
<RadioGroup
android:id="@+id/radioGroup"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="horizontal"
android:layout_alignParentBottom="true"
android:layout_alignParentStart="true">
<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:button="@null"
android:checked="true"
android:gravity="center"
android:padding="5dp"
android:text="/>
<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:button="@null"
android:gravity="center"
android:padding="5dp"
android:text="A-"/>
<RadioButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:button="@null"
android:gravity="center"
android:padding="5dp"
android:text="B+"/>
<RadioButton
android:id="@+id/bNegative"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:button="@null"
android:gravity="center"
android:padding="5dp"
android:text="/>
</RadioGroup>
</RelativeLayout>
我需要能够正常滚动列表视图,即垂直滚动视图和水平滚动视图。现在我无法滚动列表视图,但可以滚动水平滚动视图。请帮帮我
通过设置 recyclerview 的方向,使用 recyclerview 根据您的要求水平和垂直滚动
滚动垂直设置方向
android:orientation="vertical "
并水平滚动设置方向
android:orientation="horizontal"