<?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/>.
-->

<LinearLayout 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:orientation="vertical"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:padding="@dimen/default_margin"
    android:importantForAutofill="noExcludeDescendants"
    tools:targetApi="o">

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

        <EditText android:id="@+id/password"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:ems="10"
            android:maxLines="3"
            android:hint="@string/hint_generated_password"
            tools:ignore="TextFields" />

        <Button android:id="@+id/generate_password_button"
            android:layout_margin="@dimen/button_margin"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:text="@string/generate_password" />
    </LinearLayout>

    <ScrollView android:id="@+id/ScrollView"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content">

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

            <RelativeLayout
                android:layout_width="wrap_content"
                android:layout_height="wrap_content">

                <TextView android:id="@+id/length_label"
                    android:text="@string/length"
                    android:layout_height="match_parent"
                    android:layout_width="match_parent" />

                <EditText android:id="@+id/length"
                    android:layout_width="50dp"
                    android:layout_alignParentLeft="true"
                    android:layout_alignParentStart="true"
                    android:layout_height="wrap_content"
                    android:layout_below="@+id/length_label"
                    android:maxLines="1"
                    android:maxLength="3"
                    android:inputType="number"
                    android:text="@string/default_password_length"
                    android:hint="@string/hint_length"/>

                <android.support.v7.widget.AppCompatSeekBar android:id="@+id/seekbar_length"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_alignBottom="@+id/length"
                    android:layout_alignParentEnd="true"
                    android:layout_alignParentRight="true"
                    android:layout_alignTop="@+id/length"
                    android:layout_toEndOf="@+id/length"
                    android:layout_toRightOf="@+id/length"
                    app:min="@string/min_password_length"
                    android:progress="@string/default_password_length"
                    android:max="@string/max_password_length"/>

            </RelativeLayout>

            <LinearLayout android:id="@+id/RelativeLayout"
                android:layout_height="match_parent"
                android:layout_width="match_parent"
                android:orientation="vertical"
                android:layout_marginRight="20dp"
                android:layout_marginEnd="20dp">

                <RelativeLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content">
                    <CheckBox android:id="@+id/cb_uppercase"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="@string/uppercase"
                        android:checked="true" />
                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_alignParentEnd="true"
                        android:layout_alignParentRight="true"
                        android:layout_centerVertical="true"
                        android:gravity="end"
                        android:layout_toEndOf="@+id/cb_uppercase"
                        android:layout_toRightOf="@+id/cb_uppercase"
                        android:text="@string/visual_uppercase" />
                </RelativeLayout>

                <RelativeLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content">
                    <CheckBox android:id="@+id/cb_lowercase"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="@string/lowercase"
                        android:checked="true" />
                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_alignParentEnd="true"
                        android:layout_alignParentRight="true"
                        android:layout_centerVertical="true"
                        android:gravity="end"
                        android:layout_toEndOf="@+id/cb_lowercase"
                        android:layout_toRightOf="@+id/cb_lowercase"
                        android:text="@string/visual_lowercase" />
                </RelativeLayout>

                <RelativeLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content">
                    <CheckBox android:id="@+id/cb_digits"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="@string/digits"
                        android:checked="true" />
                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_alignParentEnd="true"
                        android:layout_alignParentRight="true"
                        android:layout_centerVertical="true"
                        android:gravity="end"
                        android:layout_toEndOf="@+id/cb_digits"
                        android:layout_toRightOf="@+id/cb_digits"
                        android:text="@string/visual_digits" />
                </RelativeLayout>

                <RelativeLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content">
                    <CheckBox android:id="@+id/cb_minus"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="@string/minus" />
                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_alignParentEnd="true"
                        android:layout_alignParentRight="true"
                        android:layout_centerVertical="true"
                        android:gravity="end"
                        android:layout_toEndOf="@+id/cb_minus"
                        android:layout_toRightOf="@+id/cb_minus"
                        android:text="@string/visual_minus" />
                </RelativeLayout>

                <RelativeLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content">
                    <CheckBox android:id="@+id/cb_underline"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="@string/underline" />
                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_alignParentEnd="true"
                        android:layout_alignParentRight="true"
                        android:layout_centerVertical="true"
                        android:gravity="end"
                        android:layout_toEndOf="@+id/cb_underline"
                        android:layout_toRightOf="@+id/cb_underline"
                        android:text="@string/visual_underline" />
                </RelativeLayout>

                <RelativeLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content">
                    <CheckBox android:id="@+id/cb_space"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="@string/space" />
                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_alignParentEnd="true"
                        android:layout_alignParentRight="true"
                        android:layout_centerVertical="true"
                        android:gravity="end"
                        android:layout_toEndOf="@+id/cb_space"
                        android:layout_toRightOf="@+id/cb_space"
                        android:text="@string/visual_space" />
                </RelativeLayout>

                <RelativeLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content">
                    <CheckBox android:id="@+id/cb_specials"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="@string/special" />
                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_alignParentEnd="true"
                        android:layout_alignParentRight="true"
                        android:layout_centerVertical="true"
                        android:gravity="end"
                        android:layout_toEndOf="@+id/cb_specials"
                        android:layout_toRightOf="@+id/cb_specials"
                        android:text="@string/visual_special" />
                </RelativeLayout>

                <RelativeLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content">
                    <CheckBox android:id="@+id/cb_brackets"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="@string/brackets"
                        android:layout_alignParentLeft="true"
                        android:layout_alignParentStart="true" />
                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_alignParentEnd="true"
                        android:layout_alignParentRight="true"
                        android:layout_centerVertical="true"
                        android:gravity="end"
                        android:layout_toEndOf="@+id/cb_brackets"
                        android:layout_toRightOf="@+id/cb_brackets"
                        android:text="@string/visual_brackets" />
                </RelativeLayout>

                <RelativeLayout
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content">
                    <CheckBox android:id="@+id/cb_extended"
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:text="@string/extended_ASCII"
                        android:layout_alignParentLeft="true"
                        android:layout_alignParentStart="true" />
                    <TextView
                        android:layout_width="wrap_content"
                        android:layout_height="wrap_content"
                        android:layout_alignParentEnd="true"
                        android:layout_alignParentRight="true"
                        android:layout_centerVertical="true"
                        android:gravity="end"
                        android:layout_toEndOf="@+id/cb_extended"
                        android:layout_toRightOf="@+id/cb_extended"
                        android:text="@string/visual_extended" />
                </RelativeLayout>

            </LinearLayout>
        </LinearLayout>
    </ScrollView>
</LinearLayout>