更加精致,调整间距

This commit is contained in:
2024-09-09 07:02:43 +08:00
parent d33743894a
commit 7617c48f54
4 changed files with 17 additions and 22 deletions

View File

@@ -5,7 +5,7 @@ import android.content.Context
object ConstVars { object ConstVars {
// api 地址 // api 地址
// const val BASE_SERVER = "http://192.168.31.190:8088" const val BASE_SERVER = "https://8.137.22.101:8088" // const val BASE_SERVER = "http://192.168.31.190:8088" const val BASE_SERVER = "https://8.137.22.101:8088"
// const val BASE_SERVER = "http://192.168.31.36:8088" const val BASE_SERVER = "https://8.137.22.101:8088"
const val MOMENT_LIKE_CHANNEL_ID = "moment_like" const val MOMENT_LIKE_CHANNEL_ID = "moment_like"
const val MOMENT_LIKE_CHANNEL_NAME = "Moment Like" const val MOMENT_LIKE_CHANNEL_NAME = "Moment Like"

View File

@@ -101,7 +101,6 @@ fun MomentsList() {
Column( Column(
modifier = Modifier modifier = Modifier
.fillMaxSize() .fillMaxSize()
.padding( .padding(
top = statusBarPaddingValues.calculateTopPadding(), top = statusBarPaddingValues.calculateTopPadding(),
bottom = navigationBarPaddings bottom = navigationBarPaddings
@@ -143,7 +142,7 @@ fun MomentsList() {
) )
Box( Box(
modifier = Modifier modifier = Modifier
.height(16.dp) .height(4.dp)
.fillMaxWidth() .fillMaxWidth()
.background(Color(0xFFF0F2F5)) .background(Color(0xFFF0F2F5))
) )

View File

@@ -390,6 +390,7 @@ fun UserInformationFollowers(modifier: Modifier, accountProfileEntity: AccountPr
text = stringResource(R.string.followers_upper), text = stringResource(R.string.followers_upper),
fontSize = 12.sp, fontSize = 12.sp,
color = Color.Black, color = Color.Black,
style = TextStyle(fontWeight = FontWeight.Bold)
) )
} }
} }
@@ -802,7 +803,7 @@ fun MomentCardTopContent(content: String) {
verticalAlignment = Alignment.CenterVertically verticalAlignment = Alignment.CenterVertically
) { ) {
Text( Text(
modifier = Modifier.padding(16.dp), modifier = Modifier.padding(top = 16.dp, bottom = 0.dp, start = 16.dp, end = 16.dp),
text = content, fontSize = 16.sp, color = Color.Black text = content, fontSize = 16.sp, color = Color.Black
) )
} }
@@ -818,7 +819,7 @@ fun MomentCardPicture(imageUrl: String, momentEntity: MomentEntity) {
modifier = Modifier modifier = Modifier
.fillMaxSize() .fillMaxSize()
.aspectRatio(3f / 2f) .aspectRatio(3f / 2f)
.padding(16.dp) .padding(top = 16.dp)
.noRippleClickable { .noRippleClickable {
// PostViewModel.preTransit(momentEntity) // PostViewModel.preTransit(momentEntity)
navController.navigate( navController.navigate(
@@ -840,20 +841,20 @@ fun MomentCardOperation(like: String, comment: String) {
Row( Row(
modifier = Modifier modifier = Modifier
.fillMaxWidth() .fillMaxWidth()
.height(56.dp), .height(48.dp),
horizontalArrangement = Arrangement.Start, horizontalArrangement = Arrangement.End,
verticalAlignment = Alignment.CenterVertically verticalAlignment = Alignment.CenterVertically
) { ) {
Spacer(modifier = Modifier.weight(1f)) // Spacer(modifier = Modifier.weight(1f))
MomentCardOperationItem( MomentCardOperationItem(
drawable = R.drawable.rider_pro_like, drawable = R.drawable.rider_pro_like,
number = like, number = like,
modifier = Modifier.weight(1f) modifier = Modifier.padding(end = 32.dp)
) )
MomentCardOperationItem( MomentCardOperationItem(
drawable = R.drawable.rider_pro_moment_comment, drawable = R.drawable.rider_pro_moment_comment,
number = comment, number = comment,
modifier = Modifier.weight(1f) modifier = Modifier.padding(end = 32.dp)
) )
} }
} }

View File

@@ -31,7 +31,10 @@ import androidx.compose.foundation.pager.rememberPagerState
import androidx.compose.foundation.shape.CircleShape import androidx.compose.foundation.shape.CircleShape
import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.foundation.text.ClickableText import androidx.compose.foundation.text.ClickableText
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Delete
import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.material3.ExperimentalMaterial3Api
import androidx.compose.material3.Icon
import androidx.compose.material3.ModalBottomSheet import androidx.compose.material3.ModalBottomSheet
import androidx.compose.material3.Scaffold import androidx.compose.material3.Scaffold
import androidx.compose.material3.Text import androidx.compose.material3.Text
@@ -930,12 +933,8 @@ fun PostMenuModal(
onDeleteClick() onDeleteClick()
} }
) { ) {
Image( Icon(imageVector = Icons.Default.Delete, contentDescription = "Delete",
painter = painterResource(id = R.drawable.rider_pro_delete), modifier = Modifier.size(24.dp))
contentDescription = "Delete",
modifier = Modifier.size(24.dp),
colorFilter = ColorFilter.tint(Color.Black)
)
} }
Spacer(modifier = Modifier.height(8.dp)) Spacer(modifier = Modifier.height(8.dp))
@@ -977,12 +976,8 @@ fun CommentMenuModal(
onDeleteClick() onDeleteClick()
} }
) { ) {
Image( Icon(imageVector = Icons.Default.Delete, contentDescription = "Delete",
painter = painterResource(id = R.drawable.rider_pro_delete), modifier = Modifier.size(24.dp))
contentDescription = "Delete",
modifier = Modifier.size(24.dp),
colorFilter = ColorFilter.tint(Color.Black)
)
} }
Spacer(modifier = Modifier.height(8.dp)) Spacer(modifier = Modifier.height(8.dp))