Added folder menu dividers

pull/204/head
M66B 3 years ago
parent 790054a7d9
commit b646fb6c39

@ -19,6 +19,8 @@ package eu.faircode.email;
Copyright 2018-2021 by Marcel Bokhorst (M66B) Copyright 2018-2021 by Marcel Bokhorst (M66B)
*/ */
import static android.app.Activity.RESULT_OK;
import android.app.Dialog; import android.app.Dialog;
import android.app.NotificationManager; import android.app.NotificationManager;
import android.content.ContentResolver; import android.content.ContentResolver;
@ -49,6 +51,7 @@ import androidx.annotation.Nullable;
import androidx.appcompat.app.AlertDialog; import androidx.appcompat.app.AlertDialog;
import androidx.constraintlayout.widget.Group; import androidx.constraintlayout.widget.Group;
import androidx.core.app.NotificationCompat; import androidx.core.app.NotificationCompat;
import androidx.core.view.MenuCompat;
import androidx.fragment.app.FragmentTransaction; import androidx.fragment.app.FragmentTransaction;
import androidx.lifecycle.Observer; import androidx.lifecycle.Observer;
import androidx.preference.PreferenceManager; import androidx.preference.PreferenceManager;
@ -82,8 +85,6 @@ import javax.mail.MessagingException;
import javax.mail.Session; import javax.mail.Session;
import javax.mail.internet.InternetAddress; import javax.mail.internet.InternetAddress;
import static android.app.Activity.RESULT_OK;
public class FragmentFolders extends FragmentBase { public class FragmentFolders extends FragmentBase {
private ViewGroup view; private ViewGroup view;
private SwipeRefreshLayout swipeRefresh; private SwipeRefreshLayout swipeRefresh;
@ -453,6 +454,7 @@ public class FragmentFolders extends FragmentBase {
@Override @Override
public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) { public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
inflater.inflate(R.menu.menu_folders, menu); inflater.inflate(R.menu.menu_folders, menu);
MenuCompat.setGroupDividerEnabled(menu, true);
super.onCreateOptionsMenu(menu, inflater); super.onCreateOptionsMenu(menu, inflater);
} }

@ -14,42 +14,48 @@
android:title="@string/title_folder_unified" android:title="@string/title_folder_unified"
app:showAsAction="always" /> app:showAsAction="always" />
<item <group android:id="@+id/group_appearance">
android:id="@+id/menu_theme" <item
android:title="@string/title_setup_theme" android:id="@+id/menu_theme"
app:showAsAction="never" /> android:title="@string/title_setup_theme"
app:showAsAction="never" />
<item
android:id="@+id/menu_compact" <item
android:checkable="true" android:id="@+id/menu_compact"
android:title="@string/title_compact" android:checkable="true"
app:showAsAction="never" /> android:title="@string/title_compact"
app:showAsAction="never" />
<item </group>
android:id="@+id/menu_show_hidden"
android:checkable="true" <group android:id="@+id/group_options">
android:title="@string/title_show_folders" <item
app:showAsAction="never" /> android:id="@+id/menu_show_hidden"
android:checkable="true"
<item android:title="@string/title_show_folders"
android:id="@+id/menu_show_flagged" app:showAsAction="never" />
android:checkable="true"
android:title="@string/title_show_flagged" <item
app:showAsAction="never" /> android:id="@+id/menu_show_flagged"
android:checkable="true"
<item android:title="@string/title_show_flagged"
android:id="@+id/menu_subscribed_only" app:showAsAction="never" />
android:checkable="true"
android:title="@string/title_subscribed_only" <item
app:showAsAction="never" /> android:id="@+id/menu_subscribed_only"
android:checkable="true"
<item android:title="@string/title_subscribed_only"
android:id="@+id/menu_apply_all" app:showAsAction="never" />
android:title="@string/title_apply_to_all" </group>
app:showAsAction="never" />
<group android:id="@+id/group_operations">
<item <item
android:id="@+id/menu_force_sync" android:id="@+id/menu_apply_all"
android:title="@string/title_force_sync" android:title="@string/title_apply_to_all"
app:showAsAction="never" /> app:showAsAction="never" />
<item
android:id="@+id/menu_force_sync"
android:title="@string/title_force_sync"
app:showAsAction="never" />
</group>
</menu> </menu>

Loading…
Cancel
Save