<?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/>.
-->
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
	xmlns:app="http://schemas.android.com/apk/res-auto"
	xmlns:tools="http://schemas.android.com/tools"
	android:layout_width="match_parent"
	android:layout_height="match_parent">
	<androidx.constraintlayout.widget.ConstraintLayout
		android:id="@+id/edit"
		android:orientation="vertical"
		android:layout_width="match_parent"
		android:layout_height="wrap_content"
		android:importantForAutofill="noExcludeDescendants"
		tools:targetApi="o">
		<androidx.appcompat.widget.AppCompatTextView
			android:id="@+id/explanation_text"
			android:layout_height="wrap_content"
			android:layout_width="0dp"
			android:gravity="center"
			android:layout_marginStart="20dp"
			android:layout_marginLeft="20dp"
			android:layout_marginEnd="20dp"
			android:layout_marginRight="20dp"
			android:layout_marginTop="8dp"
			app:layout_constraintTop_toTopOf="parent"
			app:layout_constraintStart_toStartOf="parent"
			app:layout_constraintLeft_toLeftOf="parent"
			app:layout_constraintEnd_toEndOf="parent"
			app:layout_constraintRight_toRightOf="parent"
			style="@style/KeepassDXStyle.Text.Preferences.Explanation"/>

		<Button
			android:id="@+id/explanation_button"
			android:layout_width="wrap_content"
			android:layout_height="wrap_content"
			android:layout_marginTop="8dp"
			android:layout_marginStart="20dp"
			android:layout_marginLeft="20dp"
			android:layout_marginEnd="20dp"
			android:layout_marginRight="20dp"
			tools:text="Permission"
			app:layout_constraintStart_toStartOf="parent"
			app:layout_constraintEnd_toEndOf="parent"
			app:layout_constraintTop_toBottomOf="@+id/explanation_text" />

		<com.google.android.material.materialswitch.MaterialSwitch
			android:id="@+id/switch_element"
			android:layout_width="wrap_content"
			android:layout_height="wrap_content"
			android:text="@string/enable"
			android:layout_marginTop="8dp"
			android:layout_marginStart="20dp"
			android:layout_marginLeft="20dp"
			android:layout_marginEnd="20dp"
			android:layout_marginRight="20dp"
			app:layout_constraintEnd_toEndOf="parent"
			app:layout_constraintTop_toBottomOf="@+id/explanation_button" />

		<androidx.constraintlayout.widget.ConstraintLayout
			android:layout_width="match_parent"
			android:layout_height="wrap_content"
			android:layoutDirection="ltr"
			app:layout_constraintTop_toBottomOf="@+id/switch_element">

			<LinearLayout
				android:id="@+id/duration_days_picker"
				android:layout_width="wrap_content"
				android:layout_height="wrap_content"
				android:orientation="horizontal"
				app:layout_constraintTop_toTopOf="parent"
				app:layout_constraintStart_toStartOf="parent"
				app:layout_constraintLeft_toLeftOf="parent"
				app:layout_constraintEnd_toStartOf="@+id/duration_hours_picker"
				app:layout_constraintRight_toLeftOf="@+id/duration_hours_picker">
				<NumberPicker
					android:id="@+id/days_picker"
					android:scrollbarFadeDuration="0"
					android:scrollbarDefaultDelayBeforeFade="0"
					android:layout_width="wrap_content"
					android:layout_height="wrap_content"/>
				<ImageView
					android:layout_width="wrap_content"
					android:layout_height="match_parent"
					android:gravity="center"
					android:src="@drawable/ic_day_white_24dp"
					app:tint="?android:attr/textColor"
					android:contentDescription="@string/digits" />
			</LinearLayout>

			<LinearLayout
				android:id="@+id/duration_hours_picker"
				android:layout_width="wrap_content"
				android:layout_height="wrap_content"
				android:orientation="horizontal"
				tools:ignore="HardcodedText"
				app:layout_constraintTop_toTopOf="parent"
				app:layout_constraintStart_toEndOf="@+id/duration_days_picker"
				app:layout_constraintLeft_toRightOf="@+id/duration_days_picker"
				app:layout_constraintEnd_toStartOf="@+id/duration_time_picker"
				app:layout_constraintRight_toLeftOf="@+id/duration_time_picker">
				<NumberPicker
					android:id="@+id/hours_picker"
					android:scrollbarFadeDuration="0"
					android:scrollbarDefaultDelayBeforeFade="0"
					android:layout_width="wrap_content"
					android:layout_height="wrap_content"/>
				<TextView
					android:layout_width="wrap_content"
					android:layout_height="match_parent"
					android:gravity="center"
					android:textStyle="bold"
					android:text=":" />
			</LinearLayout>

			<LinearLayout
				android:id="@+id/duration_time_picker"
				android:layout_width="wrap_content"
				android:layout_height="wrap_content"
				android:orientation="horizontal"
				tools:ignore="HardcodedText"
				app:layout_constraintTop_toTopOf="parent"
				app:layout_constraintStart_toEndOf="@+id/duration_hours_picker"
				app:layout_constraintLeft_toRightOf="@+id/duration_hours_picker"
				app:layout_constraintEnd_toEndOf="parent"
				app:layout_constraintRight_toRightOf="parent">
				<NumberPicker
					android:id="@+id/minutes_picker"
					android:scrollbarFadeDuration="0"
					android:scrollbarDefaultDelayBeforeFade="0"
					android:layout_width="wrap_content"
					android:layout_height="wrap_content"/>
				<TextView
					android:layout_width="wrap_content"
					android:layout_height="match_parent"
					android:gravity="center"
					android:textSize="28sp"
					android:text="'"/>
				<NumberPicker
					android:id="@+id/seconds_picker"
					android:scrollbarFadeDuration="0"
					android:scrollbarDefaultDelayBeforeFade="0"
					android:layout_width="wrap_content"
					android:layout_height="wrap_content"/>
				<TextView
					android:layout_width="wrap_content"
					android:layout_height="match_parent"
					android:gravity="center"
					android:textSize="28sp"
					android:text="''"/>
			</LinearLayout>

		</androidx.constraintlayout.widget.ConstraintLayout>
	</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>