diff --git a/app/src/main/java/eu/faircode/email/FragmentOptions.java b/app/src/main/java/eu/faircode/email/FragmentOptions.java index 2629068c4f..c555d3c155 100644 --- a/app/src/main/java/eu/faircode/email/FragmentOptions.java +++ b/app/src/main/java/eu/faircode/email/FragmentOptions.java @@ -49,6 +49,7 @@ import java.io.IOException; import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.appcompat.widget.SwitchCompat; +import androidx.constraintlayout.widget.Group; import static android.app.Activity.RESULT_OK; @@ -79,6 +80,8 @@ public class FragmentOptions extends FragmentEx implements SharedPreferences.OnS private SwitchCompat swUpdates; private SwitchCompat swDebug; + private Group grpNotification; + @Override @Nullable public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { @@ -114,6 +117,8 @@ public class FragmentOptions extends FragmentEx implements SharedPreferences.OnS swUpdates = view.findViewById(R.id.swUpdates); swDebug = view.findViewById(R.id.swDebug); + grpNotification = view.findViewById(R.id.grpNotification); + // Wire controls final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext()); @@ -332,8 +337,7 @@ public class FragmentOptions extends FragmentEx implements SharedPreferences.OnS } }); - swLight.setVisibility(BuildConfig.DEBUG || Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.O ? View.VISIBLE : View.GONE); - btnSound.setVisibility(BuildConfig.DEBUG || Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.O ? View.VISIBLE : View.GONE); + grpNotification.setVisibility(BuildConfig.DEBUG || Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.O ? View.VISIBLE : View.GONE); PreferenceManager.getDefaultSharedPreferences(getContext()).registerOnSharedPreferenceChangeListener(this); diff --git a/app/src/main/res/layout/fragment_options.xml b/app/src/main/res/layout/fragment_options.xml index 4497eebfcd..b7de77dd77 100644 --- a/app/src/main/res/layout/fragment_options.xml +++ b/app/src/main/res/layout/fragment_options.xml @@ -398,5 +398,11 @@ android:text="@string/title_advanced_debug" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/swUpdates" /> + +