[英]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.