资源文件替换

This commit is contained in:
2025-11-06 20:56:20 +08:00
parent 6fffa0447e
commit 2b30beb367
5 changed files with 10 additions and 8 deletions

View File

@@ -10,6 +10,7 @@ import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier import androidx.compose.ui.Modifier
import androidx.compose.ui.draw.clip import androidx.compose.ui.draw.clip
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.res.stringResource import androidx.compose.ui.res.stringResource
import androidx.compose.ui.text.TextStyle import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.font.FontWeight import androidx.compose.ui.text.font.FontWeight
@@ -32,7 +33,7 @@ fun FollowButton(
.wrapContentWidth() .wrapContentWidth()
.clip(RoundedCornerShape(8.dp)) .clip(RoundedCornerShape(8.dp))
.background( .background(
color = if (isFollowing) AppColors.main else AppColors.nonActive color = if (isFollowing) AppColors.nonActive else AppColors.nonActive
) )
.padding(horizontal = 16.dp, vertical = 8.dp) .padding(horizontal = 16.dp, vertical = 8.dp)
.noRippleClickable { .noRippleClickable {
@@ -41,11 +42,9 @@ fun FollowButton(
contentAlignment = Alignment.Center contentAlignment = Alignment.Center
) { ) {
Text( Text(
text = if (isFollowing) stringResource(R.string.following_upper) else stringResource( text = if (isFollowing) stringResource(R.string.follow_upper_had) else stringResource(R.string.follow_upper),
R.string.follow_upper
),
fontSize = fontSize, fontSize = fontSize,
color = if (isFollowing) AppColors.mainText else AppColors.text, color = if (isFollowing) AppColors.text else AppColors.text,
style = TextStyle(fontWeight = FontWeight.Bold) style = TextStyle(fontWeight = FontWeight.Bold)
) )
} }

View File

@@ -98,7 +98,7 @@ fun OtherProfileAction(
} }
) { ) {
Text( Text(
text = if (profile.isFollowing) "已关注" else stringResource(R.string.follow_upper), text = if (profile.isFollowing) stringResource(R.string.follow_upper_had) else stringResource(R.string.follow_upper),
fontSize = 14.sp, fontSize = 14.sp,
fontWeight = FontWeight.W900, fontWeight = FontWeight.W900,
color = if (profile.isFollowing) { color = if (profile.isFollowing) {

View File

@@ -20,6 +20,7 @@
<string name="comment_count">%d コメント</string> <string name="comment_count">%d コメント</string>
<string name="post_comment_hint">何か言ってください</string> <string name="post_comment_hint">何か言ってください</string>
<string name="follow_upper">フォロー</string> <string name="follow_upper">フォロー</string>
<string name="follow_upper_had">フォローしました</string>
<string name="login_upper">ログイン</string> <string name="login_upper">ログイン</string>
<string name="lets_ride_upper">レッツ・レヴ・ナウ</string> <string name="lets_ride_upper">レッツ・レヴ・ナウ</string>
<string name="or_login_with">または</string> <string name="or_login_with">または</string>

View File

@@ -14,11 +14,12 @@
<string name="followers_upper">粉丝</string> <string name="followers_upper">粉丝</string>
<string name="favourites_upper">收藏</string> <string name="favourites_upper">收藏</string>
<string name="notifications_upper">消息</string> <string name="notifications_upper">消息</string>
<string name="following_upper">关注</string> <string name="following_upper">关注11</string>
<string name="unfollow_upper">取消关注</string> <string name="unfollow_upper">取消关注</string>
<string name="comment_count">%d条评论</string> <string name="comment_count">%d条评论</string>
<string name="post_comment_hint">快来互动吧...</string> <string name="post_comment_hint">快来互动吧...</string>
<string name="follow_upper">关注</string> <string name="follow_upper">关注3</string>
<string name="follow_upper_had">已关注</string>
<string name="login_upper">登录</string> <string name="login_upper">登录</string>
<string name="lets_ride_upper">确认</string> <string name="lets_ride_upper">确认</string>
<string name="or_login_with">其他账号登录</string> <string name="or_login_with">其他账号登录</string>

View File

@@ -19,6 +19,7 @@
<string name="comment_count">%d Comments</string> <string name="comment_count">%d Comments</string>
<string name="post_comment_hint">Say something…</string> <string name="post_comment_hint">Say something…</string>
<string name="follow_upper">FOLLOW</string> <string name="follow_upper">FOLLOW</string>
<string name="follow_upper_had">Followed</string>
<string name="login_upper">Log in</string> <string name="login_upper">Log in</string>
<string name="lets_ride_upper">Let\'s Rave Now</string> <string name="lets_ride_upper">Let\'s Rave Now</string>
<string name="or_login_with">or</string> <string name="or_login_with">or</string>