From af2b8df97bc9ffc8805d492a9a6231e30213930e Mon Sep 17 00:00:00 2001 From: M66B Date: Tue, 17 Aug 2021 22:28:39 +0200 Subject: [PATCH] Added rules menu dividers --- .../java/eu/faircode/email/FragmentRules.java | 3 ++ app/src/main/res/menu/menu_rules.xml | 36 ++++++++++--------- 2 files changed, 23 insertions(+), 16 deletions(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentRules.java b/app/src/main/java/eu/faircode/email/FragmentRules.java index 1bc4c66c07..237bc31bd7 100644 --- a/app/src/main/java/eu/faircode/email/FragmentRules.java +++ b/app/src/main/java/eu/faircode/email/FragmentRules.java @@ -41,6 +41,7 @@ import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.appcompat.widget.SearchView; import androidx.constraintlayout.widget.Group; +import androidx.core.view.MenuCompat; import androidx.fragment.app.FragmentTransaction; import androidx.lifecycle.Observer; import androidx.preference.PreferenceManager; @@ -243,6 +244,8 @@ public class FragmentRules extends FragmentBase { } }); + MenuCompat.setGroupDividerEnabled(menu, true); + super.onCreateOptionsMenu(menu, inflater); } diff --git a/app/src/main/res/menu/menu_rules.xml b/app/src/main/res/menu/menu_rules.xml index 9a0bd4e0c2..88108a5e9f 100644 --- a/app/src/main/res/menu/menu_rules.xml +++ b/app/src/main/res/menu/menu_rules.xml @@ -8,23 +8,27 @@ app:actionViewClass="androidx.appcompat.widget.SearchView" app:showAsAction="collapseActionView|always" /> - + + - + + - + + - + +