<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2018 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.
-->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:weightSum="2">
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_weight="1"
        android:orientation="vertical">
        <LinearLayout
            style="@style/SectionContainer"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical">
            <TextView
                style="@style/SectionHeader"
                android:text="@string/section_header_garage_mode_config"/>
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:weightSum="2">
                <Button
                    style="@style/Button"
                    android:id="@+id/enterGarageModeBtn"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:layout_weight="1"
                    android:text="@string/button_enter_garage_mode"/>
                <Button
                    style="@style/Button"
                    android:id="@+id/exitGarageModeBtn"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:layout_weight="1"
                    android:text="@string/button_exit_garage_mode"/>
            </LinearLayout>
        </LinearLayout>
        <LinearLayout
            style="@style/SectionContainer"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical">
            <TextView
                style="@style/SectionHeader"
                android:text="@string/section_header_watchdog"/>
            <ScrollView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:fillViewport="true">
                <TextView
                    android:id="@+id/garageModeWatchdog"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:textSize="18sp"
                    android:text="@string/no_results"/>
            </ScrollView>
        </LinearLayout>
    </LinearLayout>
    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_weight="1"
        android:orientation="vertical">
        <LinearLayout
            style="@style/SectionContainer"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:weightSum="5">
            <TextView
                style="@style/SectionHeader"
                android:layout_weight="1"
                android:text="@string/section_header_job_configuration"/>
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_weight="1">
                <LinearLayout
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:layout_weight="1">
                    <TextView
                        style="@style/SpinnerLabel"
                        android:text="@string/spinner_label_network_type"/>
                    <LinearLayout
                        style="@style/SectionContainer"
                        android:layout_width="wrap_content"
                        android:layout_height="match_parent">
                        <Spinner
                            style="@style/Spinner"
                            android:id="@+id/networkType"/>
                    </LinearLayout>
                </LinearLayout>
                <CheckBox
                    style="@style/Checkbox"
                    android:id="@+id/requirePersistedCheckbox"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:layout_weight="1"
                    android:text="@string/checkbox_require_persisted"/>
            </LinearLayout>
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:weightSum="2">
                <CheckBox
                    style="@style/Checkbox"
                    android:id="@+id/requireIdlenessCheckbox"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:layout_weight="1"
                    android:text="@string/checkbox_require_idleness"/>
                <CheckBox
                    style="@style/Checkbox"
                    android:id="@+id/requireChargingCheckbox"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:layout_weight="1"
                    android:text="@string/checkbox_require_charging"/>
            </LinearLayout>
            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:layout_weight="1"
                android:orientation="horizontal">
                <TextView
                    style="@style/SpinnerLabel"
                    android:text="@string/spinner_label_job_duration"/>
                <LinearLayout
                    style="@style/SectionContainer"
                    android:layout_width="wrap_content"
                    android:layout_height="match_parent">
                    <Spinner
                        style="@style/Spinner"
                        android:id="@+id/jobDuration"/>
                </LinearLayout>
            </LinearLayout>
            <Button
                style="@style/Button"
                android:id="@+id/addJobBtn"
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:text="@string/button_schedule_job"
                android:layout_weight="1"/>
        </LinearLayout>
        <LinearLayout
            style="@style/SectionContainer"
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:orientation="vertical">
            <TextView
                style="@style/SectionHeader"
                android:text="@string/section_header_jobs_list"/>
            <ListView
                android:id="@+id/jobsListView"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_alignParentLeft="true"
                android:layout_alignParentTop="true"
                android:focusable="false"/>
        </LinearLayout>
    </LinearLayout>
</LinearLayout>