diff --git a/FAQ.md b/FAQ.md index b801611774..ae91404a7b 100644 --- a/FAQ.md +++ b/FAQ.md @@ -1297,6 +1297,9 @@ There are shortcuts available to compose a new message to a favorite contact. Shortcuts require Android 7.1 Nougat or later. The usage of shortcuts is explained [here](https://support.google.com/android/answer/2781850). +It is also possible to create shortcuts to folders +by long pressing a folder in the folder list of an account and selecting *Add shortcut*. +
diff --git a/app/src/main/java/eu/faircode/email/AdapterFolder.java b/app/src/main/java/eu/faircode/email/AdapterFolder.java index 48bd450536..ab0265e940 100644 --- a/app/src/main/java/eu/faircode/email/AdapterFolder.java +++ b/app/src/main/java/eu/faircode/email/AdapterFolder.java @@ -28,8 +28,11 @@ import android.content.DialogInterface; import android.content.Intent; import android.content.SharedPreferences; import android.content.res.ColorStateList; +import android.graphics.Bitmap; +import android.graphics.Canvas; import android.graphics.Color; import android.graphics.Typeface; +import android.graphics.drawable.Drawable; import android.os.Build; import android.os.Bundle; import android.provider.Settings; @@ -56,6 +59,9 @@ import androidx.annotation.RequiresApi; import androidx.appcompat.app.AlertDialog; import androidx.appcompat.widget.PopupMenu; import androidx.constraintlayout.widget.Group; +import androidx.core.content.pm.ShortcutInfoCompat; +import androidx.core.content.pm.ShortcutManagerCompat; +import androidx.core.graphics.drawable.IconCompat; import androidx.fragment.app.Fragment; import androidx.lifecycle.Lifecycle; import androidx.lifecycle.LifecycleObserver; @@ -568,6 +574,9 @@ public class AdapterFolder extends RecyclerView.Adapter