<?xml version="1.0" encoding="utf-8"?>
<!--
 Copyright 2017 Brian Pellin, Jeremy Jamet / Kunzisoft.
     
 This file is part of KeePass DX.

  KeePass DX is free software: you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation, either version 3 of the License, or
  (at your option) any later version.

  KeePass DX is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with KeePass DX.  If not, see <http://www.gnu.org/licenses/>.
-->
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:paddingTop="12dp"
    android:paddingBottom="12dp"
    android:importantForAutofill="noExcludeDescendants"
    tools:targetApi="o">

    <android.support.design.widget.TextInputLayout
        android:id="@+id/title_container"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_toLeftOf="@+id/entry_edit_new_field_delete"
        android:layout_toStartOf="@+id/entry_edit_new_field_delete">

        <EditText
            android:id="@+id/entry_edit_new_field_label"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:hint="@string/field_name"
            android:inputType="text"
            android:maxLines="1" />
    </android.support.design.widget.TextInputLayout>

    <android.support.v7.widget.AppCompatImageView
        android:id="@+id/entry_edit_new_field_delete"
        android:layout_margin="4dp"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentEnd="true"
        android:layout_alignParentRight="true"
        android:scaleType="centerCrop"
        android:src="@drawable/ic_close_white_24dp"
        android:tint="?attr/colorAccent" />

    <android.support.v7.widget.SwitchCompat
        android:id="@+id/protection"
        style="@style/KeepassDXStyle.TextAppearance.Default"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@+id/value_container"
        android:layout_centerHorizontal="true"
        android:text="@string/protection" />

    <android.support.design.widget.TextInputLayout
        android:id="@+id/value_container"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_below="@+id/title_container">

        <EditText android:id="@+id/entry_edit_new_field_value"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:inputType="textMultiLine"
            android:hint="@string/field_value" />
    </android.support.design.widget.TextInputLayout>

</RelativeLayout>
