Подправил список, уже время много, надо обновить модель и спать...

This commit is contained in:
Кашин Максим 2023-10-28 01:14:45 +04:00
parent 4cdd07220a
commit 525873034b

View File

@ -61,26 +61,62 @@ fun ListProduct(item: ItemProduct) {
contentScale = ContentScale.Crop, contentScale = ContentScale.Crop,
modifier = Modifier modifier = Modifier
.padding(10.dp) .padding(10.dp)
.size(94.dp) .size(128.dp)
.shadow(2.dp) .shadow(2.dp)
) )
Button( Button(
colors = ButtonDefaults.buttonColors(backgroundColor = LightBluePolitech), colors = ButtonDefaults.buttonColors(backgroundColor = LightBluePolitech),
modifier = Modifier modifier = Modifier
.padding(start = 9.dp, bottom = 9.dp) .padding(start = 9.dp, bottom = 9.dp)
.size(height = 32.dp, width = 95.dp), .size(height = 32.dp, width = 128.dp),
onClick = { onClick = {
isFullAbout = !isFullAbout isFullAbout = !isFullAbout
}, },
shape = RoundedCornerShape(15.dp) shape = RoundedCornerShape(15.dp)
) { ) {
Text( Text(
text = "Подробнее", text = if(isFullAbout) "Убрать" else "Подробнее",
color = Color.White, color = Color.White,
fontSize = 10.sp, fontSize = 10.sp,
textAlign = TextAlign.Center, textAlign = TextAlign.Center,
) )
} }
Row {
Button(
colors = ButtonDefaults.buttonColors(backgroundColor = LightBluePolitech),
modifier = Modifier
.padding(start = 9.dp, bottom = 9.dp)
.size(height = 32.dp, width = 40.dp),
onClick = {
isFullAbout = !isFullAbout
},
shape = RoundedCornerShape(15.dp)
) {
Text(
text = "+",
color = Color.White,
fontSize = 10.sp,
textAlign = TextAlign.Center,
)
}
Button(
colors = ButtonDefaults.buttonColors(backgroundColor = LightBluePolitech),
modifier = Modifier
.padding(start = 9.dp, bottom = 9.dp)
.size(height = 32.dp, width = 40.dp),
onClick = {
isFullAbout = !isFullAbout
},
shape = RoundedCornerShape(15.dp)
) {
Text(
text = "-",
color = Color.White,
fontSize = 10.sp,
textAlign = TextAlign.Center,
)
}
}
} }
Column { Column {
Text( Text(
@ -89,7 +125,9 @@ fun ListProduct(item: ItemProduct) {
fontSize = textSize.value.sp, fontSize = textSize.value.sp,
fontWeight = FontWeight.Bold, fontWeight = FontWeight.Bold,
textAlign = TextAlign.Center, textAlign = TextAlign.Center,
modifier = Modifier.fillMaxWidth().padding(top = 8.dp) modifier = Modifier
.fillMaxWidth()
.padding(top = 8.dp)
) )
AnimatedVisibility( AnimatedVisibility(
visible = isFullAbout, visible = isFullAbout,
@ -103,7 +141,9 @@ fun ListProduct(item: ItemProduct) {
maxLines = 10, maxLines = 10,
fontSize = 14.sp, fontSize = 14.sp,
textAlign = TextAlign.Center, textAlign = TextAlign.Center,
modifier = Modifier.fillMaxWidth().padding(bottom = 8.dp) modifier = Modifier
.fillMaxWidth()
.padding(bottom = 8.dp)
) )
} }
} }