| | |
| | | import androidx.recyclerview.widget.RecyclerView; |
| | | |
| | | import com.dayu.pipirrapp.R; |
| | | import com.dayu.pipirrapp.bean.net.OrderDetailResult; |
| | | import com.dayu.pipirrapp.bean.net.OrderListResult; |
| | | import com.dayu.pipirrapp.databinding.ItemNoMoreBinding; |
| | | import com.dayu.pipirrapp.databinding.ItemOrderBinding; |
| | |
| | | public class OrderAdapter extends BaseRecyclerAdapter<RecyclerView.ViewHolder> { |
| | | |
| | | |
| | | List<OrderListResult.Data> recordsList; |
| | | List<OrderDetailResult> recordsList; |
| | | Context context; |
| | | OrderFragment orderFragment; |
| | | |
| | | public OrderAdapter(Context context, List<OrderListResult.Data> recordsList, OrderFragment orderFragment) { |
| | | public OrderAdapter(Context context, List<OrderDetailResult> recordsList, OrderFragment orderFragment) { |
| | | this.context = context; |
| | | this.recordsList = recordsList; |
| | | this.orderFragment = orderFragment; |
| | |
| | | public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) { |
| | | if (holder instanceof OrderAdapter.ViewHolder) { |
| | | if (recordsList.size() > 0) { |
| | | OrderListResult.Data record = recordsList.get(position); |
| | | OrderDetailResult record = recordsList.get(position); |
| | | ((OrderAdapter.ViewHolder) holder).getBinding().setData(record); |
| | | switch (record.getProResultStateId()) { |
| | | case 0://未上报 |