From 08141eb59246a73b040b18e0d567e888c6a3958c Mon Sep 17 00:00:00 2001 From: arinming Date: Thu, 26 Sep 2024 18:36:17 +0900 Subject: [PATCH 1/3] =?UTF-8?q?[FIX/#267]=20=ED=83=90=EC=83=89=20=EB=A9=94?= =?UTF-8?q?=EC=9D=B8=20=ED=99=94=EB=A9=B4=20=EA=B8=B0=EC=97=85=20=EC=9D=B4?= =?UTF-8?q?=EB=AF=B8=EC=A7=80=20contentScale=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/terning/feature/search/search/component/SearchIntern.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/feature/src/main/java/com/terning/feature/search/search/component/SearchIntern.kt b/feature/src/main/java/com/terning/feature/search/search/component/SearchIntern.kt index 3d11ab374..cdc1f8971 100644 --- a/feature/src/main/java/com/terning/feature/search/search/component/SearchIntern.kt +++ b/feature/src/main/java/com/terning/feature/search/search/component/SearchIntern.kt @@ -70,7 +70,7 @@ fun SearchIntern( .crossfade(true) .build(), contentDescription = stringResource(id = R.string.search_image), - contentScale = ContentScale.Crop, + contentScale = ContentScale.FillWidth, modifier = Modifier .height(76.dp) .wrapContentSize() From f575ffea6925d02a5ed36ba51cf908c5eb7e5696 Mon Sep 17 00:00:00 2001 From: arinming Date: Fri, 27 Sep 2024 00:28:59 +0900 Subject: [PATCH 2/3] =?UTF-8?q?[FIX/#267]=20=EA=B3=B5=EA=B3=A0=20=EC=83=81?= =?UTF-8?q?=EC=84=B8=20=ED=8E=98=EC=9D=B4=EC=A7=80=20QA=20=EC=82=AC?= =?UTF-8?q?=ED=95=AD=20=EB=B0=98=EC=98=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../terning/feature/intern/component/InternTitle.kt | 10 +++++----- feature/src/main/res/values/strings.xml | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/feature/src/main/java/com/terning/feature/intern/component/InternTitle.kt b/feature/src/main/java/com/terning/feature/intern/component/InternTitle.kt index 0d6a34e7c..9fa882d66 100644 --- a/feature/src/main/java/com/terning/feature/intern/component/InternTitle.kt +++ b/feature/src/main/java/com/terning/feature/intern/component/InternTitle.kt @@ -5,7 +5,9 @@ import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.width import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.material3.Text import androidx.compose.runtime.Composable @@ -38,7 +40,9 @@ fun InternTitle( .background( color = TerningSub3, shape = RoundedCornerShape(size = 5.dp) - ), + ) + .width(70.dp) + .height(25.dp), horizontalArrangement = Arrangement.Center, verticalAlignment = Alignment.CenterVertically ) { @@ -46,10 +50,6 @@ fun InternTitle( text = dDay, style = TerningTheme.typography.title3, color = TerningMain, - modifier = Modifier.padding( - horizontal = 19.5.dp, - vertical = 1.5.dp - ) ) } diff --git a/feature/src/main/res/values/strings.xml b/feature/src/main/res/values/strings.xml index b555c1064..61a377abc 100644 --- a/feature/src/main/res/values/strings.xml +++ b/feature/src/main/res/values/strings.xml @@ -130,7 +130,7 @@ 공유 아이콘 지원 사이트로 이동하기 - 공고 정보 + 공고 상세 정보 %s회 서류 마감 근무 기간 From 7dfb8e41c8bfa91994802ee2bd25fb2ca022567a Mon Sep 17 00:00:00 2001 From: arinming Date: Fri, 27 Sep 2024 00:34:12 +0900 Subject: [PATCH 3/3] =?UTF-8?q?[FIX/#267]=20=EB=B0=B0=EB=84=88=20=EB=AC=B4?= =?UTF-8?q?=ED=95=9C=20=EC=8A=A4=ED=81=AC=EB=A1=A4=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../search/search/component/ImageSlider.kt | 26 ++++++++++++++----- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/feature/src/main/java/com/terning/feature/search/search/component/ImageSlider.kt b/feature/src/main/java/com/terning/feature/search/search/component/ImageSlider.kt index 024739411..dac7391db 100644 --- a/feature/src/main/java/com/terning/feature/search/search/component/ImageSlider.kt +++ b/feature/src/main/java/com/terning/feature/search/search/component/ImageSlider.kt @@ -27,7 +27,12 @@ fun ImageSlider( images: List, onAdvertisementClick: () -> Unit, ) { - val pagerState = rememberPagerState(pageCount = { images.size }) + val infiniteImages = remember { images + images + images } + val pagerState = rememberPagerState( + initialPage = images.size, + initialPageOffsetFraction = 0f, + pageCount = { infiniteImages.size } + ) val autoScroll = remember { mutableStateOf(true) } LaunchedEffect(autoScroll.value) { @@ -35,13 +40,21 @@ fun ImageSlider( while (true) { delay(2000) if (!pagerState.isScrollInProgress) { - val nextPage = (pagerState.currentPage + 1) % pagerState.pageCount + val nextPage = pagerState.currentPage + 1 pagerState.animateScrollToPage(nextPage) } } } } + LaunchedEffect(pagerState.currentPage) { + if (pagerState.currentPage < images.size) { + pagerState.scrollToPage(pagerState.currentPage + images.size) + } else if (pagerState.currentPage >= 2 * images.size) { + pagerState.scrollToPage(pagerState.currentPage - images.size) + } + } + Column( modifier .fillMaxWidth() @@ -54,10 +67,11 @@ fun ImageSlider( ) { HorizontalPager( state = pagerState, - modifier = modifier + modifier = modifier, + beyondViewportPageCount = infiniteImages.size ) { currentPage -> Image( - painter = painterResource(id = images[currentPage]), + painter = painterResource(id = infiniteImages[currentPage % images.size]), contentDescription = null, modifier = modifier .fillMaxWidth() @@ -68,8 +82,8 @@ fun ImageSlider( } DotsIndicator( pageCount = images.size, - currentPage = pagerState.currentPage + currentPage = pagerState.currentPage % images.size ) } } -} \ No newline at end of file +}