<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="#fff" >

    <android.support.constraint.Guideline
        android:id="@+id/guidelineV10"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        app:layout_constraintGuide_percent="0.1" />

    <android.support.constraint.Guideline
        android:id="@+id/guidelineV40"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        app:layout_constraintGuide_percent="0.4" />

    <android.support.constraint.Guideline
        android:id="@+id/guidelineV90"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        app:layout_constraintGuide_percent="0.9" />

    <android.support.constraint.Guideline
        android:id="@+id/guidelineH20"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        app:layout_constraintGuide_percent="0.2" />

    <TextView
        android:id="@+id/tv_dialogPassword_title"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:gravity="center_vertical"
        android:text="@string/reader_dialog_password_title"
        android:textColor="@color/dialog_title"
        android:textSize="@dimen/material_title"
        app:layout_constraintWidth_max="480dp"
        app:layout_constraintVertical_chainStyle="packed"
        app:layout_constraintTop_toTopOf="@+id/guidelineH20"
        app:layout_constraintBottom_toTopOf="@+id/layout_dialogPassword_name"
        app:layout_constraintLeft_toLeftOf="@+id/guidelineV10"
        app:layout_constraintRight_toRightOf="@+id/guidelineV90" />

    <android.support.design.widget.TextInputLayout
        android:id="@+id/layout_dialogPassword_name"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginTop="@dimen/material_dialog_title_body"
        android:textColorHint="@color/bright_blue"
        app:colorPrimary="@color/bright_blue"
        app:colorPrimaryDark="@color/bright_blue"
        app:colorAccent="@color/bright_blue"
        app:colorControlNormal="@color/bright_blue"
        app:colorControlActivated="@color/bright_blue"
        app:passwordToggleEnabled="true"
        app:backgroundTint="@color/bright_blue"
        app:hintTextAppearance="@style/ReaderPasswordTextInputLayoutHint"
        app:layout_constraintTop_toBottomOf="@+id/tv_dialogPassword_title"
        app:layout_constraintBottom_toTopOf="@+id/tv_dialogPassword_cancel"
        app:layout_constraintLeft_toLeftOf="@+id/tv_dialogPassword_title"
        app:layout_constraintRight_toRightOf="@+id/tv_dialogPassword_title" >

        <android.support.v7.widget.AppCompatEditText
            android:id="@+id/et_dialogPassword_name"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:textColorHint="@color/bright_blue"
            android:hint="@string/reader_dialog_password_tip"
            android:inputType="textPassword"
            android:singleLine="true"
            android:textCursorDrawable="@drawable/shape_password_cursor_normal"
            android:textColor="@color/bright_blue"
            android:textSize="@dimen/material_body"
            app:hintTextAppearance="@style/ReaderPasswordTextInputLayoutHint"
            app:colorPrimary="@color/bright_blue"
            app:colorPrimaryDark="@color/bright_blue"
            app:colorAccent="@color/bright_blue"
            app:colorControlNormal="@color/bright_blue"
            app:colorControlActivated="@color/bright_blue"
            app:backgroundTint="@color/bright_blue" >

            <requestFocus/>
        </android.support.v7.widget.AppCompatEditText>
    </android.support.design.widget.TextInputLayout>

    <TextView
        android:id="@+id/tv_dialogPassword_cancel"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:padding="8dp"
        android:layout_weight="1"
        android:background="@drawable/selector_0000_9933b5e5"
        android:gravity="center"
        android:text="@string/reader_dialog_password_cancel"
        android:textAllCaps="true"
        android:textColor="@color/bright_blue"
        android:textSize="@dimen/material_button"
        android:layout_marginLeft="24dp"
        android:layout_marginRight="24dp"
        app:layout_constraintTop_toTopOf="@+id/tv_dialogPassword_ok"
        app:layout_constraintBottom_toBottomOf="@+id/tv_dialogPassword_ok"
        app:layout_constraintRight_toLeftOf="@+id/tv_dialogPassword_ok" />

    <TextView
        android:id="@+id/tv_dialogPassword_ok"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:padding="8dp"
        android:layout_weight="1"
        android:background="@drawable/selector_0000_9933b5e5"
        android:gravity="center"
        android:textAllCaps="true"
        android:text="@string/reader_dialog_password_confirm"
        android:textColor="@color/bright_blue"
        android:textSize="@dimen/material_button"
        android:layout_marginTop="24dp"
        app:layout_constraintTop_toBottomOf="@+id/layout_dialogPassword_name"
        app:layout_constraintRight_toRightOf="@+id/tv_dialogPassword_title" />

</android.support.constraint.ConstraintLayout>