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;