简体   繁体   中英

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

{
"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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM