<?xml version="1.0" encoding="utf-8"?>
<ScrollView 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"
    style="@style/StyleDialog"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:focusableInTouchMode="true"
    tools:context=".dialogs.CalibrationDialog">

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

        <RelativeLayout
            style="@style/StyleDialogHeader"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_gravity="center">

            <ImageView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:importantForAccessibility="no"
                app:srcCompat="@drawable/ic_calibration" />

            <TextView
                android:id="@+id/title"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_centerInParent="true"
                android:layout_gravity="center"
                android:layout_marginStart="10dp"
                android:layout_marginEnd="10dp"
                android:text="@string/calibration"
                android:textAlignment="center"
                android:textAppearance="?android:attr/textAppearanceLarge" />

        </RelativeLayout>

        <LinearLayout
            android:id="@+id/spacer"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            android:padding="5dp" />

        <LinearLayout
            android:id="@+id/bg_layout"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="horizontal"
            android:paddingTop="10dp">

            <TextView
                android:id="@+id/bg_label"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center_horizontal"
                android:width="120dp"
                android:padding="10dp"
                android:text="@string/bg_label"
                android:textAppearance="@style/TextAppearance.AppCompat.Small"
                android:textStyle="bold" />

            <info.nightscout.core.ui.elements.NumberPicker
                android:id="@+id/bg"
                android:layout_width="130dp"
                android:layout_height="40dp"
                app:customContentDescription="@string/bg_label" />

            <TextView
                android:id="@+id/units"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center_vertical"
                android:gravity="start"
                android:minWidth="45dp"
                android:paddingStart="5dp"
                android:paddingEnd="5dp"
                android:text="@string/mgdl"
                android:textAppearance="?android:attr/textAppearanceSmall" />

        </LinearLayout>

        <include
            android:id="@+id/okcancel"
            layout="@layout/okcancel" />

    </LinearLayout>

</ScrollView>