Merge pull request #816 from Hacker437/Chip

Changed the Chip to match the background in Amoled and Dark Mode
pull/831/head
Alexander Bakker 4 years ago committed by GitHub
commit 6967e42ab5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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);

@ -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…
Cancel
Save