diff --git a/app/src/main/java/eu/faircode/email/FragmentOptionsNotifications.java b/app/src/main/java/eu/faircode/email/FragmentOptionsNotifications.java index 7726ab449b..8a9dd99122 100644 --- a/app/src/main/java/eu/faircode/email/FragmentOptionsNotifications.java +++ b/app/src/main/java/eu/faircode/email/FragmentOptionsNotifications.java @@ -75,6 +75,8 @@ public class FragmentOptionsNotifications extends FragmentBase implements Shared private SwitchCompat swLight; private Button btnSound; private SwitchCompat swAlertOnce; + private TextView tvNoGrouping; + private TextView tvNoChannels; private Group grpNotification; @@ -117,6 +119,8 @@ public class FragmentOptionsNotifications extends FragmentBase implements Shared swLight = view.findViewById(R.id.swLight); btnSound = view.findViewById(R.id.btnSound); swAlertOnce = view.findViewById(R.id.swAlertOnce); + tvNoGrouping = view.findViewById(R.id.tvNoGrouping); + tvNoChannels = view.findViewById(R.id.tvNoChannels); grpNotification = view.findViewById(R.id.grpNotification); @@ -295,6 +299,12 @@ public class FragmentOptionsNotifications extends FragmentBase implements Shared swAlertOnce.setVisibility(Log.isXiaomi() || BuildConfig.DEBUG ? View.VISIBLE : View.GONE); grpNotification.setVisibility(Build.VERSION.SDK_INT < Build.VERSION_CODES.O || BuildConfig.DEBUG ? View.VISIBLE : View.GONE); + // https://developer.android.com/training/notify-user/group + tvNoGrouping.setVisibility(Build.VERSION.SDK_INT < Build.VERSION_CODES.N ? View.VISIBLE : View.GONE); + + // https://developer.android.com/training/notify-user/channels + tvNoChannels.setVisibility(Build.VERSION.SDK_INT < Build.VERSION_CODES.O ? View.VISIBLE : View.GONE); + PreferenceManager.getDefaultSharedPreferences(getContext()).registerOnSharedPreferenceChangeListener(this); return view; diff --git a/app/src/main/res/layout/fragment_options_notifications.xml b/app/src/main/res/layout/fragment_options_notifications.xml index 9a37fc60dd..1eba6266d6 100644 --- a/app/src/main/res/layout/fragment_options_notifications.xml +++ b/app/src/main/res/layout/fragment_options_notifications.xml @@ -303,6 +303,32 @@ app:layout_constraintTop_toBottomOf="@id/btnSound" app:switchPadding="12dp" /> + + + + At most three actions will be shown New message notifications will always be removed on being swiped away and on marking messages read Tap on the channel name \'Notifications\' to set the default notification sound, etc + This Android version does not support notification grouping + This Android version does not support notification channels Double \'back\' to exit Biometric authentication timeout