<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent" android:layout_height="match_parent"
    android:orientation="vertical">
    <ScrollView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="center_vertical"
        android:gravity="center_vertical"
        android:fillViewport="true">
        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical">
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:id="@+id/ll_set_order"
                android:orientation="vertical">
                <TextView
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="@dimen/activity_vertical_margin"
                    android:layout_marginStart="@dimen/activity_horizontal_margin"
                    android:textStyle="bold"
                    android:textSize="@dimen/largeTextSize"
                    android:text="@string/set_parents_order" />

                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginStart="@dimen/activity_horizontal_margin"
                    android:layout_marginEnd="@dimen/activity_horizontal_margin"
                    android:layout_gravity="center_vertical"
                    android:gravity="center_vertical"
                    android:orientation="horizontal">
                    <!--manual or automatic-->
                    <RadioGroup
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:orientation="horizontal"
                        android:id="@+id/radioGroup">
                        <RadioButton
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:text="@string/automatic"
                            android:id="@+id/radio_automatic"
                            android:checked="true"/>

                        <RadioButton
                            android:layout_width="wrap_content"
                            android:layout_height="wrap_content"
                            android:text="@string/manual"
                            android:id="@+id/radio_manual" />
                    </RadioGroup>
                    <!-- button to set the order -->
                    <Button
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="@string/set_order"
                        android:id="@+id/btn_set_order"
                        android:visibility="invisible"
                        android:layout_marginStart="@dimen/activity_horizontal_margin"
                        android:layout_marginEnd="@dimen/activity_horizontal_margin"
                        android:layout_marginTop="@dimen/activity_vertical_margin"
                        android:layout_marginBottom="@dimen/activity_vertical_margin"
                        android:layout_gravity="center_vertical"/>

                </LinearLayout>
            </LinearLayout>
            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:id="@+id/background_location_access_gui1"
                android:layout_marginTop="@dimen/activity_vertical_margin"
                android:layout_marginStart="@dimen/activity_horizontal_margin"
                android:textStyle="bold"
                android:textSize="@dimen/largeTextSize"
                android:visibility="gone"
                android:text="@string/background_location_access" />

            <RelativeLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:id="@+id/background_location_access_gui2"
                android:visibility="gone"
                android:layout_marginStart="@dimen/activity_horizontal_margin">
                <TextView
                    android:layout_width="250dp"
                    android:layout_height="wrap_content"
                    android:id="@+id/background_access_status"
                    android:layout_centerVertical="true"
                    android:text="@string/allowed"
                    android:textSize="@dimen/mediumTextSize"
                    android:layout_alignParentStart="true" />

                <Button
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="@dimen/activity_vertical_margin"
                    android:text="@string/change"
                    android:id="@+id/btn_background_access"
                    android:layout_toEndOf="@+id/background_access_status" />
            </RelativeLayout>
            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="@dimen/activity_vertical_margin"
                android:layout_marginStart="@dimen/activity_horizontal_margin"
                android:textStyle="bold"
                android:textSize="@dimen/largeTextSize"
                android:text="@string/afternoon_time" />

            <RelativeLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginStart="@dimen/activity_horizontal_margin">
                <TextView
                    android:layout_width="250dp"
                    android:layout_height="wrap_content"
                    android:id="@+id/in_time"
                    android:layout_centerVertical="true"
                    android:text="@string/_12_00_pm"
                    android:textSize="@dimen/mediumTextSize"
                    android:layout_alignParentStart="true" />

                <Button
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="@dimen/activity_vertical_margin"
                    android:text="@string/set_time"
                    android:id="@+id/btn_time"
                    android:layout_toEndOf="@+id/in_time" />
            </RelativeLayout>

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="@dimen/activity_vertical_margin"
                android:layout_marginStart="@dimen/activity_horizontal_margin"
                android:textStyle="bold"
                android:textSize="@dimen/largeTextSize"
                android:text="@string/last_drop_off_point_in_afternoon" />

            <Spinner
                android:id="@+id/spinner_last_afternoon"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginStart="@dimen/activity_horizontal_margin"
                android:layout_marginEnd="@dimen/activity_horizontal_margin"
                android:background="@android:drawable/btn_dropdown"
                android:spinnerMode="dropdown"/>
        </LinearLayout>
    </ScrollView>
</LinearLayout>
