Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/181.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/sockets/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 以水平循环视图作为行文件实现垂直循环视图_Android_Android Recyclerview - Fatal编程技术网

Android 以水平循环视图作为行文件实现垂直循环视图

Android 以水平循环视图作为行文件实现垂直循环视图,android,android-recyclerview,Android,Android Recyclerview,我想实现这样的目标 我尝试将水平recyclerview作为垂直recyclerview的行文件,但无法实现水平滚动 如果有人能帮我,那就太好了 这是密码 <?xml version="1.0" encoding="utf-8"?> 在这里,我试图在LinearLyout(LINU main)中添加动态视图创建您的项目布局,您将在recycler视图中设置它,如下所示 <?xml version="1.0" encoding="utf-8"?> <L

我想实现这样的目标

我尝试将水平recyclerview作为垂直recyclerview的行文件,但无法实现水平滚动

如果有人能帮我,那就太好了

这是密码

<?xml version="1.0" encoding="utf-8"?>



在这里,我试图在LinearLyout(LINU main)中添加动态视图

创建您的项目布局,您将在recycler视图中设置它,如下所示

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    xmlns:tools="http://schemas.android.com/tools"
    android:orientation="horizontal">

    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:orientation="vertical"
        android:padding="@dimen/_8sdp">

    //YOUR VIEWS HERE

    </LinearLayout>

    <ScrollView  
        android:layout_width="0dp"
        android:layout_weight="1"
        android:layout_height="wrap_content">

       <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:gravity=""
        android:orientation="horizontal"
        android:padding="@dimen/_8sdp">

        //YOUR HORIZONTAL SCROLL VIEWS COMPONENT

        </LinearLayout>

    </ScrollView>
</LinearLayout>

//你在这里的看法
//您的水平滚动视图组件

希望这会有所帮助。有关更多详细信息,请在此处共享您的UI xml文件。

创建您的项目布局,并在“回收器”视图中进行如下设置

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    xmlns:tools="http://schemas.android.com/tools"
    android:orientation="horizontal">

    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:orientation="vertical"
        android:padding="@dimen/_8sdp">

    //YOUR VIEWS HERE

    </LinearLayout>

    <ScrollView  
        android:layout_width="0dp"
        android:layout_weight="1"
        android:layout_height="wrap_content">

       <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:gravity=""
        android:orientation="horizontal"
        android:padding="@dimen/_8sdp">

        //YOUR HORIZONTAL SCROLL VIEWS COMPONENT

        </LinearLayout>

    </ScrollView>
</LinearLayout>

//你在这里的看法
//您的水平滚动视图组件

希望这会有所帮助。有关更多详细信息,请在此处共享您的UI xml文件。

请共享您的代码,并解释您是如何实现的。请发布您尝试过的任何内容!我们只能通过查看出错的地方来提供帮助!检查我的最新答案请分享你的代码并解释你是如何实现的请发布你尝试过的任何东西!我们只能通过查看出错的地方来提供帮助!检查我的更新答案谢谢你的回答,但这里只有一个视图将滚动,我想同时滚动所有视图谢谢你的回答,但这里只有一个视图将滚动,我想同时滚动所有视图