软件首页样式调整

This commit is contained in:
2024-10-11 02:09:08 +08:00
parent 0c17793a84
commit d728ef2043
3 changed files with 25 additions and 22 deletions

View File

@@ -5,10 +5,12 @@ import androidx.compose.animation.animateColorAsState
import androidx.compose.animation.core.tween
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Box
//import androidx.compose.foundation.layout.ColumnScopeInstance.weight
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.shape.RoundedCornerShape
@@ -56,7 +58,7 @@ fun ActionButton(
disabledBackgroundColor
}
},
animationSpec = tween(300)
animationSpec = tween(300), label = ""
)
Box(
modifier = modifier
@@ -71,28 +73,29 @@ fun ActionButton(
contentAlignment = Alignment.CenterStart
) {
if (!isLoading) {
Row(
modifier = Modifier.align(Alignment.Center),
verticalAlignment = Alignment.CenterVertically
Box(
modifier = Modifier
.align(Alignment.Center)
.fillMaxWidth(),
contentAlignment = Alignment.Center
) {
leading?.invoke()
Box(modifier = Modifier.align(Alignment.CenterStart)){
leading?.invoke()
}
Text(
text,
fontSize = 14.sp,
fontSize = 17.sp,
color = color,
fontWeight = FontWeight.W600,
modifier = Modifier.let {
if (expandText) it.weight(1f) else it
},
fontWeight = FontWeight.W900,
textAlign = if (expandText) TextAlign.Center else TextAlign.Start
)
}
}else{
Row(
Box(
modifier = Modifier
.fillMaxWidth()
.padding(horizontal = 16.dp),
verticalAlignment = Alignment.CenterVertically,
contentAlignment = Alignment.Center
) {
Box(
modifier = Modifier.fillMaxWidth(),

View File

@@ -174,11 +174,11 @@ fun LoginPage() {
)
Spacer(modifier = Modifier.height(32.dp))
Text(
"Connecting Riders".uppercase(),
"Connecting Riders",
fontSize = 28.sp,
fontWeight = FontWeight.W600
fontWeight = FontWeight.W900
)
Text("Worldwide".uppercase(), fontSize = 28.sp, fontWeight = FontWeight.W600)
Text("Worldwide", fontSize = 28.sp, fontWeight = FontWeight.W900)
}
}
@@ -210,15 +210,15 @@ fun LoginPage() {
) {
googleLogin()
}
Spacer(modifier = Modifier.height(32.dp))
Spacer(modifier = Modifier.height(24.dp))
Box(
contentAlignment = Alignment.Center,
modifier = Modifier.fillMaxWidth()
) {
Text(
stringResource(R.string.login_upper),
fontSize = 16.sp,
fontWeight = FontWeight.W600,
fontSize = 17.sp,
fontWeight = FontWeight.W900,
color = Color(0xff333333),
modifier = Modifier.noRippleClickable {
navController.navigate(

View File

@@ -17,7 +17,7 @@
<string name="comment_count">%d Comments</string>
<string name="post_comment_hint">Say something...</string>
<string name="follow_upper">FOLLOW</string>
<string name="login_upper">LOGIN</string>
<string name="login_upper">Log in</string>
<string name="lets_ride_upper">LET\'S RIDE</string>
<string name="or_login_with">or login with</string>
<string name="remember_me">Remember me.</string>
@@ -28,9 +28,9 @@
<string name="text_error_password_required">Password is required</string>
<string name="text_hint_email">Enter your email</string>
<string name="text_hint_password">Enter your password</string>
<string name="sign_up_upper">SIGN UP</string>
<string name="sign_in_with_email">CONTINUE WITH EMAIL</string>
<string name="sign_in_with_google">CONTINUE WITH GOOGLE</string>
<string name="sign_up_upper">Sign Up</string>
<string name="sign_in_with_email">Connect with Email</string>
<string name="sign_in_with_google">Connect with Google</string>
<string name="back_upper">BACK</string>
<string name="text_hint_confirm_password">Enter your password again</string>
<string name="login_confirm_password_label">Confirm password</string>