Browse Source

Gave AccountRecoveryActivity a makeover

Víctor Hernández 3 years ago
parent
commit
59c00c3b37

+ 61
- 73
app/src/main/res/layout/activity_account_recovery.xml View File

7
     android:background="@android:color/white">
7
     android:background="@android:color/white">
8
 
8
 
9
     <TextView
9
     <TextView
10
-        android:id="@+id/textView5"
10
+        android:id="@+id/accountRecoveryTitle"
11
         android:layout_width="wrap_content"
11
         android:layout_width="wrap_content"
12
         android:layout_height="wrap_content"
12
         android:layout_height="wrap_content"
13
+        android:layout_marginStart="@dimen/horizontalMargin"
14
+        android:layout_marginEnd="@dimen/horizontalMargin"
13
         android:fontFamily="@font/cabin"
15
         android:fontFamily="@font/cabin"
14
-        android:text="LOG IN TO ACCOUNT"
16
+        android:text="@string/accountRecoveryTitleText"
17
+        android:textAlignment="center"
15
         android:textColor="@color/colorPrimary"
18
         android:textColor="@color/colorPrimary"
16
         android:textSize="24sp"
19
         android:textSize="24sp"
17
         android:textStyle="bold"
20
         android:textStyle="bold"
18
-        app:layout_constraintBottom_toBottomOf="parent"
21
+        app:layout_constraintBottom_toTopOf="@+id/recoverButton"
19
         app:layout_constraintEnd_toEndOf="parent"
22
         app:layout_constraintEnd_toEndOf="parent"
20
-        app:layout_constraintHorizontal_bias="0.497"
21
         app:layout_constraintStart_toStartOf="parent"
23
         app:layout_constraintStart_toStartOf="parent"
22
-        app:layout_constraintTop_toTopOf="parent"
23
-        app:layout_constraintVertical_bias="0.202" />
24
+        app:layout_constraintTop_toTopOf="parent" />
24
 
25
 
25
     <Button
26
     <Button
26
         android:id="@+id/recoverButton"
27
         android:id="@+id/recoverButton"
27
-        android:layout_width="329dp"
28
-        android:layout_height="49dp"
29
-        android:background="@color/colorPrimary"
30
-        android:fontFamily="@font/acme"
31
-        android:text="LOG IN"
32
-        android:textColor="@color/textColor1"
33
-        android:textSize="18sp"
28
+        android:layout_width="0dp"
29
+        android:layout_height="wrap_content"
30
+        android:layout_marginStart="@dimen/horizontalMargin"
31
+        android:layout_marginEnd="@dimen/horizontalMargin"
32
+        android:layout_marginBottom="@dimen/verticalMargin"
33
+        android:background="@drawable/button_background"
34
+        android:fontFamily="sans-serif-black"
35
+        android:paddingHorizontal="@dimen/buttonHorizontalPadding"
36
+        android:paddingVertical="@dimen/buttonVerticalPadding"
37
+        android:text="@string/recoverAccountButtonText"
38
+        android:textColor="@android:color/white"
39
+        android:textSize="@dimen/buttonTextSize"
34
         android:textStyle="bold"
40
         android:textStyle="bold"
35
         app:layout_constraintBottom_toBottomOf="parent"
41
         app:layout_constraintBottom_toBottomOf="parent"
36
         app:layout_constraintEnd_toEndOf="parent"
42
         app:layout_constraintEnd_toEndOf="parent"
37
-        app:layout_constraintHorizontal_bias="0.56"
43
+        app:layout_constraintHeight_max="@dimen/buttonMaxHeight"
38
         app:layout_constraintStart_toStartOf="parent"
44
         app:layout_constraintStart_toStartOf="parent"
39
-        app:layout_constraintTop_toBottomOf="@+id/textView5"
40
-        app:layout_constraintVertical_bias="0.405" />
41
-
42
-    <ImageView
43
-        android:id="@+id/imageView"
44
-        android:layout_width="339dp"
45
-        android:layout_height="137dp"
46
-        app:layout_constraintBottom_toTopOf="@+id/recoverButton"
47
-        app:layout_constraintEnd_toEndOf="parent"
48
-        app:layout_constraintStart_toStartOf="parent"
49
-        app:layout_constraintTop_toBottomOf="@+id/textView5"
50
-        app:layout_constraintVertical_bias="0.382"
51
-        app:srcCompat="@drawable/login_rectangle" />
45
+        app:layout_constraintTop_toBottomOf="@+id/accountRecoveryTitle" />
52
 
46
 
53
     <TextView
47
     <TextView
54
         android:id="@+id/emailLabelRecover"
48
         android:id="@+id/emailLabelRecover"
55
         android:layout_width="wrap_content"
49
         android:layout_width="wrap_content"
56
-        android:layout_height="wrap_content"
57
-        android:fontFamily="@font/acme"
58
-        android:text="Email:"
59
-        android:textColor="@color/colorPrimary"
60
-        android:textSize="18sp"
61
-        app:layout_constraintBottom_toTopOf="@+id/passwordLabelRecover"
50
+        android:layout_height="@dimen/accountRecoveryTextFieldHeight"
51
+        android:layout_marginStart="@dimen/horizontalMargin"
52
+        android:layout_marginTop="32dp"
53
+        android:layout_marginEnd="16dp"
54
+        android:fontFamily="@font/cabin"
55
+        android:gravity="center"
56
+        android:text="@string/emailInputLabelText"
57
+        android:textSize="@dimen/accountRecoveryLabelTextSize"
62
         app:layout_constraintEnd_toStartOf="@+id/emailTextRecover"
58
         app:layout_constraintEnd_toStartOf="@+id/emailTextRecover"
63
-        app:layout_constraintHorizontal_bias="0.939"
64
         app:layout_constraintStart_toStartOf="parent"
59
         app:layout_constraintStart_toStartOf="parent"
65
-        app:layout_constraintTop_toTopOf="@+id/imageView"
66
-        app:layout_constraintVertical_bias="0.53" />
60
+        app:layout_constraintTop_toBottomOf="@id/accountRecoveryTitle" />
67
 
61
 
68
     <TextView
62
     <TextView
69
         android:id="@+id/passwordLabelRecover"
63
         android:id="@+id/passwordLabelRecover"
70
         android:layout_width="wrap_content"
64
         android:layout_width="wrap_content"
71
-        android:layout_height="wrap_content"
72
-        android:fontFamily="@font/acme"
73
-        android:text="Password:"
74
-        android:textColor="@color/colorPrimary"
75
-        android:textSize="18sp"
76
-        app:layout_constraintBottom_toBottomOf="@+id/imageView"
77
-        app:layout_constraintEnd_toStartOf="@+id/passwordTextRecover"
78
-        app:layout_constraintHorizontal_bias="0.915"
79
-        app:layout_constraintStart_toStartOf="parent"
80
-        app:layout_constraintTop_toTopOf="@+id/imageView"
81
-        app:layout_constraintVertical_bias="0.69" />
65
+        android:layout_height="@dimen/accountRecoveryTextFieldHeight"
66
+        android:layout_marginTop="16dp"
67
+        android:fontFamily="@font/cabin"
68
+        android:gravity="center"
69
+        android:text="@string/passwordInputLabelText"
70
+        android:textSize="@dimen/accountRecoveryLabelTextSize"
71
+        app:layout_constraintStart_toStartOf="@id/emailLabelRecover"
72
+        app:layout_constraintTop_toBottomOf="@id/emailTextRecover" />
82
 
73
 
83
     <EditText
74
     <EditText
84
         android:id="@+id/passwordTextRecover"
75
         android:id="@+id/passwordTextRecover"
85
-        android:layout_width="192dp"
86
-        android:layout_height="40dp"
76
+        android:layout_width="@dimen/accountRecoveryTextFieldWidth"
77
+        android:layout_height="@dimen/accountRecoveryTextFieldHeight"
78
+        android:autofillHints="AUTOFILL_HINT_PASSWORD"
87
         android:backgroundTint="@color/colorPrimary"
79
         android:backgroundTint="@color/colorPrimary"
88
-        android:ems="10"
89
         android:hint="@string/rss_password"
80
         android:hint="@string/rss_password"
90
         android:inputType="textPassword"
81
         android:inputType="textPassword"
91
         android:textColor="@color/textColor2"
82
         android:textColor="@color/textColor2"
92
-        app:layout_constraintBottom_toBottomOf="@+id/imageView"
93
-        app:layout_constraintEnd_toEndOf="@+id/imageView"
94
-        app:layout_constraintHorizontal_bias="0.734"
95
-        app:layout_constraintStart_toStartOf="@+id/imageView"
96
-        app:layout_constraintTop_toTopOf="@+id/imageView"
97
-        app:layout_constraintVertical_bias="0.731" />
83
+        app:layout_constraintStart_toStartOf="@id/emailTextRecover"
84
+        app:layout_constraintTop_toTopOf="@id/passwordLabelRecover" />
98
 
85
 
99
     <EditText
86
     <EditText
100
         android:id="@+id/emailTextRecover"
87
         android:id="@+id/emailTextRecover"
101
-        android:layout_width="192dp"
102
-        android:layout_height="40dp"
88
+        android:layout_width="@dimen/accountRecoveryTextFieldWidth"
89
+        android:layout_height="@dimen/accountRecoveryTextFieldHeight"
90
+        android:layout_marginEnd="@dimen/horizontalMargin"
91
+        android:autofillHints="AUTOFILL_HINT_EMAIL_ADDRESS"
103
         android:backgroundTint="@color/colorPrimary"
92
         android:backgroundTint="@color/colorPrimary"
104
         android:ems="10"
93
         android:ems="10"
105
         android:hint="@string/rsb_email"
94
         android:hint="@string/rsb_email"
106
         android:inputType="textEmailAddress"
95
         android:inputType="textEmailAddress"
107
         android:textColor="@color/textColor2"
96
         android:textColor="@color/textColor2"
108
-        app:layout_constraintBottom_toTopOf="@+id/passwordTextRecover"
109
-        app:layout_constraintEnd_toEndOf="@+id/imageView"
110
-        app:layout_constraintHorizontal_bias="0.734"
111
-        app:layout_constraintStart_toStartOf="@+id/imageView"
112
-        app:layout_constraintTop_toTopOf="@+id/imageView"
113
-        app:layout_constraintVertical_bias="0.638" />
97
+        app:layout_constraintEnd_toEndOf="parent"
98
+        app:layout_constraintStart_toEndOf="@+id/emailLabelRecover"
99
+        app:layout_constraintTop_toTopOf="@id/emailLabelRecover" />
114
 
100
 
115
     <Button
101
     <Button
116
         android:id="@+id/forgotPasswordButton"
102
         android:id="@+id/forgotPasswordButton"
117
-        android:layout_width="329dp"
118
-        android:layout_height="49dp"
119
-        android:background="@color/colorPrimaryDark"
120
-        android:text="@string/rss_forgot_password"
121
-        android:textColor="@color/textColor1"
103
+        android:layout_width="0dp"
104
+        android:layout_height="wrap_content"
105
+        android:layout_marginStart="@dimen/horizontalMargin"
106
+        android:layout_marginTop="16dp"
107
+        android:layout_marginEnd="@dimen/horizontalMargin"
108
+        android:background="@drawable/button_background"
109
+        android:paddingHorizontal="@dimen/buttonHorizontalPadding"
110
+        android:paddingVertical="@dimen/buttonVerticalPadding"
111
+        android:text="@string/forgotPasswordButtonText"
112
+        android:textColor="@android:color/white"
122
         android:textSize="18sp"
113
         android:textSize="18sp"
123
         android:textStyle="bold"
114
         android:textStyle="bold"
124
-        app:layout_constraintBottom_toBottomOf="parent"
125
         app:layout_constraintEnd_toEndOf="parent"
115
         app:layout_constraintEnd_toEndOf="parent"
126
-        app:layout_constraintHorizontal_bias="0.56"
127
         app:layout_constraintStart_toStartOf="parent"
116
         app:layout_constraintStart_toStartOf="parent"
128
-        app:layout_constraintTop_toBottomOf="@+id/recoverButton"
129
-        app:layout_constraintVertical_bias="0.075" />
117
+        app:layout_constraintTop_toBottomOf="@+id/recoverButton" />
130
 
118
 
131
 </androidx.constraintlayout.widget.ConstraintLayout>
119
 </androidx.constraintlayout.widget.ConstraintLayout>

+ 3
- 0
app/src/main/res/values/dimens.xml View File

14
     <dimen name="buttonTextSize">24sp</dimen>
14
     <dimen name="buttonTextSize">24sp</dimen>
15
     <dimen name="mainActivityToolbarHeight">54dp</dimen>
15
     <dimen name="mainActivityToolbarHeight">54dp</dimen>
16
     <dimen name="bubbleSize">18dp</dimen>
16
     <dimen name="bubbleSize">18dp</dimen>
17
+    <dimen name="accountRecoveryTextFieldWidth">192dp</dimen>
18
+    <dimen name="accountRecoveryTextFieldHeight">40dp</dimen>
19
+    <dimen name="accountRecoveryLabelTextSize">18sp</dimen>
17
 </resources>
20
 </resources>

+ 4
- 0
app/src/main/res/values/strings.xml View File

78
     <string name="dataUseConsentSectionSummaryText">The data obtained will be used to improve academic offerings and research experiences. The results of this study may be part of a scientific publication on science education strategies and will serve as a basis to improve the teaching curriculum.</string>
78
     <string name="dataUseConsentSectionSummaryText">The data obtained will be used to improve academic offerings and research experiences. The results of this study may be part of a scientific publication on science education strategies and will serve as a basis to improve the teaching curriculum.</string>
79
     <string name="dataUseConsentSectionContentText">It may be used to develop proposals for obtaining external funds for research. The officials of the Río Piedras Campus of the University of Puerto Rico and / or federal agencies responsible for ensuring the integrity of the research may require the researcher to prove the data obtained in this study, including this informed consent. The information handled by your device can be intervened or revised by third parties. These people can be people with legitimate or illegitimate access to the device and its content such as a family member, employer, hackers, intruders, etc. In addition, the device that you use may keep track of the information you access or send over the Internet.</string>
79
     <string name="dataUseConsentSectionContentText">It may be used to develop proposals for obtaining external funds for research. The officials of the Río Piedras Campus of the University of Puerto Rico and / or federal agencies responsible for ensuring the integrity of the research may require the researcher to prove the data obtained in this study, including this informed consent. The information handled by your device can be intervened or revised by third parties. These people can be people with legitimate or illegitimate access to the device and its content such as a family member, employer, hackers, intruders, etc. In addition, the device that you use may keep track of the information you access or send over the Internet.</string>
80
     <string name="generalTitleText">General</string>
80
     <string name="generalTitleText">General</string>
81
+    <string name="accountRecoveryTitleText">LOG IN TO ACCOUNT</string>
82
+    <string name="forgotPasswordButtonText">Forgot Password</string>
83
+    <string name="emailInputLabelText">Email:</string>
84
+    <string name="passwordInputLabelText">Password:</string>
81
 </resources>
85
 </resources>