アダプタ実装 WIP

This commit is contained in:
ろむねこ 2024-01-25 16:35:18 +09:00
parent b44d1b0746
commit 3a47cd97fd
No known key found for this signature in database
GPG Key ID: FA1F39A1BA37D168

View File

@ -6,28 +6,44 @@ import android.view.ViewGroup;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.RecyclerView;
import java.util.ArrayList;
import one.nem.lacerta.model.document.tag.DocumentTag;
public class TagListItemAdapter extends RecyclerView.Adapter<TagListItemAdapter.TagListItemViewHolder> { public class TagListItemAdapter extends RecyclerView.Adapter<TagListItemAdapter.TagListItemViewHolder> {
@NonNull ArrayList<DocumentTag> documentTags;
@Override
public TagListItemViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { TagListItemSelectListener listener;
return null;
} public TagListItemAdapter(TagListItemSelectListener listener) {
this.listener = listener;
@Override }
public void onBindViewHolder(@NonNull TagListItemViewHolder holder, int position) {
public void setDocumentTags(ArrayList<DocumentTag> documentTags) {
} this.documentTags = documentTags;
}
@Override
public int getItemCount() { @NonNull
return 0; @Override
} public TagListItemViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {
return null;
public static class TagListItemViewHolder extends RecyclerView.ViewHolder { }
public TagListItemViewHolder(@NonNull View itemView) { @Override
super(itemView); public void onBindViewHolder(@NonNull TagListItemViewHolder holder, int position) {
}
}
@Override
public int getItemCount() {
return documentTags == null ? 0 : documentTags.size();
}
public static class TagListItemViewHolder extends RecyclerView.ViewHolder {
public TagListItemViewHolder(@NonNull View itemView) {
super(itemView);
} }
}
} }