とりあえず廃止

This commit is contained in:
ろむねこ 2024-07-23 12:11:44 +09:00
parent 4916c05b08
commit 62d298ebfd
Signed by: Fujimatsu
GPG Key ID: FA1F39A1BA37D168

View File

@ -8,6 +8,7 @@ import android.widget.CheckBox;
import android.widget.ImageButton;
import android.widget.LinearLayout;
import android.widget.TextView;
import android.widget.Toast;
import androidx.annotation.NonNull;
import androidx.recyclerview.widget.RecyclerView;
@ -156,21 +157,7 @@ public class HistoryItemListAdapter extends RecyclerView.Adapter<HistoryItemList
((MonthHeaderViewHolder) holder).monthHeaderTitle.setText(historyData.getRegisteredAt().getDate() + "");
((MonthHeaderViewHolder) holder).monthTotalTextView.setText(getMonthTotal(historyData) + "");
((MonthHeaderViewHolder) holder).checkAllButton.setOnClickListener(v -> {
// 次のヘッダーまでの間のアイテムを全てチェックする
int index = position + 1;
try {
while (!isFirstOfMonth(this.historyDataList.getList().get(index))) {
this.historyDataList.getList().get(index).setChecked(true);
index++;
}
// 自身を更新 Workaround: なぜかindexを+1しないとチェックをつけれないので
this.historyDataList.getList().get(position).setChecked(true);
// 表示更新
notifyItemRangeChanged(position, index - position);
// notifyDataSetChanged();
} catch (IndexOutOfBoundsException e) {
// 1個しかない場合 Workaround
}
Toast.makeText(v.getContext(), "実装中", Toast.LENGTH_SHORT).show();
});
}
}