<?xml version="1.0" encoding="utf-8"?>
<!--
 Copyright 2019 Jeremy Jamet / Kunzisoft.
     
 This file is part of KeePassDX.

  KeePassDX 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.

  KeePassDX 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 KeePassDX.  If not, see <http://www.gnu.org/licenses/>.
-->

<androidx.constraintlayout.widget.ConstraintLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:importantForAutofill="noExcludeDescendants"
    android:paddingTop="@dimen/default_margin"
    android:paddingLeft="@dimen/default_margin"
    android:paddingStart="@dimen/default_margin"
    android:paddingRight="@dimen/default_margin"
    android:paddingEnd="@dimen/default_margin"
    tools:ignore="UnusedAttribute">

    <com.google.android.material.textfield.TextInputLayout
        android:id="@+id/entry_custom_field_label_container"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintEnd_toStartOf="@+id/entry_custom_field_delete">

        <com.google.android.material.textfield.TextInputEditText
            android:id="@+id/entry_custom_field_label"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:hint="@string/field_name"
            android:importantForAccessibility="no"
            android:importantForAutofill="no"
            android:inputType="text"
            android:maxLines="1" />
    </com.google.android.material.textfield.TextInputLayout>

    <androidx.appcompat.widget.AppCompatImageView
        android:id="@+id/entry_custom_field_delete"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        android:src="@drawable/ic_content_delete_white_24dp"
        android:contentDescription="@string/menu_delete"
        style="@style/KeepassDXStyle.ImageButton.Simple" />

    <com.google.android.material.materialswitch.MaterialSwitch
        android:id="@+id/entry_custom_field_protection"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:minHeight="48dp"
        app:layout_constraintTop_toBottomOf="@+id/entry_custom_field_label_container"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        android:text="@string/protection" />

</androidx.constraintlayout.widget.ConstraintLayout>