<?xml version="1.0" encoding="utf-8"?>
<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"
	android:fillViewport="true">

	<android.support.constraint.ConstraintLayout
		android:layout_width="match_parent"
		android:layout_height="wrap_content"
		android:paddingBottom="@dimen/margin_activity_vertical"
		android:paddingEnd="@dimen/margin_activity_horizontal"
		android:paddingLeft="@dimen/margin_activity_horizontal"
		android:paddingRight="@dimen/margin_activity_horizontal"
		android:paddingStart="@dimen/margin_activity_horizontal"
		android:paddingTop="@dimen/margin_activity_vertical">

		<android.support.design.widget.TextInputLayout
			android:id="@+id/password_entry_wrapper"
			android:layout_width="match_parent"
			android:layout_height="wrap_content"
			android:layout_marginTop="8dp"
			app:errorEnabled="true"
			app:hintEnabled="false"
			app:layout_constraintLeft_toLeftOf="parent"
			app:layout_constraintRight_toRightOf="parent"
			app:layout_constraintTop_toTopOf="parent"
			app:passwordToggleEnabled="true">

			<android.support.design.widget.TextInputEditText
				android:id="@+id/password_entry"
				android:layout_width="match_parent"
				android:layout_height="wrap_content"
				android:hint="@string/choose_password"
				android:imeOptions="actionNext"
				android:inputType="textPassword"
				android:maxLines="1">

				<requestFocus/>
			</android.support.design.widget.TextInputEditText>

		</android.support.design.widget.TextInputLayout>

		<org.briarproject.briar.android.login.StrengthMeter
			android:id="@+id/strength_meter"
			android:layout_width="match_parent"
			android:layout_height="wrap_content"
			android:layout_marginTop="8dp"
			android:visibility="invisible"
			app:layout_constraintLeft_toLeftOf="parent"
			app:layout_constraintRight_toRightOf="parent"
			app:layout_constraintTop_toBottomOf="@+id/password_entry_wrapper"
			tools:visibility="visible"/>

		<android.support.design.widget.TextInputLayout
			android:id="@+id/password_confirm_wrapper"
			android:layout_width="match_parent"
			android:layout_height="wrap_content"
			android:layout_marginTop="8dp"
			app:errorEnabled="true"
			app:hintEnabled="false"
			app:layout_constraintLeft_toLeftOf="parent"
			app:layout_constraintRight_toRightOf="parent"
			app:layout_constraintTop_toBottomOf="@+id/strength_meter"
			app:passwordToggleEnabled="true">

			<android.support.design.widget.TextInputEditText
				android:id="@+id/password_confirm"
				android:layout_width="match_parent"
				android:layout_height="wrap_content"
				android:hint="@string/confirm_password"
				android:inputType="textPassword"
				android:maxLines="1"/>
		</android.support.design.widget.TextInputLayout>

		<Button
			android:id="@+id/next"
			style="@style/BriarButton.Default"
			android:layout_width="match_parent"
			android:layout_height="wrap_content"
			android:enabled="false"
			android:text="@string/setup_next"
			app:layout_constraintBottom_toBottomOf="parent"
			app:layout_constraintLeft_toLeftOf="parent"
			app:layout_constraintRight_toRightOf="parent"
			app:layout_constraintTop_toBottomOf="@+id/password_confirm_wrapper"
			app:layout_constraintVertical_bias="1.0"
			tools:enabled="true"/>

		<ProgressBar
			android:id="@+id/progress"
			style="?android:attr/progressBarStyle"
			android:layout_width="wrap_content"
			android:layout_height="wrap_content"
			android:visibility="invisible"
			app:layout_constraintBottom_toBottomOf="parent"
			app:layout_constraintLeft_toLeftOf="parent"
			app:layout_constraintRight_toRightOf="parent"
			app:layout_constraintTop_toBottomOf="@+id/password_confirm_wrapper"
			app:layout_constraintVertical_bias="1.0"/>

	</android.support.constraint.ConstraintLayout>

</ScrollView>
