<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2022 The Android Open Source Project
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~      http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
                xmlns:tools="http://schemas.android.com/tools"
                android:fitsSystemWindows="@bool/fit_system_windows"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:keepScreenOn="true"
                android:orientation="vertical"
                style="@style/RootLayoutPadding"
                tools:ignore="Autofill">

    <ScrollView
        android:layout_width="fill_parent"
        android:layout_height="wrap_content">

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

        <TextView
            android:text="@string/ble_rssi_precision_test_instructions"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:scrollbars="vertical" />

        <CheckBox
            android:id="@+id/is_reference_device"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/is_reference_device_checkbox_text"/>

        <LinearLayout
            android:id="@+id/dut_mode_layout"
            android:orientation="vertical"
            android:layout_width="match_parent"
            android:layout_height="wrap_content">

            <CheckBox
                android:id="@+id/is_manual_pass"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/is_manual_pass_text"/>

            <Button
                android:id="@+id/start_test"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/start_test_presence"/>

            <Button
                android:id="@+id/stop_test"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/stop_test_presence"/>

            <TextView
                android:id="@+id/device_found_info"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/device_found_presence"/>

            <EditText
                android:id="@+id/ref_device_id_input"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:inputType="number"
                android:hint="@string/reference_device_id_input_presence"/>
        </LinearLayout>

        <LinearLayout
            android:id="@+id/ref_mode_layout"
            android:orientation="vertical"
            android:layout_width="match_parent"
            android:layout_height="wrap_content">

            <Button
                android:id="@+id/start_advertising"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/start_advertising_presence"/>

            <Button
                android:id="@+id/stop_advertising"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/stop_advertising_presence"/>

            <TextView
                android:id="@+id/device_id_info"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="@string/device_id_info_presence"/>
        </LinearLayout>

        <include
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            layout="@layout/pass_fail_buttons" />

        </LinearLayout>
    </ScrollView>
</RelativeLayout>