From ab92c6ce93b365c04daf736db9632044781625dd Mon Sep 17 00:00:00 2001 From: r-ca Date: Sun, 28 Jan 2024 22:50:09 +0900 Subject: [PATCH] =?UTF-8?q?TagAdapter=E5=AE=9F=E8=A3=85=20WIP?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lacerta/feature/library/TagAdapter.java | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 feature/library/src/main/java/one/nem/lacerta/feature/library/TagAdapter.java diff --git a/feature/library/src/main/java/one/nem/lacerta/feature/library/TagAdapter.java b/feature/library/src/main/java/one/nem/lacerta/feature/library/TagAdapter.java new file mode 100644 index 00000000..f184caaa --- /dev/null +++ b/feature/library/src/main/java/one/nem/lacerta/feature/library/TagAdapter.java @@ -0,0 +1,44 @@ +package one.nem.lacerta.feature.library; + +import android.view.View; +import android.view.ViewGroup; +import android.widget.BaseAdapter; + +import com.google.android.material.chip.Chip; + +import java.util.ArrayList; + +import one.nem.lacerta.model.document.tag.DocumentTag; + +public class TagAdapter extends BaseAdapter { + + private ArrayList tagList; + + @Override + public int getCount() { + return 0; + } + + @Override + public Object getItem(int position) { + return null; + } + + @Override + public long getItemId(int position) { + return 0; + } + + @Override + public View getView(int position, View convertView, ViewGroup parent) { + Chip chip; + if (convertView == null) { + chip = new Chip(parent.getContext()); + } + else { + chip = (Chip) convertView; + } + chip.setText(tagList.get(position).getName()); + return chip; + } +}