<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical">

    <androidx.cardview.widget.CardView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="5dp"
        android:layout_marginBottom="5dp">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:padding="16dp">

            <TextView
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:text="@string/hr_settings_zones_calculation_method" />

            <Spinner
                android:id="@+id/calculation_method_spinner"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content" />
        </LinearLayout>
    </androidx.cardview.widget.CardView>

    <androidx.cardview.widget.CardView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="5dp"
        android:layout_marginBottom="5dp">

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

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

                <TextView
                    android:id="@+id/zones_max_hr_title"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:text="@string/hr_settings_zones_max_hr" />

                <TextView
                    android:id="@+id/zones_max_hr"
                    android:gravity="end"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content" />

            </LinearLayout>

            <LinearLayout
                android:id="@+id/layout_zones_resting_hr"
                android:layout_width="match_parent"
                android:layout_height="wrap_content">

                <TextView
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:text="@string/hr_settings_zones_resting_hr" />

                <TextView
                    android:id="@+id/zones_resting_hr"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:gravity="end" />

            </LinearLayout>
        </LinearLayout>
    </androidx.cardview.widget.CardView>


    <androidx.cardview.widget.CardView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginTop="5dp"
        android:layout_marginBottom="5dp">

        <androidx.constraintlayout.widget.ConstraintLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="5dp"
            android:orientation="vertical"
            android:padding="16dp">

            <TextView
                android:id="@+id/hr_zone_title"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="5dp"
                android:gravity="center"
                android:minHeight="10dp"
                android:text="Zone"
                android:textColor="#777777"
                android:textSize="15sp"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent" />

            <TextView
                android:id="@+id/hr_value_title"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginEnd="5sp"
                android:gravity="center"
                android:minWidth="100dp"
                android:minHeight="15dp"
                android:text="@string/heart_rate"
                android:textColor="#777777"
                android:textSize="15sp"
                app:layout_constraintEnd_toStartOf="@+id/hr_percentage_title"
                app:layout_constraintTop_toTopOf="parent" />

            <TextView
                android:id="@+id/hr_percentage_title"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:gravity="center"
                android:minWidth="100dp"
                android:minHeight="15dp"
                android:text="%"
                android:textColor="#777777"
                android:textSize="15sp"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintTop_toTopOf="parent" />

            <RelativeLayout
                android:id="@+id/layout_hr_zone_5"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_toStartOf="@+id/heart_rate_zone_5_divider"
                app:layout_constraintBottom_toTopOf="@+id/layout_hr_zone_4"
                app:layout_constraintEnd_toStartOf="@+id/heart_rate_zone_5_divider"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="@+id/layout_hr_zone_values">

                <TextView
                    android:id="@+id/tv_heart_rate_zone_5"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Zone 5" />
            </RelativeLayout>

            <RelativeLayout
                android:id="@+id/layout_hr_zone_4"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_toStartOf="@+id/heart_rate_zone_4_divider"
                app:layout_constraintBottom_toTopOf="@+id/layout_hr_zone_3"
                app:layout_constraintEnd_toStartOf="@+id/heart_rate_zone_4_divider"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/layout_hr_zone_5">

                <TextView
                    android:id="@+id/tv_heart_rate_zone_4"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Zone 4" />
            </RelativeLayout>

            <RelativeLayout
                android:id="@+id/layout_hr_zone_3"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_toStartOf="@+id/heart_rate_zone_3_divider"
                app:layout_constraintBottom_toTopOf="@+id/layout_hr_zone_2"
                app:layout_constraintEnd_toStartOf="@+id/heart_rate_zone_3_divider"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/layout_hr_zone_4">

                <TextView
                    android:id="@+id/tv_heart_rate_zone_3"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Zone 3" />
            </RelativeLayout>

            <RelativeLayout
                android:id="@+id/layout_hr_zone_2"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_toStartOf="@+id/heart_rate_zone_2_divider"
                app:layout_constraintBottom_toTopOf="@+id/layout_hr_zone_1"
                app:layout_constraintEnd_toStartOf="@+id/heart_rate_zone_2_divider"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/layout_hr_zone_3">

                <TextView
                    android:id="@+id/tv_heart_rate_zone_2"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Zone 2" />
            </RelativeLayout>

            <RelativeLayout
                android:id="@+id/layout_hr_zone_1"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_toStartOf="@+id/heart_rate_zone_1_divider"
                app:layout_constraintBottom_toBottomOf="@+id/layout_hr_zone_values"
                app:layout_constraintEnd_toStartOf="@+id/heart_rate_zone_1_divider"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/layout_hr_zone_2">

                <TextView
                    android:id="@+id/tv_heart_rate_zone_1"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Zone 1" />
            </RelativeLayout>

            <nodomain.freeyourgadget.gadgetbridge.activities.heartratezones.HeartRateZonesDividerView
                android:id="@+id/heart_rate_zone_5_divider"
                android:layout_width="0dp"
                android:layout_height="0dp"
                android:layout_marginStart="6dp"
                android:layout_marginTop="25dp"
                android:layout_marginBottom="5dp"
                app:layout_constraintBottom_toTopOf="@+id/heart_rate_zone_4_divider"
                app:layout_constraintEnd_toStartOf="@+id/layout_hr_zone_values"
                app:layout_constraintStart_toEndOf="@+id/layout_hr_zone_5"
                app:layout_constraintTop_toTopOf="@+id/layout_hr_zone_values" />

            <nodomain.freeyourgadget.gadgetbridge.activities.heartratezones.HeartRateZonesDividerView
                android:id="@+id/heart_rate_zone_4_divider"
                android:layout_width="0dp"
                android:layout_height="0dp"
                android:layout_marginStart="6dp"
                android:layout_marginTop="5dp"
                android:layout_marginBottom="5dp"
                app:layout_constraintBottom_toTopOf="@+id/heart_rate_zone_3_divider"
                app:layout_constraintEnd_toStartOf="@+id/layout_hr_zone_values"
                app:layout_constraintStart_toEndOf="@+id/layout_hr_zone_4"
                app:layout_constraintTop_toBottomOf="@+id/heart_rate_zone_5_divider" />

            <nodomain.freeyourgadget.gadgetbridge.activities.heartratezones.HeartRateZonesDividerView
                android:id="@+id/heart_rate_zone_3_divider"
                android:layout_width="0dp"
                android:layout_height="0dp"
                android:layout_marginStart="6dp"
                android:layout_marginTop="5dp"
                android:layout_marginBottom="5dp"
                app:layout_constraintBottom_toTopOf="@+id/heart_rate_zone_2_divider"
                app:layout_constraintEnd_toStartOf="@+id/layout_hr_zone_values"
                app:layout_constraintStart_toEndOf="@+id/layout_hr_zone_3"
                app:layout_constraintTop_toBottomOf="@+id/heart_rate_zone_4_divider" />

            <nodomain.freeyourgadget.gadgetbridge.activities.heartratezones.HeartRateZonesDividerView
                android:id="@+id/heart_rate_zone_2_divider"
                android:layout_width="0dp"
                android:layout_height="0dp"
                android:layout_marginStart="6dp"
                android:layout_marginTop="5dp"
                android:layout_marginBottom="5dp"
                app:layout_constraintBottom_toTopOf="@+id/heart_rate_zone_1_divider"
                app:layout_constraintEnd_toStartOf="@+id/layout_hr_zone_values"
                app:layout_constraintStart_toEndOf="@+id/layout_hr_zone_2"
                app:layout_constraintTop_toBottomOf="@+id/heart_rate_zone_3_divider" />

            <nodomain.freeyourgadget.gadgetbridge.activities.heartratezones.HeartRateZonesDividerView
                android:id="@+id/heart_rate_zone_1_divider"
                android:layout_width="0dp"
                android:layout_height="0dp"
                android:layout_marginStart="6dp"
                android:layout_marginTop="5dp"
                android:layout_marginBottom="25dp"
                app:layout_constraintBottom_toBottomOf="@+id/layout_hr_zone_values"
                app:layout_constraintEnd_toStartOf="@+id/layout_hr_zone_values"
                app:layout_constraintStart_toEndOf="@+id/layout_hr_zone_1"
                app:layout_constraintTop_toBottomOf="@+id/heart_rate_zone_2_divider" />

            <LinearLayout
                android:id="@+id/layout_hr_zone_values"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginTop="6dp"
                android:layout_marginEnd="6dp"
                android:orientation="vertical"
                app:layout_constraintEnd_toStartOf="@+id/hr_percentage_title"
                app:layout_constraintStart_toStartOf="@+id/hr_value_title"
                app:layout_constraintTop_toBottomOf="@+id/hr_percentage_title">

                <TextView
                    android:id="@+id/heart_rate_zone_max_value"
                    android:layout_width="match_parent"
                    android:layout_height="35dp"
                    android:gravity="center"
                    android:text="@string/n_a" />

                <TextView
                    android:id="@+id/heart_rate_zone_5_value"
                    android:layout_width="match_parent"
                    android:layout_height="35dp"
                    android:layout_marginTop="28dp"
                    android:gravity="center"
                    android:text="@string/n_a" />

                <TextView
                    android:id="@+id/heart_rate_zone_4_value"
                    android:layout_width="match_parent"
                    android:layout_height="35dp"
                    android:layout_marginTop="28dp"
                    android:gravity="center"
                    android:text="@string/n_a" />

                <TextView
                    android:id="@+id/heart_rate_zone_3_value"
                    android:layout_width="match_parent"
                    android:layout_height="35dp"
                    android:layout_marginTop="28dp"
                    android:gravity="center"
                    android:text="@string/n_a" />

                <TextView
                    android:id="@+id/heart_rate_zone_2_value"
                    android:layout_width="match_parent"
                    android:layout_height="35dp"
                    android:layout_marginTop="28dp"
                    android:gravity="center"
                    android:text="@string/n_a" />

                <TextView
                    android:id="@+id/heart_rate_zone_1_value"
                    android:layout_width="match_parent"
                    android:layout_height="35dp"
                    android:layout_marginTop="28dp"
                    android:gravity="center"
                    android:text="@string/n_a" />
            </LinearLayout>

            <LinearLayout
                android:id="@+id/layout_pace_range_percentage"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginTop="5sp"
                android:layout_marginEnd="6sp"
                android:orientation="vertical"
                app:layout_constraintEnd_toEndOf="@+id/hr_percentage_title"
                app:layout_constraintStart_toStartOf="@+id/hr_percentage_title"
                app:layout_constraintTop_toBottomOf="@+id/hr_percentage_title">

                <TextView
                    android:id="@+id/heart_rate_zone_max_percent"
                    android:layout_width="match_parent"
                    android:layout_height="35dp"
                    android:gravity="center"
                    android:text="@string/n_a" />

                <TextView
                    android:id="@+id/heart_rate_zone_5_percent"
                    android:layout_width="match_parent"
                    android:layout_height="35dp"
                    android:layout_marginTop="28dp"
                    android:gravity="center"
                    android:text="@string/n_a" />

                <TextView
                    android:id="@+id/heart_rate_zone_4_percent"
                    android:layout_width="match_parent"
                    android:layout_height="35dp"
                    android:layout_marginTop="28dp"
                    android:gravity="center"
                    android:text="@string/n_a" />

                <TextView
                    android:id="@+id/heart_rate_zone_3_percent"
                    android:layout_width="match_parent"
                    android:layout_height="35dp"
                    android:layout_marginTop="28dp"
                    android:gravity="center"
                    android:text="@string/n_a" />

                <TextView
                    android:id="@+id/heart_rate_zone_2_percent"
                    android:layout_width="match_parent"
                    android:layout_height="35dp"
                    android:layout_marginTop="28dp"
                    android:gravity="center"
                    android:text="@string/n_a" />

                <TextView
                    android:id="@+id/heart_rate_zone_1_percent"
                    android:layout_width="match_parent"
                    android:layout_height="35dp"
                    android:layout_marginTop="28dp"
                    android:gravity="center"
                    android:text="@string/n_a" />
            </LinearLayout>
        </androidx.constraintlayout.widget.ConstraintLayout>
    </androidx.cardview.widget.CardView>
</LinearLayout>
