From 525873034bf2493622a38ad2a158dc8bebd9becb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B0=D1=88=D0=B8=D0=BD=20=D0=9C=D0=B0=D0=BA=D1=81?= =?UTF-8?q?=D0=B8=D0=BC?= Date: Sat, 28 Oct 2023 01:14:45 +0400 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=BE=D0=B4=D0=BF=D1=80=D0=B0=D0=B2?= =?UTF-8?q?=D0=B8=D0=BB=20=D1=81=D0=BF=D0=B8=D1=81=D0=BE=D0=BA,=20=D1=83?= =?UTF-8?q?=D0=B6=D0=B5=20=D0=B2=D1=80=D0=B5=D0=BC=D1=8F=20=D0=BC=D0=BD?= =?UTF-8?q?=D0=BE=D0=B3=D0=BE,=20=D0=BD=D0=B0=D0=B4=D0=BE=20=D0=BE=D0=B1?= =?UTF-8?q?=D0=BD=D0=BE=D0=B2=D0=B8=D1=82=D1=8C=20=D0=BC=D0=BE=D0=B4=D0=B5?= =?UTF-8?q?=D0=BB=D1=8C=20=D0=B8=20=D1=81=D0=BF=D0=B0=D1=82=D1=8C...?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/example/labwork/pages/ListProduct.kt | 50 +++++++++++++++++-- 1 file changed, 45 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/com/example/labwork/pages/ListProduct.kt b/app/src/main/java/com/example/labwork/pages/ListProduct.kt index 2c77304..2c9e464 100644 --- a/app/src/main/java/com/example/labwork/pages/ListProduct.kt +++ b/app/src/main/java/com/example/labwork/pages/ListProduct.kt @@ -61,26 +61,62 @@ fun ListProduct(item: ItemProduct) { contentScale = ContentScale.Crop, modifier = Modifier .padding(10.dp) - .size(94.dp) + .size(128.dp) .shadow(2.dp) ) Button( colors = ButtonDefaults.buttonColors(backgroundColor = LightBluePolitech), modifier = Modifier .padding(start = 9.dp, bottom = 9.dp) - .size(height = 32.dp, width = 95.dp), + .size(height = 32.dp, width = 128.dp), onClick = { isFullAbout = !isFullAbout }, shape = RoundedCornerShape(15.dp) ) { Text( - text = "Подробнее", + text = if(isFullAbout) "Убрать" else "Подробнее", color = Color.White, fontSize = 10.sp, 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 { Text( @@ -89,7 +125,9 @@ fun ListProduct(item: ItemProduct) { fontSize = textSize.value.sp, fontWeight = FontWeight.Bold, textAlign = TextAlign.Center, - modifier = Modifier.fillMaxWidth().padding(top = 8.dp) + modifier = Modifier + .fillMaxWidth() + .padding(top = 8.dp) ) AnimatedVisibility( visible = isFullAbout, @@ -103,7 +141,9 @@ fun ListProduct(item: ItemProduct) { maxLines = 10, fontSize = 14.sp, textAlign = TextAlign.Center, - modifier = Modifier.fillMaxWidth().padding(bottom = 8.dp) + modifier = Modifier + .fillMaxWidth() + .padding(bottom = 8.dp) ) } }