简体   繁体   English

我如何将一个 recyclerview 创建到另一个 recyclerview android

[英]How can i create one recyclerview into another recyclerview android

Here is my json response , How can i create layout with one recyclerview into another recyclerview in android这是我的 json 响应,如何在 android 中使用一个 recyclerview 创建布局到另一个 recyclerview

{
"status": "success",
"message": "Scholarships fetched successfully",
"data": [
    {
        "scholarship_id": "1",
        "scholarship_name": "Test1",
        "scholarship_overview": "<p>Test1</p>\n",
        "university_details": [
            {
                "university_name": "Test2",
                "country_name": "USA",
                "courses": "B.Sc / M.Sc"
            }
        ]
    },
    {
        "scholarship_id": "2",
        "scholarship_name": "Test2",
        "scholarship_overview": "<p>Test2</p>\n",
        "university_details": [
            {
                "university_name": "Test2",
                "country_name": "USA",
                "courses": "B.Sc / M.Sc"
            },
            {
                "university_name": "Test3",
                "country_name": "Switzerland",
                "courses": "B.E. / B.Tech"
            }
        ]
    },

How can i create Layout and bind with it into recyclerview, i want data object put into recylerview and in data recyclerview add another recyclerview into data Recyclerview in android.我如何创建布局并将其绑定到 recyclerview 中,我希望将数据对象放入 recylerview 并在数据 recyclerview 中将另一个 recyclerview 添加到 android 中的数据 Recyclerview 中。

Just add recycler view for item in view holder.只需为视图持有者中的项目添加回收者视图。

In first recycler view you will implement adapter and view holder, in view holder add layout that contain another recyclerview, then handle the nested recycler view in first recycler view adapter.在第一个回收器视图中,您将实现适配器和视图持有者,在视图持有者中添加包含另一个回收者视图的布局,然后在第一个回收者视图适配器中处理嵌套的回收者视图。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在另一个 recyclerview 的项目中创建 RecyclerView? - How can i create a RecyclerView inside of the another recyclerview's item? 如何为3个recyclerView创建一个滚动条android - how to create one scrollbar for 3 recyclerView android 如何在 android studio 中使用 recyclerview 创建相同的东西? - How can I create the same thing using recyclerview in android studio? 如何在另一个RecyclerView的项目中实现RecyclerView - How can I implement a RecyclerView inside another RecyclerView's item 如何在另一个RecyclerView中滚动RecyclerView-Android - How scroll RecyclerView in another recyclerView - android 如何以Gridview的形式创建recyclerview? - How can I create recyclerview in the form of Gridview? 如何在 Kotlin 中创建分段回收视图? - How can I create a sectioned recyclerview in Kotlin? 如何在Android中创建Recyclerview适配器? - How to create Recyclerview adapter in android? Android:如何创建一个 RecyclerView,我可以在其中自由拖放项目以执行某些操作? - Android: How can I create a RecyclerView where I can freely drag and drop an item to do certain things? 如何在每个单选按钮中创建一个单选按钮的 Android RecyclerView,所有单选按钮都可以一起交互? - How To Create Android RecyclerView with one radio button in each item that all radio buttons can interact together?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM