<?xml version="1.0" encoding="utf-8"?>
<androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:layout_margin="@dimen/default_margin">

    <TextView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="@string/wifiConnection"
        android:textAppearance="@style/TextAppearance.AppCompat.Headline"
        android:layout_marginBottom="@dimen/default_margin" />

    <TableLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:shrinkColumns="1"
        android:stretchColumns="1" >

        <TableRow>

            <TextView
                android:layout_height="wrap_content"
                android:layout_width="match_parent"
                android:paddingRight="@dimen/default_margin"
                android:text="@string/state"/>

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

                <RadioButton
                    android:id="@+id/rbTriggerWifiConnected"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:checked="true"
                    android:text="@string/connected" />

                <RadioButton
                    android:id="@+id/rbTriggerWifiDisconnected"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:text="@string/disconnected" />

            </RadioGroup>

        </TableRow>

        <TableRow>
            <TextView
                android:id="@+id/tvWifiTriggerNameLocationNotice"
                android:layout_span="2"
                android:layout_height="wrap_content"
                android:layout_width="wrap_content"
                android:textColor="@color/red"
                android:text="@string/locationRequiredToDetermineWifiName"
                android:layout_marginVertical="@dimen/default_margin"
                android:visibility="gone" />

        </TableRow>

        <TableRow>

            <TextView
                android:layout_height="wrap_content"
                android:layout_width="match_parent"
                android:paddingRight="@dimen/default_margin"
                android:text="@string/name"/>

            <EditText
                android:id="@+id/etTriggerWifiName"
                android:layout_height="wrap_content"
                android:layout_width="match_parent" />

        </TableRow>

        <TableRow>

            <TextView />
            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:text="@string/mayUseRegularExpressions"/>

        </TableRow>

        <TableRow>

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

            <Spinner
                android:id="@+id/spinnerWifiList"
                android:enabled="false"
                android:layout_width="match_parent"
                android:layout_height="wrap_content" />

        </TableRow>

    </TableLayout>

    <TextView
        android:id="@+id/tvWifiTriggerDisconnectionHint"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginVertical="@dimen/default_margin"
        android:textColor="@color/red"
        android:text="@string/wifiTriggerDisconnectionHint" />

    <Button
        android:id="@+id/bTriggerWifiSave"
        android:layout_marginTop="@dimen/default_margin"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/save" />

</androidx.appcompat.widget.LinearLayoutCompat>