From 3a47cd97fd6eb29d58cfa7d02e14759579155452 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Thu, 25 Jan 2024 16:35:18 +0900 Subject: [PATCH] =?UTF-8?q?=E3=82=A2=E3=83=80=E3=83=97=E3=82=BF=E5=AE=9F?= =?UTF-8?q?=E8=A3=85=20WIP?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lacerta/setting/TagListItemAdapter.java | 58 ++++++++++++------- 1 file changed, 37 insertions(+), 21 deletions(-) diff --git a/feature/setting/src/main/java/one/nem/lacerta/setting/TagListItemAdapter.java b/feature/setting/src/main/java/one/nem/lacerta/setting/TagListItemAdapter.java index 63d599d1..482b1198 100644 --- a/feature/setting/src/main/java/one/nem/lacerta/setting/TagListItemAdapter.java +++ b/feature/setting/src/main/java/one/nem/lacerta/setting/TagListItemAdapter.java @@ -6,28 +6,44 @@ import android.view.ViewGroup; import androidx.annotation.NonNull; import androidx.recyclerview.widget.RecyclerView; +import java.util.ArrayList; + +import one.nem.lacerta.model.document.tag.DocumentTag; + public class TagListItemAdapter extends RecyclerView.Adapter { - @NonNull - @Override - public TagListItemViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { - return null; - } - - @Override - public void onBindViewHolder(@NonNull TagListItemViewHolder holder, int position) { - - } - - @Override - public int getItemCount() { - return 0; - } - - public static class TagListItemViewHolder extends RecyclerView.ViewHolder { - - public TagListItemViewHolder(@NonNull View itemView) { - super(itemView); - } + ArrayList documentTags; + + TagListItemSelectListener listener; + + public TagListItemAdapter(TagListItemSelectListener listener) { + this.listener = listener; + } + + public void setDocumentTags(ArrayList documentTags) { + this.documentTags = documentTags; + } + + @NonNull + @Override + public TagListItemViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { + return null; + } + + @Override + 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); } + } }