<?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:layout_width="match_parent"
    android:layout_height="match_parent"
    android:padding="32dp"
    tools:context=".PopupSettingsFragment">

    <TextView
        android:id="@+id/description"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:text="@string/popup_settings_description"
        android:textSize="16sp"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toEndOf="parent" />

    <CheckBox
        android:id="@+id/popupEnabledCheckbox"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:text="@string/popup_enabled"
        android:textSize="14sp"
        android:layout_marginTop="16dp"
        app:layout_constraintTop_toBottomOf="@id/description"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toStartOf="@id/popupPreview" />

    <Button
        android:id="@+id/popupPreview"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/test"
        app:layout_constraintTop_toTopOf="@id/popupEnabledCheckbox"
        app:layout_constraintBottom_toBottomOf="@id/popupEnabledCheckbox"
        app:layout_constraintEnd_toEndOf="parent"
        android:layout_marginStart="8dp" />

    <ScrollView
        android:id="@+id/scrollView"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_marginTop="16dp"
        app:layout_constraintTop_toBottomOf="@id/popupEnabledCheckbox"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toEndOf="parent">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical">

            <com.google.android.material.slider.Slider
                android:id="@+id/redirectionDelay"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:stepSize="0.5"
                android:valueFrom="2"
                android:valueTo="4"
                android:layout_marginTop="8dp"
                android:contentDescription="@string/redirection_delay_description" />

            <TextView
                android:id="@+id/delayDescription"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:text="@string/redirection_delay_description"
                android:textSize="12sp"
                android:layout_marginTop="4dp" />

            <com.google.android.material.slider.Slider
                android:id="@+id/popupHeightSlider"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:valueFrom="0"
                android:valueTo="100"
                android:stepSize="1"
                android:layout_marginTop="16dp"
                android:contentDescription="@string/popup_position" />

            <TextView
                android:id="@+id/heightDescription"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:text="@string/popup_position"
                android:textSize="12sp"
                android:layout_marginTop="4dp" />

            <View
                android:layout_width="match_parent"
                android:layout_height="1dp"
                android:layout_marginVertical="16dp"
                android:background="?android:attr/listDivider" />

            <androidx.recyclerview.widget.RecyclerView
                android:id="@+id/serviceRecycler"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:scrollbars="vertical"
                android:layout_marginTop="8dp" />
        </LinearLayout>
    </ScrollView>
</androidx.constraintlayout.widget.ConstraintLayout>
