Как я могу вызвать массив платежей? использование дооснащения
Как справиться с объектами второго массива, я успешно справился с данными, но я не знаю, как вызвать второй объект массива, пожалуйста, кто-нибудь может мне помочь с этим ... я новичок в модернизации .
Это пример кода, который я использовал в классе адаптера для извлечения объекта массива данных
public class InProgress_Adapter extends RecyclerView.Adapter<InProgress_Adapter.InProgressViewHolder> {
private LayoutInflater inflater;
private List<Data_Inprogress> modelRecyclerArrayList;
Context ctx;
public InProgress_Adapter( Context ctx, List<Data_Inprogress> modelRecyclerArrayList) {
this.inflater = inflater.from(ctx);
this.modelRecyclerArrayList = modelRecyclerArrayList;
this.ctx = ctx;
}
public void onBindViewHolder(@NonNull InProgressViewHolder holder, int i) {
holder.location1.setText(modelRecyclerArrayList.get(i).getLocaion());
json data
{
"status": "Success",
"message": "10 results found.",
"data": [
{
"work_order_id": 1,
"description": "Desc-1",
"locaion": "Locaion-1",
"date": "0-01-2020",
"duration": "1 days",
"user_name": "User name-1",
"user_address": "User address-1",
"payment_details": [
{
"amount": 0,
"date": "0-01-2020",
"payment_method": "Cash",
"balance": 0
}
]
},
{
"work_order_id": 2,
"description": "Desc-2",
"locaion": "Locaion-2",
"date": "1-01-2020",
"duration": "2 days",
"user_name": "User name-2",
"user_address": "User address-2",
"payment_details": [
{
"amount": 1,
"date": "1-01-2020",
"payment_method": "Cash",
"balance": 2
}
]
},
{
"work_order_id": 3,
"description": "Desc-3",
"locaion": "Locaion-3",
"date": "2-01-2020",
"duration": "3 days",
"user_name": "User name-3",
"user_address": "User address-3",
"payment_details": [
{
"amount": 2,
"date": "2-01-2020",
"payment_method": "Cash",
"balance": 4
}
]
},
{
"work_order_id": 4,
"description": "Desc-4",
"locaion": "Locaion-4",
"date": "3-01-2020",
"duration": "4 days",
"user_name": "User name-4",
"user_address": "User address-4",
"payment_details": [
{
"amount": 3,
"date": "3-01-2020",
"payment_method": "Cash",
"balance": 6
}
]
},
{
"work_order_id": 5,
"description": "Desc-5",
"locaion": "Locaion-5",
"date": "4-01-2020",
"duration": "5 days",
"user_name": "User name-5",
"user_address": "User address-5",
"payment_details": [
{
"amount": 4,
"date": "4-01-2020",
"payment_method": "Cash",
"balance": 8
}
]
},
{
"work_order_id": 6,
"description": "Desc-6",
"locaion": "Locaion-6",
"date": "5-01-2020",
"duration": "6 days",
"user_name": "User name-6",
"user_address": "User address-6",
"payment_details": [
{
"amount": 5,
"date": "5-01-2020",
"payment_method": "Cash",
"balance": 10
}
]
},
{
"work_order_id": 7,
"description": "Desc-7",
"locaion": "Locaion-7",
"date": "6-01-2020",
"duration": "7 days",
"user_name": "User name-7",
"user_address": "User address-7",
"payment_details": [
{
"amount": 6,
"date": "6-01-2020",
"payment_method": "Cash",
"balance": 12
}
]
}
]
}