<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/container"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_margin="@dimen/fab_margin"
    android:fitsSystemWindows="true"
    android:orientation="vertical"
    tools:context=".activities.ProxyActivity">

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

        <androidx.appcompat.widget.SwitchCompat
            android:id="@+id/enable_proxy"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:checked="false"
            android:text="@string/proxy_enable"
            android:textSize="16sp" />

        <Spinner
            android:id="@+id/type"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center_vertical"
            android:textSize="16sp" />
    </LinearLayout>

    <androidx.appcompat.widget.LinearLayoutCompat
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal">

        <com.google.android.material.textfield.TextInputLayout
            android:id="@+id/host_layout"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginEnd="5dp"
            android:layout_weight="3">

            <com.google.android.material.textfield.MaterialAutoCompleteTextView
                android:id="@+id/host"
                style="@style/Widget.MaterialComponents.TextInputEditText.FilledBox"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:dropDownAnchor="@id/login_instance_layout"
                android:hint="@string/poxy_host"
                android:imeOptions="actionNext"
                android:inputType="textUri"
                android:singleLine="true" />
        </com.google.android.material.textfield.TextInputLayout>

        <com.google.android.material.textfield.TextInputLayout
            android:id="@+id/port_layout"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginStart="5dp"
            android:layout_weight="1">

            <com.google.android.material.textfield.MaterialAutoCompleteTextView
                android:id="@+id/port"
                style="@style/Widget.MaterialComponents.TextInputEditText.FilledBox"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:dropDownAnchor="@id/login_instance_layout"
                android:hint="@string/poxy_port"
                android:imeOptions="actionNext"
                android:inputType="number"
                android:singleLine="true" />
        </com.google.android.material.textfield.TextInputLayout>
    </androidx.appcompat.widget.LinearLayoutCompat>


    <com.google.android.material.textfield.TextInputLayout
        android:id="@+id/proxy_login_layout"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginVertical="10dp">

        <com.google.android.material.textfield.MaterialAutoCompleteTextView
            android:id="@+id/proxy_login"
            style="@style/Widget.MaterialComponents.TextInputEditText.FilledBox"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:dropDownAnchor="@id/login_instance_layout"
            android:hint="@string/poxy_login"
            android:imeOptions="actionNext"
            android:singleLine="true" />
    </com.google.android.material.textfield.TextInputLayout>


    <com.google.android.material.textfield.TextInputLayout
        android:id="@+id/proxy_password_layout"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <com.google.android.material.textfield.MaterialAutoCompleteTextView
            android:id="@+id/proxy_password"
            style="@style/Widget.MaterialComponents.TextInputEditText.FilledBox"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:dropDownAnchor="@id/login_instance_layout"
            android:hint="@string/poxy_password"
            android:imeOptions="actionNext"
            android:inputType="textPassword"
            android:singleLine="true" />
    </com.google.android.material.textfield.TextInputLayout>


    <com.google.android.material.button.MaterialButton
        android:id="@+id/set_proxy_save"
        style="@style/MyButtonColored"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:layout_marginTop="10dp"
        android:gravity="center"
        android:maxWidth="150dp"
        android:text="@string/set_save_changes"
        android:textSize="18sp" />
</LinearLayout>