Changed the Chip to match the background in Amoled and Dark Mode

This commit is contained in:
Praveen Kumar 2021-09-03 11:24:22 +05:30
parent a9d850aa01
commit 385475aa8b
3 changed files with 8 additions and 5 deletions

View file

@ -409,17 +409,14 @@ public class EntryListView extends Fragment implements EntryAdapter.Listener {
});
_groupChip.setOnClickListener(v -> {
ColorStateList colorStateList = ContextCompat.getColorStateList(getContext(), R.color.bg_chip_text_color);
chipGroup.removeAllViews();
for (String group : _groups) {
Chip chip = new Chip(getContext());
Chip chip = (Chip) this.getLayoutInflater().inflate(R.layout.chip_material, null, false);
chip.setText(group);
chip.setCheckable(true);
chip.setChecked(_groupFilter != null && _groupFilter.contains(group));
chip.setCheckedIconVisible(false);
chip.setChipBackgroundColorResource(R.color.bg_chip_color);
chip.setTextColor(colorStateList);
chip.setOnCheckedChangeListener((group1, checkedId) -> {
List<String> groupFilter = getGroupFilter(chipGroup);
setGroupFilter(groupFilter, true);