SDPTeam15/PolyEvents

View on GitHub
app/src/main/res/layout/fragment_settings.xml

Summary

Maintainability
Test Coverage
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/id_fragment_settings"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".view.fragments.SettingsFragment">

    <TextView
        android:id="@+id/fragment_settings_title_text_view"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="16dp"
        android:text="@string/settings"
        android:textSize="32sp"
        android:textStyle="bold"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <TextView
        android:id="@+id/fragment_settings_is_sending_location_text_view"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="16dp"
        android:text="@string/send_location"
        android:textStyle="bold"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/fragment_settings_title_text_view" />

    <TextView
        android:id="@+id/fragment_settings_is_sending_location_description_text_view"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="16dp"
        android:layout_marginTop="8dp"
        android:layout_marginEnd="16dp"
        android:layout_marginBottom="16dp"
        android:text="@string/send_location_description"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/fragment_settings_is_sending_location_text_view" />

    <com.google.android.material.switchmaterial.SwitchMaterial
        android:id="@+id/fragment_settings_is_sending_location_switch"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginEnd="16dp"
        android:checked="true"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toBottomOf="@id/fragment_settings_title_text_view" />

    <TextView
        android:id="@+id/fragment_settings_track_location_text_view"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="16dp"
        android:text="@string/track_location"
        android:textStyle="bold"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/fragment_settings_is_sending_location_description_text_view" />

    <TextView
        android:id="@+id/fragment_settings_track_location_description_text_view"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginStart="16dp"
        android:layout_marginTop="8dp"
        android:layout_marginEnd="16dp"
        android:layout_marginBottom="16dp"
        android:text="@string/track_location_description"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@id/fragment_settings_track_location_text_view" />

    <com.google.android.material.switchmaterial.SwitchMaterial
        android:id="@+id/fragment_settings_track_location_switch"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginEnd="16dp"
        android:checked="true"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintTop_toBottomOf="@id/fragment_settings_is_sending_location_description_text_view" />

    <Button
        android:id="@+id/fragment_settings_button_reset_settings"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="16dp"
        android:enabled="false"
        android:text="@string/reset_to_defaults"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toStartOf="@id/fragment_settings_button_save"
        app:layout_constraintStart_toStartOf="parent" />

    <Button
        android:id="@+id/fragment_settings_button_save"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_margin="16dp"
        android:enabled="false"
        android:text="@string/EditProfileActivity_Save"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toEndOf="@id/fragment_settings_button_reset_settings" />


</androidx.constraintlayout.widget.ConstraintLayout>