Fixed double separator advanced options

pull/147/head
M66B 6 years ago
parent e0a8e43381
commit dd97f7c6f8

@ -49,6 +49,7 @@ import java.io.IOException;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
import androidx.appcompat.widget.SwitchCompat; import androidx.appcompat.widget.SwitchCompat;
import androidx.constraintlayout.widget.Group;
import static android.app.Activity.RESULT_OK; import static android.app.Activity.RESULT_OK;
@ -79,6 +80,8 @@ public class FragmentOptions extends FragmentEx implements SharedPreferences.OnS
private SwitchCompat swUpdates; private SwitchCompat swUpdates;
private SwitchCompat swDebug; private SwitchCompat swDebug;
private Group grpNotification;
@Override @Override
@Nullable @Nullable
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) { 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); swUpdates = view.findViewById(R.id.swUpdates);
swDebug = view.findViewById(R.id.swDebug); swDebug = view.findViewById(R.id.swDebug);
grpNotification = view.findViewById(R.id.grpNotification);
// Wire controls // Wire controls
final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getContext()); 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); grpNotification.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);
PreferenceManager.getDefaultSharedPreferences(getContext()).registerOnSharedPreferenceChangeListener(this); PreferenceManager.getDefaultSharedPreferences(getContext()).registerOnSharedPreferenceChangeListener(this);

@ -398,5 +398,11 @@
android:text="@string/title_advanced_debug" android:text="@string/title_advanced_debug"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/swUpdates" /> app:layout_constraintTop_toBottomOf="@id/swUpdates" />
<androidx.constraintlayout.widget.Group
android:id="@+id/grpNotification"
android:layout_width="0dp"
android:layout_height="0dp"
app:constraint_referenced_ids="vSeparator3,swLight,btnSound" />
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView> </ScrollView>

Loading…
Cancel
Save