Added folder menu dividers

This commit is contained in:
M66B 2021-08-17 22:22:44 +02:00
parent 790054a7d9
commit b646fb6c39
2 changed files with 42 additions and 34 deletions

View File

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

View File

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