Added rules menu dividers

This commit is contained in:
M66B 2021-08-17 22:28:39 +02:00
parent b646fb6c39
commit af2b8df97b
2 changed files with 23 additions and 16 deletions

View File

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

View File

@ -8,23 +8,27 @@
app:actionViewClass="androidx.appcompat.widget.SearchView"
app:showAsAction="collapseActionView|always" />
<item
android:id="@+id/menu_export"
android:title="@string/title_rules_export"
app:showAsAction="never" />
<group android:id="@+id/group_backup">
<item
android:id="@+id/menu_export"
android:title="@string/title_rules_export"
app:showAsAction="never" />
<item
android:id="@+id/menu_import"
android:title="@string/title_rules_import"
app:showAsAction="never" />
<item
android:id="@+id/menu_import"
android:title="@string/title_rules_import"
app:showAsAction="never" />
</group>
<item
android:id="@+id/menu_delete_all"
android:title="@string/title_rules_delete_all"
app:showAsAction="never" />
<group android:id="@+id/group_operations">
<item
android:id="@+id/menu_delete_all"
android:title="@string/title_rules_delete_all"
app:showAsAction="never" />
<item
android:id="@+id/menu_delete_junk"
android:title="@string/title_rules_delete_junk"
app:showAsAction="never" />
<item
android:id="@+id/menu_delete_junk"
android:title="@string/title_rules_delete_junk"
app:showAsAction="never" />
</group>
</menu>