From 5da9e14d616a17b2a07a4d6a8fd6c5b2b96812f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Mon, 29 Jan 2024 10:46:41 +0900 Subject: [PATCH] =?UTF-8?q?Workaround=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../one/nem/lacerta/feature/library/ListItemAdapter.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/feature/library/src/main/java/one/nem/lacerta/feature/library/ListItemAdapter.java b/feature/library/src/main/java/one/nem/lacerta/feature/library/ListItemAdapter.java index ee310413..579d1582 100644 --- a/feature/library/src/main/java/one/nem/lacerta/feature/library/ListItemAdapter.java +++ b/feature/library/src/main/java/one/nem/lacerta/feature/library/ListItemAdapter.java @@ -1,5 +1,6 @@ package one.nem.lacerta.feature.library; +import android.graphics.Color; import android.util.Log; import android.view.LayoutInflater; import android.view.View; @@ -49,11 +50,14 @@ public class ListItemAdapter extends RecyclerView.Adapter 0) { // ごまかし + holder.tagGroup.removeAllViews(); + } for (int i = 0; i < listItem.getTagList().size(); i++) { - Toast.makeText(holder.tagGroup.getContext(), listItem.getTagList().get(i).getName(), Toast.LENGTH_SHORT).show(); ChipGroup chipGroup = holder.tagGroup; Chip chip = new Chip(chipGroup.getContext()); chip.setText(listItem.getTagList().get(i).getName()); + chip.setBackgroundColor(Color.parseColor(listItem.getTagList().get(i).getColor())); chipGroup.addView(chip); } holder.tagGroup.setVisibility(View.VISIBLE);