<?xml version="1.0" encoding="utf-8"?><!--
  ~ Copyright (c) 2012-2016 Arne Schwabe
  ~ Distributed under the GNU GPL v2 with additional terms. For full terms see the file doc/LICENSE.txt
  -->

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:card_view="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_margin="@dimen/stdpadding">
    <!-- A CardView that contains a TextView -->
    <android.support.v7.widget.CardView
        android:id="@+id/card_view"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        card_view:cardCornerRadius="10dp">


        <RelativeLayout
            xmlns:android="http://schemas.android.com/apk/res/android"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:animateLayoutChanges="true"
            android:padding="5dp">


            <TextView
                android:id="@+id/port_label"
                style="@style/item"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentEnd="true"
                android:layout_alignParentRight="true"
                android:text="@string/port"
                android:textAppearance="?android:attr/textAppearanceSmall" />


            <TextView
                android:layout_toLeftOf="@id/port_label"
                android:layout_toStartOf="@id/port_label"
                android:id="@+id/server_label"
                style="@style/item"
                android:text="@string/address"
                android:textAppearance="?android:attr/textAppearanceSmall" />


            <EditText
                android:id="@+id/portnumber"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentEnd="true"
                android:layout_alignParentRight="true"

                android:layout_below="@id/port_label"
                android:inputType="numberDecimal"
                android:text="1194"
                android:textAppearance="@android:style/TextAppearance.DeviceDefault.Medium"
                tools:ignore="HardcodedText" />


            <EditText
                android:id="@+id/servername"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentLeft="true"
                android:layout_alignParentStart="true"
                android:layout_below="@id/server_label"
                android:layout_toLeftOf="@id/portnumber"
                android:layout_toStartOf="@id/portnumber"
                android:inputType="textUri"
                android:singleLine="true"
                android:text="openvpn.blinkt.de"
                android:textAppearance="@android:style/TextAppearance.DeviceDefault.Medium"
                tools:ignore="HardcodedText" />

            <TextView
                android:id="@+id/protocol"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_below="@id/servername"
                android:paddingTop="10dp"
                android:text="@string/protocol" />

            <RadioGroup
                android:id="@+id/udptcpradiogroup"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_below="@id/protocol"
                android:orientation="horizontal"
                android:paddingStart="20dp"
                android:paddingEnd="20dp"
                android:paddingRight="20dp"
                android:paddingLeft="20dp">

                <RadioButton
                    android:id="@+id/udp_proto"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="UDP"
                    tools:ignore="HardcodedText" />

                <Space
                    android:layout_width="20dp"
                    android:layout_height="wrap_content" />

                <RadioButton
                    android:id="@+id/tcp_proto"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="TCP"
                    tools:ignore="HardcodedText" />
            </RadioGroup>


            <!--    <TextView
                   android:paddingTop="10dp"
                   android:layout_width="wrap_content"
                   android:layout_height="wrap_content"
                   android:layout_below="@id/udptcpradiogroup"
                   android:id="@+id/proxytext"
                   android:text="Proxy" />

               <RadioGroup
                   android:layout_width="wrap_content"
                   android:layout_height="wrap_content"
                   android:orientation="horizontal"
                   android:id="@+id/proxygroup"
                   android:paddingLeft="20dp"
                   android:layout_below="@id/proxytext">

                   <RadioButton
                       android:layout_width="wrap_content"
                       android:layout_height="wrap_content"
                       android:text="None" />

                   <Space
                       android:layout_width="10dp"
                       android:layout_height="wrap_content" />

                   <RadioButton
                       android:layout_width="wrap_content"
                       android:layout_height="wrap_content"
                       android:text="HTTP" />

                   <Space
                       android:layout_width="10dp"
                       android:layout_height="wrap_content" />

                   <RadioButton
                       android:layout_width="wrap_content"
                       android:layout_height="wrap_content"
                       android:text="Socks" />
               </RadioGroup> -->

            <TextView
                android:id="@+id/connect_timeout_label"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_below="@id/udptcpradiogroup"
                android:paddingTop="10dp"
                android:text="@string/connect_timeout" />

            <EditText
                android:id="@+id/connect_timeout"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignParentRight="true"
                android:layout_alignParentEnd="true"
                android:layout_below="@+id/connect_timeout_label"
                android:ems="3"
                tools:text="232"
                android:gravity="end"
                android:inputType="numberDecimal" />

            <SeekBar
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:id="@+id/connect_silder"
                android:max="300"
                android:layout_alignBottom="@id/connect_timeout"
                android:layout_toLeftOf="@id/connect_timeout"
                android:layout_toStartOf="@id/connect_timeout"
                android:layout_below="@id/connect_timeout_label" />



            <CheckBox
                android:id="@+id/use_customoptions"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_below="@id/connect_timeout"
                android:paddingTop="10dp"
                android:text="@string/custom_connection_options" />

            <LinearLayout
                android:id="@+id/custom_options_layout"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_below="@id/use_customoptions"
                android:orientation="vertical"
                android:paddingRight="10dp"
                android:paddingEnd="10dp"
                android:paddingLeft="10dp"
                android:paddingStart="10dp">

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

                <EditText
                    android:id="@+id/customoptions"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:inputType="textMultiLine"
                    android:lines="5" />
            </LinearLayout>

            <Switch
                android:id="@+id/remoteSwitch"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignEnd="@+id/portnumber"
                android:layout_alignRight="@+id/portnumber"
                android:layout_below="@+id/portnumber"
                android:layout_gravity="right|bottom"
                android:text="@string/enabled_connection_entry" />

            <ImageButton
                android:id="@+id/remove_connection"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_alignEnd="@+id/portnumber"
                android:layout_alignRight="@+id/portnumber"
                android:layout_below="@id/remoteSwitch"
                android:layout_margin="12dp"
                android:background="@drawable/ic_menu_delete_grey"
                android:contentDescription="@string/remove_connection_entry"
                android:padding="12dp" />


        </RelativeLayout>

    </android.support.v7.widget.CardView>
</FrameLayout>