You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
1.3 KiB
Java

package com.rehome.zhdcoa.adapter;
import com.rehome.zhdcoa.R;
import com.rehome.zhdcoa.bean.AttendanceCheckBean;
import com.xuexiang.xui.adapter.recyclerview.BaseRecyclerAdapter;
import com.xuexiang.xui.adapter.recyclerview.RecyclerViewHolder;
import androidx.annotation.NonNull;
public class KqDataAdapter extends BaseRecyclerAdapter<AttendanceCheckBean.RowsBean> {
@Override
protected int getItemLayoutId(int viewType) {
{
return R.layout.layout_kq;
}
}
@Override
protected void bindData(@NonNull RecyclerViewHolder holder, int position, AttendanceCheckBean.RowsBean item) {
if (item != null) {
if (item.getKind_name().equals("")){
holder.text(R.id.tv_KIND_NAME, "");
}else {
holder.text(R.id.tv_KIND_NAME, item.getKind_name());
}
holder.text(R.id.tv_rq, item.getRq());
if (item.getCyc_begin().equals("")){
holder.text(R.id.tv_cyc_begin,"无记录");
}else {
holder.text(R.id.tv_cyc_begin, item.getCyc_begin());
}
if (item.getCyc_end().equals("")){
holder.text(R.id.tv_cyc_end,"无记录");
}else {
holder.text(R.id.tv_cyc_end, item.getCyc_end());
}
}
}
}