Show remarks about missing notification features

This commit is contained in:
M66B 2019-09-29 17:45:46 +02:00
parent 42b86a7679
commit b1258d9ebc
3 changed files with 38 additions and 0 deletions

View File

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

View File

@ -303,6 +303,32 @@
app:layout_constraintTop_toBottomOf="@id/btnSound"
app:switchPadding="12dp" />
<TextView
android:id="@+id/tvNoGrouping"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:layout_marginEnd="48dp"
android:text="@string/title_advanced_notify_no_grouping"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:textStyle="italic"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/swAlertOnce" />
<TextView
android:id="@+id/tvNoChannels"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="6dp"
android:layout_marginEnd="48dp"
android:text="@string/title_advanced_notify_no_channels"
android:textAppearance="@style/TextAppearance.AppCompat.Small"
android:textStyle="italic"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tvNoGrouping" />
<androidx.constraintlayout.widget.Group
android:id="@+id/grpNotification"
android:layout_width="0dp"

View File

@ -304,6 +304,8 @@
<string name="title_advanced_notify_action_hint">At most three actions will be shown</string>
<string name="title_advanced_notify_remove_hint">New message notifications will always be removed on being swiped away and on marking messages read</string>
<string name="title_advanced_notify_manage_hint">Tap on the channel name \'Notifications\' to set the default notification sound, etc</string>
<string name="title_advanced_notify_no_grouping">This Android version does not support notification grouping</string>
<string name="title_advanced_notify_no_channels">This Android version does not support notification channels</string>
<string name="title_advanced_double_back">Double \'back\' to exit</string>
<string name="title_advanced_biometrics_timeout">Biometric authentication timeout</string>