From a4986cffbcd048e60e4c762cb616074d3ab0a4cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=82=8D=E3=82=80=E3=81=AD=E3=81=93?= Date: Tue, 23 Jul 2024 11:49:54 +0900 Subject: [PATCH] =?UTF-8?q?=E5=85=A8=E9=83=A8=E2=9C=93=E3=83=9C=E3=82=BF?= =?UTF-8?q?=E3=83=B3=E6=8C=99=E5=8B=95=20WIP?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../kidshift/wallet/HistoryItemListAdapter.java | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/feature/wallet/src/main/java/one/nem/kidshift/wallet/HistoryItemListAdapter.java b/feature/wallet/src/main/java/one/nem/kidshift/wallet/HistoryItemListAdapter.java index 0b8f002..95f5292 100644 --- a/feature/wallet/src/main/java/one/nem/kidshift/wallet/HistoryItemListAdapter.java +++ b/feature/wallet/src/main/java/one/nem/kidshift/wallet/HistoryItemListAdapter.java @@ -5,6 +5,7 @@ import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.CheckBox; +import android.widget.ImageButton; import android.widget.LinearLayout; import android.widget.TextView; @@ -154,6 +155,19 @@ public class HistoryItemListAdapter extends RecyclerView.Adapter { + // TODO: 一括で外すことも出来るように + // 判定が変わるまで全部チェックする + try { + int index = historyDataList.getList().indexOf(historyData); + while (!isFirstOfMonth(this.historyDataList.getList().get(index))) { + this.historyDataList.getList().get(index).setChecked(true); + index++; + } + } catch (IndexOutOfBoundsException e) { + // 1個しかない場合? Workaround + } + }); } } @@ -207,11 +221,13 @@ public class HistoryItemListAdapter extends RecyclerView.Adapter