mirror of
https://github.com/beemdevelopment/Aegis.git
synced 2025-05-16 23:12:51 +00:00
Changed the Chip to match the background in Amoled and Dark Mode
This commit is contained in:
parent
a9d850aa01
commit
385475aa8b
3 changed files with 8 additions and 5 deletions
|
@ -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);
|
||||
|
|
5
app/src/main/res/layout/chip_material.xml
Normal file
5
app/src/main/res/layout/chip_material.xml
Normal file
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<com.google.android.material.chip.Chip xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
style="@style/Widget.MaterialComponents.Chip.Choice"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
|
@ -37,7 +37,8 @@
|
|||
|
||||
<com.google.android.material.chip.ChipGroup
|
||||
android:id="@+id/groupChipGroup"
|
||||
android:paddingLeft="8dp"
|
||||
android:paddingStart="8dp"
|
||||
android:paddingEnd="8dp"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
</com.google.android.material.chip.ChipGroup>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue