我想在带有2列并使用notifyDataSetChanged的recyclerView / Gridlayout上添加标题
我试图在ViewHolder上调用recyclerView / Gridlayout到recyclerView,但是它给了我所有userId,所以我没有对数据进行排序
@Override
public void onBindViewHolder(@NonNull final RecyclerView.ViewHolder holder, final int position) {
((DocAttachVh) holder).setData(position);
}
private void setData(final int position) {
innerFiles.clear();
file = mFiles.get(position);
Utils.setImage(context, file.getUser(), imvUserIcon, true);
if (file.getUser() != null) {
tvUserName.setText(file.getUser().getName());
tvUserApp.setText(file.getUser().getApp());
tvDate.setText(file.getDate());
getDatainnerData(file.getUser().getId());
}
}
getDatainnerData is giving me post data from api file datas using user id[enter image description here][1]