@@ -92,58 +92,70 @@ private fun LoginScreen(
92
92
) {
93
93
94
94
GradientBackground {
95
- Column (
96
- modifier = Modifier
97
- .verticalScroll(rememberScrollState())
98
- .fillMaxSize()
99
- .padding(horizontal = 16 .dp)
100
- .padding(vertical = 32 .dp)
101
- .padding(top = 16 .dp)
95
+ Box (
96
+ modifier = Modifier .fillMaxSize()
102
97
) {
103
- Text (
104
- text = stringResource(id = R .string.loggin_in),
105
- fontWeight = FontWeight .Bold ,
106
- style = MaterialTheme .typography.headlineMedium
107
- )
108
- Text (
109
- text = stringResource(id = R .string.gorun_wellcome_text),
110
- fontSize = 12 .sp,
111
- color = MaterialTheme .colorScheme.onSurfaceVariant
112
- )
113
-
114
- Spacer (modifier = Modifier .height(48 .dp))
115
-
116
- GoRunTextField (
117
- state = state.email,
118
- startIcon = EmailIcon ,
119
- endIcon = null ,
120
- hint = stringResource(id = R .string.example_email),
121
- title = stringResource(id = R .string.email),
122
- modifier = Modifier .padding(bottom = 16 .dp)
123
- )
124
- Spacer (modifier = Modifier .height(16 .dp))
125
-
126
- GoRunPasswordTextField (
127
- state = state.password,
128
- isPasswordVisible = state.isPasswordVisible,
129
- onTogglePasswordVisibility = { onAction(LoginAction .OnTogglePasswordVisibilityClick ) },
130
- hint = stringResource(id = R .string.password),
131
- title = stringResource(id = R .string.password),
132
- )
133
-
134
- Spacer (modifier = Modifier .height(32 .dp))
135
-
136
- GoRunActionButton (
137
- text = stringResource(id = R .string.login),
138
- isLoading = state.isLoggingIn,
139
- enabled = state.canLogin,
140
- onClick = {
141
- onAction(LoginAction .OnLoginClick )
142
- },
143
- )
144
-
145
- Spacer (modifier = Modifier .height(16 .dp))
146
- Row {
98
+ Column (
99
+ modifier = Modifier
100
+ .verticalScroll(rememberScrollState())
101
+ .fillMaxSize()
102
+ .padding(horizontal = 16 .dp)
103
+ .padding(vertical = 32 .dp)
104
+ .padding(top = 16 .dp)
105
+ ) {
106
+ Text (
107
+ text = stringResource(id = R .string.loggin_in),
108
+ fontWeight = FontWeight .Bold ,
109
+ style = MaterialTheme .typography.headlineMedium
110
+ )
111
+ Text (
112
+ text = stringResource(id = R .string.gorun_wellcome_text),
113
+ fontSize = 12 .sp,
114
+ color = MaterialTheme .colorScheme.onSurfaceVariant
115
+ )
116
+
117
+ Spacer (modifier = Modifier .height(48 .dp))
118
+
119
+ GoRunTextField (
120
+ state = state.email,
121
+ startIcon = EmailIcon ,
122
+ endIcon = null ,
123
+ hint = stringResource(id = R .string.example_email),
124
+ title = stringResource(id = R .string.email),
125
+ modifier = Modifier .padding(bottom = 16 .dp)
126
+ )
127
+ Spacer (modifier = Modifier .height(16 .dp))
128
+
129
+ GoRunPasswordTextField (
130
+ state = state.password,
131
+ isPasswordVisible = state.isPasswordVisible,
132
+ onTogglePasswordVisibility = { onAction(LoginAction .OnTogglePasswordVisibilityClick ) },
133
+ hint = stringResource(id = R .string.password),
134
+ title = stringResource(id = R .string.password),
135
+ )
136
+
137
+ Spacer (modifier = Modifier .height(32 .dp))
138
+
139
+ GoRunActionButton (
140
+ text = stringResource(id = R .string.login),
141
+ isLoading = state.isLoggingIn,
142
+ enabled = state.canLogin,
143
+ onClick = {
144
+ onAction(LoginAction .OnLoginClick )
145
+ },
146
+ )
147
+
148
+ Spacer (modifier = Modifier .height(16 .dp))
149
+
150
+
151
+
152
+ }
153
+ Row (
154
+ modifier = Modifier
155
+ .align(Alignment .BottomCenter )
156
+ .padding(bottom = 16 .dp
157
+
158
+ ) {
147
159
Text (
148
160
text = stringResource(id = R .string.dont_have_an_account) + " " ,
149
161
style = TextStyle (
@@ -152,7 +164,8 @@ private fun LoginScreen(
152
164
)
153
165
val annotatedString = buildAnnotatedString {
154
166
pushStringAnnotation(
155
- tag = " clickable_text" , annotation = stringResource(id = R .string.sign_up)
167
+ tag = " clickable_text" ,
168
+ annotation = stringResource(id = R .string.sign_up)
156
169
)
157
170
withStyle(
158
171
style = SpanStyle (
@@ -173,7 +186,6 @@ private fun LoginScreen(
173
186
174
187
})
175
188
}
176
-
177
189
}
178
190
}
179
191
}
0 commit comments