Login UX flow: UI iso

This commit is contained in:
Benoit Marty 2021-04-14 18:38:02 +02:00 committed by Benoit Marty
parent 51a39909dc
commit adae66aa43
12 changed files with 91 additions and 43 deletions

View File

@ -22,18 +22,17 @@ import android.view.View
import android.view.ViewGroup
import androidx.appcompat.app.AlertDialog
import im.vector.app.R
import im.vector.app.databinding.FragmentLoginResetPasswordMailConfirmationBinding
import im.vector.app.databinding.FragmentLoginResetPasswordMailConfirmation2Binding
import org.matrix.android.sdk.api.failure.is401
import javax.inject.Inject
/**
* In this screen, the user is asked to check his email and to click on a button once it's done
*/
class LoginResetPasswordMailConfirmationFragment2 @Inject constructor() : AbstractLoginFragment2<FragmentLoginResetPasswordMailConfirmationBinding>() {
class LoginResetPasswordMailConfirmationFragment2 @Inject constructor() : AbstractLoginFragment2<FragmentLoginResetPasswordMailConfirmation2Binding>() {
override fun getBinding(inflater: LayoutInflater, container: ViewGroup?): FragmentLoginResetPasswordMailConfirmationBinding {
return FragmentLoginResetPasswordMailConfirmationBinding.inflate(inflater, container, false)
override fun getBinding(inflater: LayoutInflater, container: ViewGroup?): FragmentLoginResetPasswordMailConfirmation2Binding {
return FragmentLoginResetPasswordMailConfirmation2Binding.inflate(inflater, container, false)
}
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {

View File

@ -15,10 +15,18 @@
style="@style/LoginLogo"
tools:ignore="ContentDescription" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/layout_vertical_margin"
android:text="@string/login_please_enter_your_password"
android:textAppearance="@style/TextAppearance.Vector.Login.Title" />
<ImageView
android:id="@+id/loginUserIcon"
android:layout_width="92dp"
android:layout_height="92dp"
android:layout_marginTop="@dimen/layout_vertical_margin"
android:importantForAccessibility="no"
tools:ignore="MissingPrefix"
tools:src="@tools:sample/avatars" />
@ -42,13 +50,6 @@
android:visibility="gone"
tools:visibility="visible" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="32dp"
android:text="@string/login_please_enter_your_password"
android:textAppearance="@style/TextAppearance.Vector.Login.Title" />
<FrameLayout
android:id="@+id/passwordContainer"
android:layout_width="match_parent"

View File

@ -84,7 +84,7 @@
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="22dp">
android:layout_marginTop="@dimen/layout_vertical_margin">
<com.google.android.material.button.MaterialButton
android:id="@+id/forgetPasswordButton"

View File

@ -18,7 +18,7 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="32dp"
android:layout_marginTop="@dimen/layout_vertical_margin"
android:text="@string/login_please_choose_a_password"
android:textAppearance="@style/TextAppearance.Vector.Login.Title" />

View File

@ -17,7 +17,7 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="32dp"
android:layout_marginTop="@dimen/layout_vertical_margin"
android:text="@string/login_account_created_title"
android:textAppearance="@style/TextAppearance.Vector.Login.Title" />

View File

@ -18,6 +18,7 @@
android:id="@+id/resetPasswordTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/layout_vertical_margin"
android:textAppearance="@style/TextAppearance.Vector.Login.Title"
tools:text="@string/login_reset_password_on" />

View File

@ -0,0 +1,52 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?riotx_background">
<androidx.core.widget.NestedScrollView style="@style/LoginFormScrollView">
<LinearLayout style="@style/LoginFormContainer">
<ImageView
style="@style/LoginLogo"
tools:ignore="ContentDescription" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/layout_vertical_margin"
android:text="@string/login_reset_password_mail_confirmation_title"
android:textAppearance="@style/TextAppearance.Vector.Login.Title" />
<TextView
android:id="@+id/resetPasswordMailConfirmationNotice"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/layout_vertical_margin"
android:textAppearance="@style/TextAppearance.Vector.Login.Text"
tools:text="@string/login_reset_password_mail_confirmation_notice" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/layout_vertical_margin"
android:text="@string/login_reset_password_mail_confirmation_notice_2"
android:textAppearance="@style/TextAppearance.Vector.Login.Text.Small" />
<com.google.android.material.button.MaterialButton
android:id="@+id/resetPasswordMailConfirmationSubmit"
style="@style/Style.Vector.Login.Button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:layout_marginTop="32dp"
android:text="@string/login_reset_password_mail_confirmation_submit" />
</LinearLayout>
</androidx.core.widget.NestedScrollView>
</FrameLayout>

View File

@ -16,6 +16,7 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/layout_vertical_margin"
android:text="@string/login_reset_password_success_title"
android:textAppearance="@style/TextAppearance.Vector.Login.Title" />
@ -23,16 +24,16 @@
android:id="@+id/resetPasswordSuccessNotice"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="32dp"
android:layout_marginTop="@dimen/layout_vertical_margin"
android:text="@string/login_reset_password_success_notice"
android:textAppearance="@style/TextAppearance.Vector.Login.Text" />
android:textAppearance="@style/TextAppearance.Vector.Login.Title.Small" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/layout_vertical_margin"
android:text="@string/login_reset_password_success_notice_2"
android:textAppearance="@style/TextAppearance.Vector.Login.Text.Small" />
android:textAppearance="@style/TextAppearance.Vector.Login.Text" />
<com.google.android.material.button.MaterialButton
android:id="@+id/resetPasswordSuccessSubmit"
@ -40,7 +41,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:layout_marginTop="@dimen/layout_vertical_margin"
android:layout_marginTop="32dp"
android:text="@string/login_reset_password_success_submit" />
</LinearLayout>

View File

@ -12,16 +12,13 @@
<ImageView
style="@style/LoginLogo"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="ContentDescription" />
<TextView
android:id="@+id/loginServerTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="36dp"
android:layout_marginTop="@dimen/layout_vertical_margin"
android:textAppearance="@style/TextAppearance.Vector.Login.Title"
tools:ignore="UnknownId"
tools:text="Please choose a server" />

View File

@ -19,7 +19,7 @@
android:id="@+id/loginServerUrlFormTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="27dp"
android:layout_marginTop="@dimen/layout_vertical_margin"
android:text="@string/login_server_url_form_common_notice"
android:textAppearance="@style/TextAppearance.Vector.Login.Title" />
@ -48,6 +48,9 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:paddingStart="16dp"
android:paddingEnd="0dp"
android:paddingBottom="16dp"
android:text="@string/login_clear_homeserver_history"
android:textAppearance="@style/TextAppearance.Vector.Login.Text.Small"
android:textColor="@color/riotx_accent"
@ -60,7 +63,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:layout_marginTop="22dp"
android:layout_marginTop="4dp"
android:text="@string/login_continue" />
</LinearLayout>

View File

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout 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"
@ -8,23 +7,18 @@
<androidx.core.widget.NestedScrollView style="@style/LoginFormScrollView">
<androidx.constraintlayout.widget.ConstraintLayout style="@style/LoginFormContainer">
<LinearLayout style="@style/LoginFormContainer">
<ImageView
style="@style/LoginLogo"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:ignore="ContentDescription" />
<TextView
android:id="@+id/loginSignupSigninTitle"
android:layout_width="0dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="56dp"
android:layout_marginTop="@dimen/layout_vertical_margin"
android:textAppearance="@style/TextAppearance.Vector.Login.Title"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/loginLogo"
tools:ignore="UnknownId"
tools:text="@string/login_connect_to" />
@ -33,12 +27,11 @@
style="@style/Style.Vector.Login.Button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end"
android:layout_marginTop="38dp"
android:text="@string/login_signin_sso"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/loginSignupSigninTitle" />
android:text="@string/login_signin_sso" />
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
</androidx.core.widget.NestedScrollView>

View File

@ -17,6 +17,7 @@
android:id="@+id/loginWaitForEmailTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/layout_vertical_margin"
android:text="@string/login_wait_for_email_title"
android:textAppearance="@style/TextAppearance.Vector.Login.Title" />
@ -24,23 +25,23 @@
android:id="@+id/loginWaitForEmailNotice"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="32dp"
android:layout_marginTop="@dimen/layout_vertical_margin"
android:gravity="start"
android:textAppearance="@style/TextAppearance.Vector.Login.Text"
android:textAppearance="@style/TextAppearance.Vector.Login.Title.Small"
tools:text="@string/login_wait_for_email_notice_2" />
<TextView
android:id="@+id/loginWaitForEmailHelp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/layout_vertical_margin"
android:layout_marginTop="32dp"
android:gravity="start"
android:text="@string/login_wait_for_email_help"
android:textAppearance="@style/TextAppearance.Vector.Login.Text.Small" />
android:textAppearance="@style/TextAppearance.Vector.Login.Text" />
<ProgressBar
style="@style/Widget.AppCompat.ProgressBar.Horizontal"
android:layout_width="220dp"
android:layout_width="240dp"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="32dp"