返回按钮修改

This commit is contained in:
2025-09-09 16:00:53 +08:00
parent f3a58c367c
commit 88e6a38cd6
2 changed files with 19 additions and 8 deletions
@@ -1,6 +1,7 @@
package com.sw.inbound.ui.weight package com.sw.inbound.ui.weight
import androidx.compose.foundation.Image import androidx.compose.foundation.Image
import androidx.compose.foundation.background
import androidx.compose.foundation.clickable import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.Row
@@ -10,6 +11,7 @@ import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size import androidx.compose.foundation.layout.size
import androidx.compose.foundation.layout.width import androidx.compose.foundation.layout.width
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.material3.Text import androidx.compose.material3.Text
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment import androidx.compose.ui.Alignment
@@ -47,22 +49,30 @@ fun BottomActionBar(
// 左侧图标+文字 // 左侧图标+文字
Row( Row(
verticalAlignment = Alignment.CenterVertically, verticalAlignment = Alignment.CenterVertically,
modifier = Modifier.clickable { horizontalArrangement = Arrangement.Center,
onLeftButtonClick() modifier = Modifier
} .width(220.dp)
.height(100.dp)
.background(
color = colorResource(R.color.blue),
shape = RoundedCornerShape(10.dp)
)
.clickable {
onLeftButtonClick()
}
) { ) {
Image( Image(
painter = painterResource(R.mipmap.ic_home), painter = painterResource(R.mipmap.ic_home2),
contentDescription = "返回", contentDescription = "返回",
modifier = Modifier.size(80.dp) modifier = Modifier.size(40.dp)
) )
Spacer(modifier = Modifier.width(17.dp)) Spacer(modifier = Modifier.width(21.dp))
Text( Text(
text = leftText, text = leftText,
style = TextStyle( style = TextStyle(
color = colorResource(R.color.black), color = colorResource(R.color.white),
fontWeight = FontWeight.Bold, fontWeight = FontWeight.Bold,
fontSize = 30.sp fontSize = 36.sp
) )
) )
} }
@@ -91,4 +101,5 @@ fun BottomActionBar(
) )
} }
} }
} }
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB