From 529a21b3098156f2eb6e8aa3c5d824ab45d7b379 Mon Sep 17 00:00:00 2001 From: mangbaam Date: Sun, 22 Dec 2024 01:10:17 +0900 Subject: [PATCH 01/27] =?UTF-8?q?Boolti-343=20style:=20edge=20to=20edge=20?= =?UTF-8?q?=ED=99=9C=EC=84=B1=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../boolti/presentation/screen/Main.kt | 6 +- .../presentation/screen/MainActivity.kt | 2 + .../presentation/screen/home/HomeScreen.kt | 2 +- .../presentation/screen/show/ShowScreen.kt | 121 +++++++++--------- .../boolti/presentation/theme/Theme.kt | 9 +- 5 files changed, 67 insertions(+), 73 deletions(-) diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/screen/Main.kt b/presentation/src/main/java/com/nexters/boolti/presentation/screen/Main.kt index 32c7e706..1d49edb1 100644 --- a/presentation/src/main/java/com/nexters/boolti/presentation/screen/Main.kt +++ b/presentation/src/main/java/com/nexters/boolti/presentation/screen/Main.kt @@ -1,5 +1,6 @@ package com.nexters.boolti.presentation.screen +import android.annotation.SuppressLint import android.content.Intent import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.padding @@ -58,6 +59,7 @@ val LocalSnackbarController = staticCompositionLocalOf { SnackbarController(SnackbarHostState()) } +@SuppressLint("UnusedMaterial3ScaffoldPaddingParameter") @Composable fun Main(onClickQrScan: (showId: String, showName: String) -> Unit) { val modifier = Modifier.fillMaxSize() @@ -73,7 +75,7 @@ fun Main(onClickQrScan: (showId: String, showName: String) -> Unit) { hostState = snackbarHostState, ) }, - ) { innerPadding -> + ) { CompositionLocalProvider( LocalSnackbarController provides SnackbarController( snackbarHostState, @@ -81,7 +83,7 @@ fun Main(onClickQrScan: (showId: String, showName: String) -> Unit) { ) ) { MainNavigation( - modifier = modifier.padding(innerPadding), + modifier = modifier, onClickQrScan = onClickQrScan, ) } diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/screen/MainActivity.kt b/presentation/src/main/java/com/nexters/boolti/presentation/screen/MainActivity.kt index d1ee937d..d7bfbe39 100644 --- a/presentation/src/main/java/com/nexters/boolti/presentation/screen/MainActivity.kt +++ b/presentation/src/main/java/com/nexters/boolti/presentation/screen/MainActivity.kt @@ -7,6 +7,7 @@ import android.os.Build import android.os.Bundle import androidx.activity.ComponentActivity import androidx.activity.compose.setContent +import androidx.activity.enableEdgeToEdge import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Surface @@ -26,6 +27,7 @@ import timber.log.Timber class MainActivity : ComponentActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) + enableEdgeToEdge() setContent { BooltiTheme { Surface( diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/screen/home/HomeScreen.kt b/presentation/src/main/java/com/nexters/boolti/presentation/screen/home/HomeScreen.kt index 878bf106..07f8b7a2 100644 --- a/presentation/src/main/java/com/nexters/boolti/presentation/screen/home/HomeScreen.kt +++ b/presentation/src/main/java/com/nexters/boolti/presentation/screen/home/HomeScreen.kt @@ -141,7 +141,7 @@ fun HomeScreen( ) ) { ShowScreen( - modifier = modifier.padding(innerPadding), + modifier = Modifier.padding(innerPadding), onClickShowItem = onClickShowItem, navigateToBusiness = navigateToBusiness, navigateToShowRegistration = { diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/screen/show/ShowScreen.kt b/presentation/src/main/java/com/nexters/boolti/presentation/screen/show/ShowScreen.kt index f612fc7b..43cbb8eb 100644 --- a/presentation/src/main/java/com/nexters/boolti/presentation/screen/show/ShowScreen.kt +++ b/presentation/src/main/java/com/nexters/boolti/presentation/screen/show/ShowScreen.kt @@ -27,7 +27,6 @@ import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.material3.Icon import androidx.compose.material3.MaterialTheme import androidx.compose.material3.OutlinedTextFieldDefaults -import androidx.compose.material3.Scaffold import androidx.compose.material3.Text import androidx.compose.material3.TextFieldDefaults import androidx.compose.runtime.Composable @@ -113,75 +112,71 @@ fun ShowScreen( } } - Scaffold( + Box( modifier = modifier.nestedScroll(nestedScrollConnection), - ) { innerPadding -> - Box( - modifier = Modifier.padding(innerPadding), - contentAlignment = Alignment.TopCenter, + contentAlignment = Alignment.TopCenter, + ) { + LazyVerticalGrid( + modifier = Modifier + .padding(horizontal = marginHorizontal), + state = lazyGridState, + columns = GridCells.Adaptive(minSize = 150.dp), + horizontalArrangement = Arrangement.spacedBy(15.dp), + verticalArrangement = Arrangement.spacedBy(28.dp), + contentPadding = PaddingValues(top = 12.dp + appbarHeight), ) { - LazyVerticalGrid( - modifier = Modifier - .padding(horizontal = marginHorizontal), - state = lazyGridState, - columns = GridCells.Adaptive(minSize = 150.dp), - horizontalArrangement = Arrangement.spacedBy(15.dp), - verticalArrangement = Arrangement.spacedBy(28.dp), - contentPadding = PaddingValues(top = 12.dp + appbarHeight), - ) { - items( - count = uiState.shows.size.coerceAtMost(4), - key = { index -> uiState.shows[index].id }) { index -> - ShowFeed( - show = uiState.shows[index], - modifier = Modifier - .clickable { onClickShowItem(uiState.shows[index].id) }, - ) - } + items( + count = uiState.shows.size.coerceAtMost(4), + key = { index -> uiState.shows[index].id }) { index -> + ShowFeed( + show = uiState.shows[index], + modifier = Modifier + .clickable { onClickShowItem(uiState.shows[index].id) }, + ) + } - // 4개의 공연 뒤 보이는 배너 - if (uiState.shows.isNotEmpty()) item( - span = { GridItemSpan(2) }, - ) { - Banner( - modifier = Modifier.fillMaxWidth(), - navigateToShowRegistration = navigateToShowRegistration, - ) - } + // 4개의 공연 뒤 보이는 배너 + if (uiState.shows.isNotEmpty()) item( + span = { GridItemSpan(2) }, + ) { + Banner( + modifier = Modifier.fillMaxWidth(), + navigateToShowRegistration = navigateToShowRegistration, + ) + } - // 나머지 공연 목록 - items( - count = (uiState.shows.size - 4).coerceAtLeast(0), - key = { index -> uiState.shows[index + 4].id }) { index -> - ShowFeed( - show = uiState.shows[index + 4], - modifier = Modifier - .clickable { onClickShowItem(uiState.shows[index + 4].id) }, - ) - } + // 나머지 공연 목록 + items( + count = (uiState.shows.size - 4).coerceAtLeast(0), + key = { index -> uiState.shows[index + 4].id }) { index -> + ShowFeed( + show = uiState.shows[index + 4], + modifier = Modifier + .clickable { onClickShowItem(uiState.shows[index + 4].id) }, + ) + } - item( - span = { GridItemSpan(2) }, - ) { - BusinessInformation( - modifier = Modifier.padding(bottom = 12.dp), - onClick = navigateToBusiness - ) - } + item( + span = { GridItemSpan(2) }, + ) { + BusinessInformation( + modifier = Modifier.padding(bottom = 12.dp), + onClick = navigateToBusiness + ) } - ShowAppBar( - modifier = Modifier.offset { - IntOffset( - x = 0, - y = appbarOffsetHeightPx.coerceAtLeast(-changeableAppBarHeightPx).toInt(), - ) - }, - nickname = nickname.ifBlank { stringResource(id = R.string.nickname_default) }, - text = uiState.keyword, - onKeywordChanged = viewModel::updateKeyword, - search = viewModel::search, - ) } + ShowAppBar( + modifier = Modifier.offset { + IntOffset( + x = 0, + y = appbarOffsetHeightPx.coerceAtLeast(-changeableAppBarHeightPx).toInt(), + ) + }, + nickname = nickname.ifBlank { stringResource(id = R.string.nickname_default) }, + text = uiState.keyword, + onKeywordChanged = viewModel::updateKeyword, + search = viewModel::search, + ) } } diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/theme/Theme.kt b/presentation/src/main/java/com/nexters/boolti/presentation/theme/Theme.kt index accf42e2..045d8bfc 100644 --- a/presentation/src/main/java/com/nexters/boolti/presentation/theme/Theme.kt +++ b/presentation/src/main/java/com/nexters/boolti/presentation/theme/Theme.kt @@ -1,14 +1,9 @@ package com.nexters.boolti.presentation.theme -import android.app.Activity import androidx.compose.material3.MaterialTheme import androidx.compose.material3.darkColorScheme import androidx.compose.material3.lightColorScheme import androidx.compose.runtime.Composable -import androidx.compose.runtime.SideEffect -import androidx.compose.ui.graphics.toArgb -import androidx.compose.ui.platform.LocalView -import androidx.core.view.WindowCompat private val DarkColorScheme = darkColorScheme( primary = Orange01, @@ -54,7 +49,7 @@ fun BooltiTheme( darkTheme -> DarkColorScheme else -> LightColorScheme } - val view = LocalView.current + /*val view = LocalView.current if (!view.isInEditMode) { SideEffect { val window = (view.context as Activity).window @@ -62,7 +57,7 @@ fun BooltiTheme( window.navigationBarColor = Grey95.toArgb() WindowCompat.getInsetsController(window, view).isAppearanceLightStatusBars = !darkTheme } - } + }*/ MaterialTheme( colorScheme = colorScheme, From 8c75863778e85352f92deab3b28a19b939f561f0 Mon Sep 17 00:00:00 2001 From: mangbaam Date: Sun, 22 Dec 2024 01:54:48 +0900 Subject: [PATCH 02/27] =?UTF-8?q?Boolti-343=20style:=20=EC=83=81=ED=83=9C?= =?UTF-8?q?=EB=B0=94=20=ED=8C=A8=EB=94=A9=20=EB=8C=80=EC=9D=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 계정 설정 - 사업자 정보 - 주최 공연 관리 (입장 확인) - 결제 완료 화면 - QR 스캔 화면 - 결제 내역 - 티켓 상세 --- .../com/nexters/boolti/presentation/screen/MainActivity.kt | 6 +++++- .../screen/accountsetting/AccountSettingScreen.kt | 3 ++- .../boolti/presentation/screen/business/BusinessScreen.kt | 2 ++ .../presentation/screen/payment/PaymentCompleteScreen.kt | 2 ++ .../boolti/presentation/screen/qr/HostedShowScreen.kt | 2 ++ .../nexters/boolti/presentation/screen/qr/QrScanScreen.kt | 2 ++ .../presentation/screen/reservations/ReservationsScreen.kt | 2 ++ .../presentation/screen/ticket/detail/TicketDetailScreen.kt | 4 +++- 8 files changed, 20 insertions(+), 3 deletions(-) diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/screen/MainActivity.kt b/presentation/src/main/java/com/nexters/boolti/presentation/screen/MainActivity.kt index d7bfbe39..f69fad5c 100644 --- a/presentation/src/main/java/com/nexters/boolti/presentation/screen/MainActivity.kt +++ b/presentation/src/main/java/com/nexters/boolti/presentation/screen/MainActivity.kt @@ -3,9 +3,11 @@ package com.nexters.boolti.presentation.screen import android.Manifest import android.app.NotificationChannel import android.app.NotificationManager +import android.graphics.Color import android.os.Build import android.os.Bundle import androidx.activity.ComponentActivity +import androidx.activity.SystemBarStyle import androidx.activity.compose.setContent import androidx.activity.enableEdgeToEdge import androidx.compose.foundation.layout.fillMaxSize @@ -27,7 +29,9 @@ import timber.log.Timber class MainActivity : ComponentActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) - enableEdgeToEdge() + enableEdgeToEdge( + statusBarStyle = SystemBarStyle.dark(Color.TRANSPARENT), + ) setContent { BooltiTheme { Surface( diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/screen/accountsetting/AccountSettingScreen.kt b/presentation/src/main/java/com/nexters/boolti/presentation/screen/accountsetting/AccountSettingScreen.kt index 01aed7d8..d2324f0a 100644 --- a/presentation/src/main/java/com/nexters/boolti/presentation/screen/accountsetting/AccountSettingScreen.kt +++ b/presentation/src/main/java/com/nexters/boolti/presentation/screen/accountsetting/AccountSettingScreen.kt @@ -14,6 +14,7 @@ import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size +import androidx.compose.foundation.layout.statusBarsPadding import androidx.compose.foundation.rememberScrollState import androidx.compose.foundation.shape.CircleShape import androidx.compose.foundation.verticalScroll @@ -72,7 +73,7 @@ fun AccountSettingScreen( } AccountSettingScreen( - modifier = modifier, + modifier = modifier.statusBarsPadding(), userCode = user?.userCode ?: "", onClickBack = navigateBack, requireLogout = viewModel::logout, diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/screen/business/BusinessScreen.kt b/presentation/src/main/java/com/nexters/boolti/presentation/screen/business/BusinessScreen.kt index cf1a7aca..2cde8b4c 100644 --- a/presentation/src/main/java/com/nexters/boolti/presentation/screen/business/BusinessScreen.kt +++ b/presentation/src/main/java/com/nexters/boolti/presentation/screen/business/BusinessScreen.kt @@ -9,6 +9,7 @@ import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size +import androidx.compose.foundation.layout.statusBarsPadding import androidx.compose.foundation.rememberScrollState import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.foundation.verticalScroll @@ -38,6 +39,7 @@ fun BusinessScreen( onBackPressed: () -> Unit, ) { Scaffold( + modifier = Modifier.statusBarsPadding(), contentColor = MaterialTheme.colorScheme.background, topBar = { BtBackAppBar( diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/screen/payment/PaymentCompleteScreen.kt b/presentation/src/main/java/com/nexters/boolti/presentation/screen/payment/PaymentCompleteScreen.kt index 7108b258..c8444e09 100644 --- a/presentation/src/main/java/com/nexters/boolti/presentation/screen/payment/PaymentCompleteScreen.kt +++ b/presentation/src/main/java/com/nexters/boolti/presentation/screen/payment/PaymentCompleteScreen.kt @@ -10,6 +10,7 @@ import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.statusBarsPadding import androidx.compose.foundation.layout.width import androidx.compose.foundation.rememberScrollState import androidx.compose.foundation.verticalScroll @@ -59,6 +60,7 @@ fun PaymentCompleteScreen( BackHandler(onBack = onClickClose) Scaffold( + modifier = Modifier.statusBarsPadding(), topBar = { PaymentToolbar(onClickHome = onClickHome, onClickClose = onClickClose) }, ) { innerPadding -> val reservation = uiState.reservationDetail ?: return@Scaffold diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/screen/qr/HostedShowScreen.kt b/presentation/src/main/java/com/nexters/boolti/presentation/screen/qr/HostedShowScreen.kt index 003e23b4..9d500e6a 100644 --- a/presentation/src/main/java/com/nexters/boolti/presentation/screen/qr/HostedShowScreen.kt +++ b/presentation/src/main/java/com/nexters/boolti/presentation/screen/qr/HostedShowScreen.kt @@ -10,6 +10,7 @@ import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size +import androidx.compose.foundation.layout.statusBarsPadding import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.lazy.items import androidx.compose.material3.Icon @@ -50,6 +51,7 @@ fun HostedShowScreen( val uiState by viewModel.uiState.collectAsStateWithLifecycle() Scaffold( + modifier = Modifier.statusBarsPadding(), topBar = { BtBackAppBar( title = stringResource(R.string.hostedShowsTitle), diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/screen/qr/QrScanScreen.kt b/presentation/src/main/java/com/nexters/boolti/presentation/screen/qr/QrScanScreen.kt index 56343eee..530e7d3d 100644 --- a/presentation/src/main/java/com/nexters/boolti/presentation/screen/qr/QrScanScreen.kt +++ b/presentation/src/main/java/com/nexters/boolti/presentation/screen/qr/QrScanScreen.kt @@ -9,6 +9,7 @@ import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size +import androidx.compose.foundation.layout.statusBarsPadding import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.material3.Icon import androidx.compose.material3.MaterialTheme @@ -90,6 +91,7 @@ fun QrScanScreen( } Scaffold( + modifier = Modifier.statusBarsPadding(), topBar = { BtCloseableAppBar( title = uiState.showName, diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/screen/reservations/ReservationsScreen.kt b/presentation/src/main/java/com/nexters/boolti/presentation/screen/reservations/ReservationsScreen.kt index 6e376cdb..52399a76 100644 --- a/presentation/src/main/java/com/nexters/boolti/presentation/screen/reservations/ReservationsScreen.kt +++ b/presentation/src/main/java/com/nexters/boolti/presentation/screen/reservations/ReservationsScreen.kt @@ -13,6 +13,7 @@ import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size +import androidx.compose.foundation.layout.statusBarsPadding import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.material3.HorizontalDivider @@ -63,6 +64,7 @@ fun ReservationsScreen( } Scaffold( + modifier = Modifier.statusBarsPadding(), topBar = { BtBackAppBar( title = stringResource(id = R.string.my_ticketing_history), diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/screen/ticket/detail/TicketDetailScreen.kt b/presentation/src/main/java/com/nexters/boolti/presentation/screen/ticket/detail/TicketDetailScreen.kt index 028b4bba..b9f1388f 100644 --- a/presentation/src/main/java/com/nexters/boolti/presentation/screen/ticket/detail/TicketDetailScreen.kt +++ b/presentation/src/main/java/com/nexters/boolti/presentation/screen/ticket/detail/TicketDetailScreen.kt @@ -24,6 +24,7 @@ import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size +import androidx.compose.foundation.layout.statusBarsPadding import androidx.compose.foundation.layout.width import androidx.compose.foundation.pager.HorizontalPager import androidx.compose.foundation.pager.PagerState @@ -197,6 +198,7 @@ private fun TicketDetailScreen( } Scaffold( + modifier = modifier.statusBarsPadding(), topBar = { BtBackAppBar( title = stringResource(R.string.ticket_detail_title), @@ -216,7 +218,7 @@ private fun TicketDetailScreen( .padding(top = 16.dp) ) { Column( - modifier = modifier + modifier = Modifier .padding(innerPadding) .padding(horizontal = 29.dp) .verticalScroll(scrollState), From 6cbbc04db92b2a4703c303f35dcd6922ec253bdf Mon Sep 17 00:00:00 2001 From: mangbaam Date: Sun, 22 Dec 2024 02:00:58 +0900 Subject: [PATCH 03/27] =?UTF-8?q?Boolti-343=20style:=20=EC=83=81=ED=83=9C?= =?UTF-8?q?=EB=B0=94=20=ED=8C=A8=EB=94=A9=20=EB=8C=80=EC=9D=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 회원 탈퇴 --- .../nexters/boolti/presentation/screen/signout/SignoutScreen.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/screen/signout/SignoutScreen.kt b/presentation/src/main/java/com/nexters/boolti/presentation/screen/signout/SignoutScreen.kt index 5d7c97da..1b5cb0e7 100644 --- a/presentation/src/main/java/com/nexters/boolti/presentation/screen/signout/SignoutScreen.kt +++ b/presentation/src/main/java/com/nexters/boolti/presentation/screen/signout/SignoutScreen.kt @@ -3,6 +3,7 @@ package com.nexters.boolti.presentation.screen.signout import androidx.activity.compose.BackHandler import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.systemBarsPadding import androidx.compose.material3.Scaffold import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect @@ -42,6 +43,7 @@ fun SignoutScreen( } Scaffold( + modifier = Modifier.systemBarsPadding(), topBar = { BtBackAppBar(title = stringResource(R.string.signout), onClickBack = navigateBack) }, bottomBar = { MainButton( From e69fe7114261b49a9de83c9037227bb0a427e255 Mon Sep 17 00:00:00 2001 From: mangbaam Date: Wed, 25 Dec 2024 16:35:41 +0900 Subject: [PATCH 04/27] =?UTF-8?q?Boolti-343=20style:=20=EC=83=81=ED=83=9C?= =?UTF-8?q?=EB=B0=94=20=ED=8C=A8=EB=94=A9=20=EB=8C=80=EC=9D=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 공연 상세 - 티켓 상세 --- .../boolti/presentation/component/BtAppBar.kt | 9 +++++ .../boolti/presentation/screen/Main.kt | 37 +++++++++---------- .../screen/showdetail/ShowDetailScreen.kt | 10 +---- .../ticket/detail/TicketDetailScreen.kt | 33 ++++++++++------- .../boolti/presentation/util/TicketShape.kt | 3 -- 5 files changed, 46 insertions(+), 46 deletions(-) diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/component/BtAppBar.kt b/presentation/src/main/java/com/nexters/boolti/presentation/component/BtAppBar.kt index 2a471ab0..33453e14 100644 --- a/presentation/src/main/java/com/nexters/boolti/presentation/component/BtAppBar.kt +++ b/presentation/src/main/java/com/nexters/boolti/presentation/component/BtAppBar.kt @@ -8,6 +8,7 @@ import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size +import androidx.compose.foundation.layout.statusBarsPadding import androidx.compose.material3.ButtonDefaults import androidx.compose.material3.Icon import androidx.compose.material3.IconButton @@ -35,12 +36,14 @@ fun BtAppBar( modifier: Modifier = Modifier, title: String = "", colors: BtAppBarColors = BtAppBarDefaults.appBarColors(), + statusBarPadding: Boolean = true, navigateButtons: @Composable (RowScope.() -> Unit)? = null, actionButtons: @Composable (RowScope.() -> Unit)? = null, ) { Row( modifier = modifier .background(color = colors.containerColor) + .let { if (statusBarPadding) it.statusBarsPadding() else it } .fillMaxWidth() .height(44.dp) .padding(horizontal = 8.dp), @@ -80,6 +83,7 @@ fun BtAppBar( modifier: Modifier = Modifier, title: String = "", colors: BtAppBarColors = BtAppBarDefaults.appBarColors(), + statusBarPadding: Boolean = true, navigationButtons: List Unit>> = emptyList(), actionButtons: List Unit>> = emptyList(), ) { @@ -87,6 +91,7 @@ fun BtAppBar( modifier = modifier, title = title, colors = colors, + statusBarPadding = statusBarPadding, navigateButtons = if (navigationButtons.isNotEmpty()) { { navigationButtons.forEach { (res, onClick) -> @@ -113,6 +118,7 @@ fun BtBackAppBar( modifier: Modifier = Modifier, title: String = "", colors: BtAppBarColors = BtAppBarDefaults.appBarColors(), + statusBarPadding: Boolean = true, onClickBack: () -> Unit, ) { BtAppBar( @@ -125,6 +131,7 @@ fun BtBackAppBar( ) }, colors = colors, + statusBarPadding = statusBarPadding, ) } @@ -133,6 +140,7 @@ fun BtCloseableAppBar( modifier: Modifier = Modifier, title: String = "", colors: BtAppBarColors = BtAppBarDefaults.appBarColors(), + statusBarPadding: Boolean = true, onClickClose: () -> Unit, ) { BtAppBar( @@ -146,6 +154,7 @@ fun BtCloseableAppBar( ) }, colors = colors, + statusBarPadding = statusBarPadding, ) } diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/screen/Main.kt b/presentation/src/main/java/com/nexters/boolti/presentation/screen/Main.kt index 1d49edb1..7e074a8e 100644 --- a/presentation/src/main/java/com/nexters/boolti/presentation/screen/Main.kt +++ b/presentation/src/main/java/com/nexters/boolti/presentation/screen/Main.kt @@ -6,7 +6,6 @@ import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.padding import androidx.compose.material3.Scaffold import androidx.compose.material3.SnackbarHostState -import androidx.compose.material3.Surface import androidx.compose.runtime.Composable import androidx.compose.runtime.CompositionLocalProvider import androidx.compose.runtime.remember @@ -67,26 +66,24 @@ fun Main(onClickQrScan: (showId: String, showName: String) -> Unit) { val snackbarHostState = remember { SnackbarHostState() } BooltiTheme { - Surface(modifier) { - Scaffold( - snackbarHost = { - ToastSnackbarHost( - modifier = Modifier.padding(bottom = 80.dp), - hostState = snackbarHostState, - ) - }, + Scaffold( + snackbarHost = { + ToastSnackbarHost( + modifier = Modifier.padding(bottom = 80.dp), + hostState = snackbarHostState, + ) + }, + ) { + CompositionLocalProvider( + LocalSnackbarController provides SnackbarController( + snackbarHostState, + scope + ) ) { - CompositionLocalProvider( - LocalSnackbarController provides SnackbarController( - snackbarHostState, - scope - ) - ) { - MainNavigation( - modifier = modifier, - onClickQrScan = onClickQrScan, - ) - } + MainNavigation( + modifier = modifier, + onClickQrScan = onClickQrScan, + ) } } } diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/screen/showdetail/ShowDetailScreen.kt b/presentation/src/main/java/com/nexters/boolti/presentation/screen/showdetail/ShowDetailScreen.kt index ba5448f1..f3190f84 100644 --- a/presentation/src/main/java/com/nexters/boolti/presentation/screen/showdetail/ShowDetailScreen.kt +++ b/presentation/src/main/java/com/nexters/boolti/presentation/screen/showdetail/ShowDetailScreen.kt @@ -57,7 +57,6 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip import androidx.compose.ui.graphics.Color -import androidx.compose.ui.graphics.toArgb import androidx.compose.ui.graphics.vector.ImageVector import androidx.compose.ui.platform.LocalClipboardManager import androidx.compose.ui.platform.LocalContext @@ -81,7 +80,6 @@ import com.nexters.boolti.presentation.component.ShowInquiry import com.nexters.boolti.presentation.component.SmallButton import com.nexters.boolti.presentation.component.UserThumbnail import com.nexters.boolti.presentation.extension.asString -import com.nexters.boolti.presentation.extension.requireActivity import com.nexters.boolti.presentation.extension.showDateString import com.nexters.boolti.presentation.extension.showDateTimeString import com.nexters.boolti.presentation.screen.LocalSnackbarController @@ -144,9 +142,6 @@ fun ShowDetailScreen( val scope = rememberCoroutineScope() var showBottomSheet by remember { mutableStateOf(null) } - val window = LocalContext.current.requireActivity().window - window.statusBarColor = MaterialTheme.colorScheme.surface.toArgb() - LaunchedEffect(Unit) { viewModel.events.collect { event -> when (event) { @@ -176,7 +171,6 @@ fun ShowDetailScreen( navigateToReport = navigateToReport, ) }, - containerColor = MaterialTheme.colorScheme.background, ) { innerPadding -> Box( modifier = Modifier @@ -193,9 +187,7 @@ fun ShowDetailScreen( var buttonsHeight by remember { mutableStateOf(0.dp) } - LazyColumn( - modifier = Modifier, - ) { + LazyColumn { item { val paddingTop = if (showCountdownBanner) (38 + 40).dp else 16.dp diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/screen/ticket/detail/TicketDetailScreen.kt b/presentation/src/main/java/com/nexters/boolti/presentation/screen/ticket/detail/TicketDetailScreen.kt index b9f1388f..7410599d 100644 --- a/presentation/src/main/java/com/nexters/boolti/presentation/screen/ticket/detail/TicketDetailScreen.kt +++ b/presentation/src/main/java/com/nexters/boolti/presentation/screen/ticket/detail/TicketDetailScreen.kt @@ -24,7 +24,6 @@ import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size -import androidx.compose.foundation.layout.statusBarsPadding import androidx.compose.foundation.layout.width import androidx.compose.foundation.pager.HorizontalPager import androidx.compose.foundation.pager.PagerState @@ -79,6 +78,7 @@ import androidx.compose.ui.text.style.TextDecoration import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp import androidx.compose.ui.unit.sp +import androidx.compose.ui.zIndex import androidx.hilt.navigation.compose.hiltViewModel import androidx.lifecycle.compose.collectAsStateWithLifecycle import androidx.navigation.NavBackStackEntry @@ -192,13 +192,21 @@ private fun TicketDetailScreen( } } + LaunchedEffect(pullToRefreshState.isRefreshing) { + if (pullToRefreshState.isRefreshing) { + viewModel.refresh().invokeOnCompletion { + pullToRefreshState.endRefresh() + } + } + } + LaunchedEffect(pagerState) { snapshotFlow { pagerState.currentPage } .collect(viewModel::syncCurrentPage) } Scaffold( - modifier = modifier.statusBarsPadding(), + modifier = modifier, topBar = { BtBackAppBar( title = stringResource(R.string.ticket_detail_title), @@ -206,20 +214,19 @@ private fun TicketDetailScreen( ) }, ) { innerPadding -> - if (pullToRefreshState.isRefreshing) { - viewModel.refresh().invokeOnCompletion { - pullToRefreshState.endRefresh() - } - } - Box( modifier = Modifier + .padding(innerPadding) .nestedScroll(pullToRefreshState.nestedScrollConnection) - .padding(top = 16.dp) ) { + PullToRefreshContainer( + modifier = Modifier + .align(Alignment.TopCenter) + .zIndex(1f), + state = pullToRefreshState, + ) Column( modifier = Modifier - .padding(innerPadding) .padding(horizontal = 29.dp) .verticalScroll(scrollState), ) { @@ -236,6 +243,7 @@ private fun TicketDetailScreen( contentWidth = coordinates.size.width.toFloat() ticketSectionHeight = coordinates.size.height.toFloat() } + .padding(top = 16.dp) .clip(ticketShape) .border( width = 1.dp, @@ -386,10 +394,6 @@ private fun TicketDetailScreen( ) } } - PullToRefreshContainer( - modifier = Modifier.align(Alignment.TopCenter), - state = pullToRefreshState, - ) } } @@ -486,6 +490,7 @@ private fun QrCodes( .clip(RoundedCornerShape(8.dp)) .background(White), state = pagerState, + userScrollEnabled = pagerState.pageCount > 1, pageSpacing = 8.dp, ) { i -> val ticket = ticketGroup.tickets[i] diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/util/TicketShape.kt b/presentation/src/main/java/com/nexters/boolti/presentation/util/TicketShape.kt index 3738a55d..77f1e524 100644 --- a/presentation/src/main/java/com/nexters/boolti/presentation/util/TicketShape.kt +++ b/presentation/src/main/java/com/nexters/boolti/presentation/util/TicketShape.kt @@ -1,15 +1,12 @@ package com.nexters.boolti.presentation.util -import androidx.compose.ui.geometry.CornerRadius import androidx.compose.ui.geometry.Offset import androidx.compose.ui.geometry.Rect -import androidx.compose.ui.geometry.RoundRect import androidx.compose.ui.geometry.Size import androidx.compose.ui.graphics.Outline import androidx.compose.ui.graphics.Path import androidx.compose.ui.graphics.Shape import androidx.compose.ui.unit.Density -import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.LayoutDirection class TicketShape( From 846e074ff5d2a9ddca049e60f5960b1bf5929707 Mon Sep 17 00:00:00 2001 From: mangbaam Date: Wed, 25 Dec 2024 16:43:08 +0900 Subject: [PATCH 05/27] =?UTF-8?q?Boolti-343=20style:=20=EC=83=81=ED=83=9C?= =?UTF-8?q?=EB=B0=94=20=ED=8C=A8=EB=94=A9=20=EB=8C=80=EC=9D=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - QR 화면 --- .../nexters/boolti/presentation/QrScanActivity.kt | 6 ++++++ .../boolti/presentation/screen/qr/QrFullScreen.kt | 12 ++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/QrScanActivity.kt b/presentation/src/main/java/com/nexters/boolti/presentation/QrScanActivity.kt index d892d373..69742bd3 100644 --- a/presentation/src/main/java/com/nexters/boolti/presentation/QrScanActivity.kt +++ b/presentation/src/main/java/com/nexters/boolti/presentation/QrScanActivity.kt @@ -1,10 +1,13 @@ package com.nexters.boolti.presentation import android.Manifest +import android.graphics.Color import android.os.Bundle import android.view.KeyEvent import androidx.activity.ComponentActivity +import androidx.activity.SystemBarStyle import androidx.activity.compose.setContent +import androidx.activity.enableEdgeToEdge import androidx.activity.viewModels import androidx.core.view.isVisible import androidx.lifecycle.Lifecycle @@ -54,6 +57,9 @@ class QrScanActivity : ComponentActivity() { requestPermission(Manifest.permission.CAMERA, 100) + enableEdgeToEdge( + statusBarStyle = SystemBarStyle.light(Color.TRANSPARENT, Color.TRANSPARENT), + ) setContent { BooltiTheme { QrScanScreen( diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/screen/qr/QrFullScreen.kt b/presentation/src/main/java/com/nexters/boolti/presentation/screen/qr/QrFullScreen.kt index 4ae70449..960f834c 100644 --- a/presentation/src/main/java/com/nexters/boolti/presentation/screen/qr/QrFullScreen.kt +++ b/presentation/src/main/java/com/nexters/boolti/presentation/screen/qr/QrFullScreen.kt @@ -1,6 +1,5 @@ package com.nexters.boolti.presentation.screen.qr -import androidx.compose.foundation.ExperimentalFoundationApi import androidx.compose.foundation.Image import androidx.compose.foundation.background import androidx.compose.foundation.layout.Box @@ -13,6 +12,7 @@ import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size +import androidx.compose.foundation.layout.statusBarsPadding import androidx.compose.foundation.layout.width import androidx.compose.foundation.pager.HorizontalPager import androidx.compose.foundation.pager.rememberPagerState @@ -69,7 +69,6 @@ fun NavGraphBuilder.QrFullScreen( } } -@OptIn(ExperimentalFoundationApi::class) @Composable fun QrFullScreen( modifier: Modifier = Modifier, @@ -81,12 +80,17 @@ fun QrFullScreen( Scaffold( modifier = modifier, - topBar = { Toolbar(onClose = onClose) }, + topBar = { + Toolbar( + modifier = Modifier.statusBarsPadding(), + onClose = onClose, + ) + }, ) { innerPadding -> Box( modifier = Modifier .fillMaxSize() - .background(Color.White) + .background(White) .padding(innerPadding), ) { HorizontalPager( From cd2ebd19d8cefe0f4754cb81dc0e652ef5b54770 Mon Sep 17 00:00:00 2001 From: mangbaam Date: Wed, 25 Dec 2024 17:13:21 +0900 Subject: [PATCH 06/27] =?UTF-8?q?Boolti-343=20style:=20=ED=99=88(=EA=B3=B5?= =?UTF-8?q?=EC=97=B0=20=ED=94=BC=EB=93=9C)=20=EC=83=81=ED=83=9C=EB=B0=94?= =?UTF-8?q?=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../presentation/component/StatusBarCover.kt | 29 +++++++++++++++++++ .../presentation/screen/home/HomeScreen.kt | 2 +- .../presentation/screen/show/ShowScreen.kt | 6 ++++ 3 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 presentation/src/main/java/com/nexters/boolti/presentation/component/StatusBarCover.kt diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/component/StatusBarCover.kt b/presentation/src/main/java/com/nexters/boolti/presentation/component/StatusBarCover.kt new file mode 100644 index 00000000..4ce70eaf --- /dev/null +++ b/presentation/src/main/java/com/nexters/boolti/presentation/component/StatusBarCover.kt @@ -0,0 +1,29 @@ +package com.nexters.boolti.presentation.component + +import androidx.compose.foundation.background +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.ExperimentalLayoutApi +import androidx.compose.foundation.layout.WindowInsets +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.statusBarsIgnoringVisibility +import androidx.compose.foundation.layout.windowInsetsTopHeight +import androidx.compose.material3.MaterialTheme +import androidx.compose.runtime.Composable +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.zIndex + +@OptIn(ExperimentalLayoutApi::class) +@Composable +fun StatusBarCover( + modifier: Modifier = Modifier, + color: Color = MaterialTheme.colorScheme.background, +) { + Box( + modifier = modifier + .zIndex(1f) + .background(color) + .fillMaxWidth() + .windowInsetsTopHeight(WindowInsets.statusBarsIgnoringVisibility), + ) +} diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/screen/home/HomeScreen.kt b/presentation/src/main/java/com/nexters/boolti/presentation/screen/home/HomeScreen.kt index 07f8b7a2..49127221 100644 --- a/presentation/src/main/java/com/nexters/boolti/presentation/screen/home/HomeScreen.kt +++ b/presentation/src/main/java/com/nexters/boolti/presentation/screen/home/HomeScreen.kt @@ -141,7 +141,7 @@ fun HomeScreen( ) ) { ShowScreen( - modifier = Modifier.padding(innerPadding), + modifier = Modifier.padding(bottom = innerPadding.calculateBottomPadding()), onClickShowItem = onClickShowItem, navigateToBusiness = navigateToBusiness, navigateToShowRegistration = { diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/screen/show/ShowScreen.kt b/presentation/src/main/java/com/nexters/boolti/presentation/screen/show/ShowScreen.kt index 43cbb8eb..2e7bd761 100644 --- a/presentation/src/main/java/com/nexters/boolti/presentation/screen/show/ShowScreen.kt +++ b/presentation/src/main/java/com/nexters/boolti/presentation/screen/show/ShowScreen.kt @@ -7,6 +7,7 @@ import androidx.compose.foundation.interaction.MutableInteractionSource import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.ExperimentalLayoutApi import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.Spacer @@ -15,6 +16,7 @@ import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.offset import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size +import androidx.compose.foundation.layout.statusBarsPadding import androidx.compose.foundation.lazy.grid.GridCells import androidx.compose.foundation.lazy.grid.GridItemSpan import androidx.compose.foundation.lazy.grid.LazyVerticalGrid @@ -58,6 +60,7 @@ import androidx.lifecycle.compose.collectAsStateWithLifecycle import com.nexters.boolti.presentation.R import com.nexters.boolti.presentation.component.BusinessInformation import com.nexters.boolti.presentation.component.ShowFeed +import com.nexters.boolti.presentation.component.StatusBarCover import com.nexters.boolti.presentation.extension.toPx import com.nexters.boolti.presentation.theme.Grey05 import com.nexters.boolti.presentation.theme.Grey15 @@ -68,6 +71,7 @@ import com.nexters.boolti.presentation.theme.marginHorizontal import com.nexters.boolti.presentation.theme.point1 import com.nexters.boolti.presentation.theme.point4 +@OptIn(ExperimentalLayoutApi::class) @Composable fun ShowScreen( navigateToBusiness: () -> Unit, @@ -116,6 +120,7 @@ fun ShowScreen( modifier = modifier.nestedScroll(nestedScrollConnection), contentAlignment = Alignment.TopCenter, ) { + StatusBarCover() LazyVerticalGrid( modifier = Modifier .padding(horizontal = marginHorizontal), @@ -191,6 +196,7 @@ fun ShowAppBar( Column( modifier = modifier .fillMaxWidth() + .statusBarsPadding() .background(MaterialTheme.colorScheme.background) .padding(horizontal = marginHorizontal) ) { From dbfc5849e1fedacbc0a64b9536506146d7313ee6 Mon Sep 17 00:00:00 2001 From: mangbaam Date: Wed, 25 Dec 2024 17:16:33 +0900 Subject: [PATCH 07/27] =?UTF-8?q?Boolti-343=20chore:=20Theme=20=EC=97=90?= =?UTF-8?q?=EC=84=9C=20=EC=83=81=ED=83=9C=EB=B0=94=20=EC=83=89=EC=83=81=20?= =?UTF-8?q?=EC=84=A4=EC=A0=95=20=EC=BD=94=EB=93=9C=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/nexters/boolti/presentation/theme/Theme.kt | 9 --------- 1 file changed, 9 deletions(-) diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/theme/Theme.kt b/presentation/src/main/java/com/nexters/boolti/presentation/theme/Theme.kt index 045d8bfc..66b58cff 100644 --- a/presentation/src/main/java/com/nexters/boolti/presentation/theme/Theme.kt +++ b/presentation/src/main/java/com/nexters/boolti/presentation/theme/Theme.kt @@ -49,15 +49,6 @@ fun BooltiTheme( darkTheme -> DarkColorScheme else -> LightColorScheme } - /*val view = LocalView.current - if (!view.isInEditMode) { - SideEffect { - val window = (view.context as Activity).window - window.statusBarColor = Grey95.toArgb() - window.navigationBarColor = Grey95.toArgb() - WindowCompat.getInsetsController(window, view).isAppearanceLightStatusBars = !darkTheme - } - }*/ MaterialTheme( colorScheme = colorScheme, From 5f5c50ed3a77c74fe405daa2d8690c39164d9141 Mon Sep 17 00:00:00 2001 From: mangbaam Date: Wed, 25 Dec 2024 17:24:19 +0900 Subject: [PATCH 08/27] =?UTF-8?q?Boolti-343=20refactor:=20=EB=B6=88?= =?UTF-8?q?=ED=95=84=EC=9A=94=ED=95=9C=20statusBarsPadding=20=EC=BD=94?= =?UTF-8?q?=EB=93=9C=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gradle/libs.versions.toml | 2 +- .../accountsetting/AccountSettingScreen.kt | 3 +-- .../screen/business/BusinessScreen.kt | 2 -- .../screen/payment/PaymentCompleteScreen.kt | 2 -- .../screen/qr/HostedShowScreen.kt | 2 -- .../presentation/screen/qr/QrScanScreen.kt | 24 ++++++++++++++----- .../screen/reservations/ReservationsScreen.kt | 2 -- .../presentation/screen/show/ShowScreen.kt | 2 +- 8 files changed, 21 insertions(+), 18 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 2606355d..7d0702ab 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,7 +1,7 @@ [versions] minSdk = "26" targetSdk = "34" -versionCode = "30" +versionCode = "31" versionName = "1.9.0" packageName = "com.nexters.boolti" compileSdk = "34" diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/screen/accountsetting/AccountSettingScreen.kt b/presentation/src/main/java/com/nexters/boolti/presentation/screen/accountsetting/AccountSettingScreen.kt index d2324f0a..01aed7d8 100644 --- a/presentation/src/main/java/com/nexters/boolti/presentation/screen/accountsetting/AccountSettingScreen.kt +++ b/presentation/src/main/java/com/nexters/boolti/presentation/screen/accountsetting/AccountSettingScreen.kt @@ -14,7 +14,6 @@ import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size -import androidx.compose.foundation.layout.statusBarsPadding import androidx.compose.foundation.rememberScrollState import androidx.compose.foundation.shape.CircleShape import androidx.compose.foundation.verticalScroll @@ -73,7 +72,7 @@ fun AccountSettingScreen( } AccountSettingScreen( - modifier = modifier.statusBarsPadding(), + modifier = modifier, userCode = user?.userCode ?: "", onClickBack = navigateBack, requireLogout = viewModel::logout, diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/screen/business/BusinessScreen.kt b/presentation/src/main/java/com/nexters/boolti/presentation/screen/business/BusinessScreen.kt index 2cde8b4c..cf1a7aca 100644 --- a/presentation/src/main/java/com/nexters/boolti/presentation/screen/business/BusinessScreen.kt +++ b/presentation/src/main/java/com/nexters/boolti/presentation/screen/business/BusinessScreen.kt @@ -9,7 +9,6 @@ import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size -import androidx.compose.foundation.layout.statusBarsPadding import androidx.compose.foundation.rememberScrollState import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.foundation.verticalScroll @@ -39,7 +38,6 @@ fun BusinessScreen( onBackPressed: () -> Unit, ) { Scaffold( - modifier = Modifier.statusBarsPadding(), contentColor = MaterialTheme.colorScheme.background, topBar = { BtBackAppBar( diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/screen/payment/PaymentCompleteScreen.kt b/presentation/src/main/java/com/nexters/boolti/presentation/screen/payment/PaymentCompleteScreen.kt index c8444e09..7108b258 100644 --- a/presentation/src/main/java/com/nexters/boolti/presentation/screen/payment/PaymentCompleteScreen.kt +++ b/presentation/src/main/java/com/nexters/boolti/presentation/screen/payment/PaymentCompleteScreen.kt @@ -10,7 +10,6 @@ import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding -import androidx.compose.foundation.layout.statusBarsPadding import androidx.compose.foundation.layout.width import androidx.compose.foundation.rememberScrollState import androidx.compose.foundation.verticalScroll @@ -60,7 +59,6 @@ fun PaymentCompleteScreen( BackHandler(onBack = onClickClose) Scaffold( - modifier = Modifier.statusBarsPadding(), topBar = { PaymentToolbar(onClickHome = onClickHome, onClickClose = onClickClose) }, ) { innerPadding -> val reservation = uiState.reservationDetail ?: return@Scaffold diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/screen/qr/HostedShowScreen.kt b/presentation/src/main/java/com/nexters/boolti/presentation/screen/qr/HostedShowScreen.kt index 9d500e6a..003e23b4 100644 --- a/presentation/src/main/java/com/nexters/boolti/presentation/screen/qr/HostedShowScreen.kt +++ b/presentation/src/main/java/com/nexters/boolti/presentation/screen/qr/HostedShowScreen.kt @@ -10,7 +10,6 @@ import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size -import androidx.compose.foundation.layout.statusBarsPadding import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.lazy.items import androidx.compose.material3.Icon @@ -51,7 +50,6 @@ fun HostedShowScreen( val uiState by viewModel.uiState.collectAsStateWithLifecycle() Scaffold( - modifier = Modifier.statusBarsPadding(), topBar = { BtBackAppBar( title = stringResource(R.string.hostedShowsTitle), diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/screen/qr/QrScanScreen.kt b/presentation/src/main/java/com/nexters/boolti/presentation/screen/qr/QrScanScreen.kt index 530e7d3d..9d42a928 100644 --- a/presentation/src/main/java/com/nexters/boolti/presentation/screen/qr/QrScanScreen.kt +++ b/presentation/src/main/java/com/nexters/boolti/presentation/screen/qr/QrScanScreen.kt @@ -9,7 +9,6 @@ import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size -import androidx.compose.foundation.layout.statusBarsPadding import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.material3.Icon import androidx.compose.material3.MaterialTheme @@ -76,9 +75,20 @@ fun QrScanScreen( val (iconId, errMessage) = when (event) { is QrScanEvent.ScanError -> { when (event.errorType) { - QrErrorType.ShowNotToday -> Pair(R.drawable.ic_warning, notTodayErrMessage) - QrErrorType.UsedTicket -> Pair(R.drawable.ic_error, usedTicketErrMessage) - QrErrorType.TicketNotFound -> Pair(R.drawable.ic_error, notMatchedErrMessage) + QrErrorType.ShowNotToday -> Pair( + R.drawable.ic_warning, + notTodayErrMessage + ) + + QrErrorType.UsedTicket -> Pair( + R.drawable.ic_error, + usedTicketErrMessage + ) + + QrErrorType.TicketNotFound -> Pair( + R.drawable.ic_error, + notMatchedErrMessage + ) } } @@ -91,7 +101,6 @@ fun QrScanScreen( } Scaffold( - modifier = Modifier.statusBarsPadding(), topBar = { BtCloseableAppBar( title = uiState.showName, @@ -174,7 +183,10 @@ private fun EntryCodeDialog( onDismiss: () -> Unit, ) { BTDialog(showCloseButton = false, onDismiss = onDismiss, onClickPositiveButton = onDismiss) { - Text(text = stringResource(R.string.manager_code), style = MaterialTheme.typography.titleLarge) + Text( + text = stringResource(R.string.manager_code), + style = MaterialTheme.typography.titleLarge + ) Text( modifier = Modifier .padding(top = 24.dp) diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/screen/reservations/ReservationsScreen.kt b/presentation/src/main/java/com/nexters/boolti/presentation/screen/reservations/ReservationsScreen.kt index 52399a76..6e376cdb 100644 --- a/presentation/src/main/java/com/nexters/boolti/presentation/screen/reservations/ReservationsScreen.kt +++ b/presentation/src/main/java/com/nexters/boolti/presentation/screen/reservations/ReservationsScreen.kt @@ -13,7 +13,6 @@ import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size -import androidx.compose.foundation.layout.statusBarsPadding import androidx.compose.foundation.lazy.LazyColumn import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.material3.HorizontalDivider @@ -64,7 +63,6 @@ fun ReservationsScreen( } Scaffold( - modifier = Modifier.statusBarsPadding(), topBar = { BtBackAppBar( title = stringResource(id = R.string.my_ticketing_history), diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/screen/show/ShowScreen.kt b/presentation/src/main/java/com/nexters/boolti/presentation/screen/show/ShowScreen.kt index 2e7bd761..5d45a70e 100644 --- a/presentation/src/main/java/com/nexters/boolti/presentation/screen/show/ShowScreen.kt +++ b/presentation/src/main/java/com/nexters/boolti/presentation/screen/show/ShowScreen.kt @@ -196,8 +196,8 @@ fun ShowAppBar( Column( modifier = modifier .fillMaxWidth() - .statusBarsPadding() .background(MaterialTheme.colorScheme.background) + .statusBarsPadding() .padding(horizontal = marginHorizontal) ) { Spacer(modifier = Modifier.height(40.dp)) From 82d6e8b60e18ce30574d28ec2febfd048d266c5b Mon Sep 17 00:00:00 2001 From: mangbaam Date: Tue, 31 Dec 2024 00:45:04 +0900 Subject: [PATCH 09/27] =?UTF-8?q?Boolti-343=20fix:=20=EB=A8=B8=EC=A7=80=20?= =?UTF-8?q?=EC=B6=A9=EB=8F=8C=20=ED=95=B4=EA=B2=B0=20=ED=9B=84=20=EA=B3=B5?= =?UTF-8?q?=EC=97=B0=20=EC=83=81=EC=84=B8=20UI=20=EB=8C=80=EC=9D=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../boolti/presentation/screen/showdetail/ShowDetailScreen.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/screen/showdetail/ShowDetailScreen.kt b/presentation/src/main/java/com/nexters/boolti/presentation/screen/showdetail/ShowDetailScreen.kt index 15339b53..6d23c32f 100644 --- a/presentation/src/main/java/com/nexters/boolti/presentation/screen/showdetail/ShowDetailScreen.kt +++ b/presentation/src/main/java/com/nexters/boolti/presentation/screen/showdetail/ShowDetailScreen.kt @@ -21,6 +21,7 @@ import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.heightIn +import androidx.compose.foundation.layout.navigationBarsPadding import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size import androidx.compose.foundation.layout.wrapContentSize @@ -156,7 +157,7 @@ fun ShowDetailScreen( CompositionLocalProvider(LocalOverscrollConfiguration provides null) { Scaffold( - modifier = modifier, + modifier = modifier.navigationBarsPadding(), topBar = { ShowDetailAppBar( showDetail = uiState.showDetail, From 7e1749f12c700ab17db5384b190c3846b7da677c Mon Sep 17 00:00:00 2001 From: mangbaam Date: Tue, 31 Dec 2024 00:49:00 +0900 Subject: [PATCH 10/27] =?UTF-8?q?Boolti-343=20style:=20QR=20=EC=8A=A4?= =?UTF-8?q?=EC=BA=94=20=ED=99=94=EB=A9=B4=20=ED=95=98=EB=8B=A8=20=EC=98=81?= =?UTF-8?q?=EC=97=AD=20=ED=8C=A8=EB=94=A9=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/nexters/boolti/presentation/screen/qr/QrScanScreen.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/screen/qr/QrScanScreen.kt b/presentation/src/main/java/com/nexters/boolti/presentation/screen/qr/QrScanScreen.kt index 9d42a928..96643386 100644 --- a/presentation/src/main/java/com/nexters/boolti/presentation/screen/qr/QrScanScreen.kt +++ b/presentation/src/main/java/com/nexters/boolti/presentation/screen/qr/QrScanScreen.kt @@ -7,6 +7,7 @@ import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.navigationBarsPadding import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size import androidx.compose.foundation.shape.RoundedCornerShape @@ -101,6 +102,7 @@ fun QrScanScreen( } Scaffold( + modifier = Modifier.navigationBarsPadding(), topBar = { BtCloseableAppBar( title = uiState.showName, From b9dda465aca1467e95457128b56b474ccbcee4e7 Mon Sep 17 00:00:00 2001 From: mangbaam Date: Tue, 31 Dec 2024 00:59:26 +0900 Subject: [PATCH 11/27] =?UTF-8?q?Boolti-343=20style:=20=ED=83=88=ED=87=B4,?= =?UTF-8?q?=20=ED=99=98=EB=B6=88=20=EC=82=AC=EC=9C=A0=20=EC=9E=85=EB=A0=A5?= =?UTF-8?q?=20=ED=85=8D=EC=8A=A4=ED=8A=B8=ED=95=84=EB=93=9C=20=EC=B5=9C?= =?UTF-8?q?=EC=86=8C=20=EB=86=92=EC=9D=B4=20=EC=88=98=EC=A0=95=20=EB=B0=8F?= =?UTF-8?q?=20=ED=99=98=EB=B6=88=20=EC=82=AC=EC=9C=A0=20=EC=9E=91=EC=84=B1?= =?UTF-8?q?=20=ED=99=94=EB=A9=B4=EC=97=90=EC=84=9C=20clickable=20=EC=A0=9C?= =?UTF-8?q?=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../presentation/screen/refund/ReasonPage.kt | 25 +++++-------------- .../screen/refund/RefundScreen.kt | 7 ++---- .../screen/signout/SignoutReason.kt | 3 ++- .../screen/signout/SignoutScreen.kt | 4 +-- 4 files changed, 12 insertions(+), 27 deletions(-) diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/screen/refund/ReasonPage.kt b/presentation/src/main/java/com/nexters/boolti/presentation/screen/refund/ReasonPage.kt index d0f0a866..72bfc3a7 100644 --- a/presentation/src/main/java/com/nexters/boolti/presentation/screen/refund/ReasonPage.kt +++ b/presentation/src/main/java/com/nexters/boolti/presentation/screen/refund/ReasonPage.kt @@ -1,17 +1,13 @@ package com.nexters.boolti.presentation.screen.refund -import androidx.compose.foundation.clickable -import androidx.compose.foundation.interaction.MutableInteractionSource import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.fillMaxWidth -import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.heightIn import androidx.compose.foundation.layout.padding import androidx.compose.material3.Text import androidx.compose.runtime.Composable -import androidx.compose.runtime.remember import androidx.compose.ui.Modifier -import androidx.compose.ui.platform.LocalSoftwareKeyboardController import androidx.compose.ui.res.stringResource import androidx.compose.ui.unit.dp import com.nexters.boolti.presentation.R @@ -27,17 +23,7 @@ fun ReasonPage( onNextClick: () -> Unit, modifier: Modifier = Modifier, ) { - val keyboardController = LocalSoftwareKeyboardController.current - val interactionSource = remember { MutableInteractionSource() } - - Column( - modifier = modifier.clickable( - interactionSource = interactionSource, - indication = null - ) { - keyboardController?.hide() - } - ) { + Column(modifier = modifier) { Text( modifier = Modifier .padding(top = 20.dp) @@ -48,10 +34,11 @@ fun ReasonPage( BTTextField( modifier = Modifier .fillMaxWidth() + .heightIn(max = 300.dp) .padding(horizontal = marginHorizontal) - .height(160.dp) .padding(top = 20.dp), text = reason, + minHeight = 160.dp, onValueChanged = onReasonChanged, placeholder = stringResource(id = R.string.refund_reason_hint), ) @@ -64,7 +51,7 @@ fun ReasonPage( .padding(bottom = 8.dp), onClick = onNextClick, enabled = reason.isNotBlank(), - label = stringResource(id = R.string.next) + label = stringResource(id = R.string.next), ) } -} \ No newline at end of file +} diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/screen/refund/RefundScreen.kt b/presentation/src/main/java/com/nexters/boolti/presentation/screen/refund/RefundScreen.kt index 9aae927f..248d862f 100644 --- a/presentation/src/main/java/com/nexters/boolti/presentation/screen/refund/RefundScreen.kt +++ b/presentation/src/main/java/com/nexters/boolti/presentation/screen/refund/RefundScreen.kt @@ -1,12 +1,12 @@ package com.nexters.boolti.presentation.screen.refund -import androidx.compose.foundation.ExperimentalFoundationApi import androidx.compose.foundation.background import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.navigationBarsPadding import androidx.compose.foundation.layout.padding import androidx.compose.foundation.pager.HorizontalPager import androidx.compose.foundation.pager.rememberPagerState @@ -29,11 +29,9 @@ import androidx.compose.ui.res.stringResource import androidx.compose.ui.unit.dp import androidx.hilt.navigation.compose.hiltViewModel import androidx.lifecycle.compose.collectAsStateWithLifecycle -import com.nexters.boolti.domain.model.PaymentType import com.nexters.boolti.presentation.R import com.nexters.boolti.presentation.component.BTDialog import com.nexters.boolti.presentation.component.BtBackAppBar -import com.nexters.boolti.presentation.extension.cardCodeToCompanyName import com.nexters.boolti.presentation.extension.getPaymentString import com.nexters.boolti.presentation.screen.LocalSnackbarController import com.nexters.boolti.presentation.theme.Grey15 @@ -41,7 +39,6 @@ import com.nexters.boolti.presentation.theme.Grey30 import com.nexters.boolti.presentation.theme.Grey80 import kotlinx.coroutines.launch -@OptIn(ExperimentalFoundationApi::class) @Composable fun RefundScreen( isGift: Boolean, @@ -84,7 +81,7 @@ fun RefundScreen( onClickBack = onBackPressed, ) }, - modifier = Modifier, + modifier = Modifier.navigationBarsPadding(), ) { innerPadding -> val reservation = uiState.reservation ?: return@Scaffold diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/screen/signout/SignoutReason.kt b/presentation/src/main/java/com/nexters/boolti/presentation/screen/signout/SignoutReason.kt index 4a2f5697..6f5ca106 100644 --- a/presentation/src/main/java/com/nexters/boolti/presentation/screen/signout/SignoutReason.kt +++ b/presentation/src/main/java/com/nexters/boolti/presentation/screen/signout/SignoutReason.kt @@ -39,9 +39,10 @@ fun SignoutReason( BTTextField( modifier = Modifier .fillMaxWidth() - .heightIn(min = 160.dp, max = 300.dp) + .heightIn(max = 300.dp) .padding(horizontal = marginHorizontal), text = reason, + minHeight = 160.dp, placeholder = stringResource(R.string.signout_reason_placeholder), onValueChanged = viewModel::setReason, ) diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/screen/signout/SignoutScreen.kt b/presentation/src/main/java/com/nexters/boolti/presentation/screen/signout/SignoutScreen.kt index 1b5cb0e7..d4047f49 100644 --- a/presentation/src/main/java/com/nexters/boolti/presentation/screen/signout/SignoutScreen.kt +++ b/presentation/src/main/java/com/nexters/boolti/presentation/screen/signout/SignoutScreen.kt @@ -2,8 +2,8 @@ package com.nexters.boolti.presentation.screen.signout import androidx.activity.compose.BackHandler import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.navigationBarsPadding import androidx.compose.foundation.layout.padding -import androidx.compose.foundation.layout.systemBarsPadding import androidx.compose.material3.Scaffold import androidx.compose.runtime.Composable import androidx.compose.runtime.LaunchedEffect @@ -43,7 +43,7 @@ fun SignoutScreen( } Scaffold( - modifier = Modifier.systemBarsPadding(), + modifier = Modifier.navigationBarsPadding(), topBar = { BtBackAppBar(title = stringResource(R.string.signout), onClickBack = navigateBack) }, bottomBar = { MainButton( From b76355d3d048435e1e5e991387b24088017768a1 Mon Sep 17 00:00:00 2001 From: mangbaam Date: Tue, 31 Dec 2024 01:00:58 +0900 Subject: [PATCH 12/27] =?UTF-8?q?Boolti-343=20style:=20=ED=8B=B0=EC=BC=93?= =?UTF-8?q?=20=EC=84=A0=ED=83=9D=20=EB=B0=94=ED=85=80=EC=8B=9C=ED=8A=B8=20?= =?UTF-8?q?=EB=B6=88=ED=95=84=EC=9A=94=ED=95=9C=20=ED=95=98=EB=8B=A8=20?= =?UTF-8?q?=ED=8C=A8=EB=94=A9=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../screen/ticketing/ChooseTicketBottomSheet.kt | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/screen/ticketing/ChooseTicketBottomSheet.kt b/presentation/src/main/java/com/nexters/boolti/presentation/screen/ticketing/ChooseTicketBottomSheet.kt index d3cff857..5d452aee 100644 --- a/presentation/src/main/java/com/nexters/boolti/presentation/screen/ticketing/ChooseTicketBottomSheet.kt +++ b/presentation/src/main/java/com/nexters/boolti/presentation/screen/ticketing/ChooseTicketBottomSheet.kt @@ -6,12 +6,9 @@ import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.Spacer -import androidx.compose.foundation.layout.WindowInsets -import androidx.compose.foundation.layout.asPaddingValues import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.heightIn -import androidx.compose.foundation.layout.navigationBars import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size import androidx.compose.foundation.layout.width @@ -104,11 +101,7 @@ fun ChooseTicketBottomSheet( ) { Column( modifier = Modifier - .padding( - bottom = 20.dp + WindowInsets.navigationBars - .asPaddingValues() - .calculateBottomPadding() - ) + .padding(bottom = 20.dp) .heightIn(max = 564.dp) ) { uiState.selected?.let { From 32f45787a45ed96eedead97a15506290e549dee3 Mon Sep 17 00:00:00 2001 From: mangbaam Date: Tue, 31 Dec 2024 15:09:26 +0900 Subject: [PATCH 13/27] =?UTF-8?q?Boolti-343=20style:=20=ED=99=88=20?= =?UTF-8?q?=EC=83=81=EB=8B=A8=20=ED=8C=A8=EB=94=A9=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../boolti/presentation/screen/show/ShowScreen.kt | 3 ++- .../com/nexters/boolti/presentation/theme/Dimen.kt | 13 +++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/screen/show/ShowScreen.kt b/presentation/src/main/java/com/nexters/boolti/presentation/screen/show/ShowScreen.kt index 5d45a70e..c1a3f783 100644 --- a/presentation/src/main/java/com/nexters/boolti/presentation/screen/show/ShowScreen.kt +++ b/presentation/src/main/java/com/nexters/boolti/presentation/screen/show/ShowScreen.kt @@ -70,6 +70,7 @@ import com.nexters.boolti.presentation.theme.Grey85 import com.nexters.boolti.presentation.theme.marginHorizontal import com.nexters.boolti.presentation.theme.point1 import com.nexters.boolti.presentation.theme.point4 +import com.nexters.boolti.presentation.theme.statusBarHeight @OptIn(ExperimentalLayoutApi::class) @Composable @@ -128,7 +129,7 @@ fun ShowScreen( columns = GridCells.Adaptive(minSize = 150.dp), horizontalArrangement = Arrangement.spacedBy(15.dp), verticalArrangement = Arrangement.spacedBy(28.dp), - contentPadding = PaddingValues(top = 12.dp + appbarHeight), + contentPadding = PaddingValues(top = statusBarHeight + appbarHeight + 12.dp), ) { items( count = uiState.shows.size.coerceAtMost(4), diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/theme/Dimen.kt b/presentation/src/main/java/com/nexters/boolti/presentation/theme/Dimen.kt index 34833bca..800747ca 100644 --- a/presentation/src/main/java/com/nexters/boolti/presentation/theme/Dimen.kt +++ b/presentation/src/main/java/com/nexters/boolti/presentation/theme/Dimen.kt @@ -1,7 +1,20 @@ package com.nexters.boolti.presentation.theme +import androidx.compose.foundation.layout.PaddingValues +import androidx.compose.foundation.layout.WindowInsets +import androidx.compose.foundation.layout.asPaddingValues +import androidx.compose.foundation.layout.statusBars +import androidx.compose.runtime.Composable import androidx.compose.ui.unit.Dp import androidx.compose.ui.unit.dp val marginHorizontal: Dp = 20.dp val subTextPadding: Dp = 6.dp + +val statusBarPaddingValues: PaddingValues + @Composable + get() = WindowInsets.statusBars.asPaddingValues() + +val statusBarHeight: Dp + @Composable + get() = statusBarPaddingValues.calculateTopPadding() From 97897acdab78c8e0b9117d8d49bab7d1c7e26f41 Mon Sep 17 00:00:00 2001 From: mangbaam Date: Tue, 31 Dec 2024 22:14:39 +0900 Subject: [PATCH 14/27] =?UTF-8?q?feature/Boolti-343=20QR=20=EC=8A=A4?= =?UTF-8?q?=EC=BA=94=20=EC=83=81=ED=83=9C=EB=B0=94=20=EC=83=89=EC=83=81=20?= =?UTF-8?q?=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/nexters/boolti/presentation/QrScanActivity.kt | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/QrScanActivity.kt b/presentation/src/main/java/com/nexters/boolti/presentation/QrScanActivity.kt index 69742bd3..404bd2ed 100644 --- a/presentation/src/main/java/com/nexters/boolti/presentation/QrScanActivity.kt +++ b/presentation/src/main/java/com/nexters/boolti/presentation/QrScanActivity.kt @@ -57,9 +57,8 @@ class QrScanActivity : ComponentActivity() { requestPermission(Manifest.permission.CAMERA, 100) - enableEdgeToEdge( - statusBarStyle = SystemBarStyle.light(Color.TRANSPARENT, Color.TRANSPARENT), - ) + enableEdgeToEdge(statusBarStyle = SystemBarStyle.dark(Color.TRANSPARENT)) + setContent { BooltiTheme { QrScanScreen( From e883189819d41645e29f64571517e64506ff50a3 Mon Sep 17 00:00:00 2001 From: mangbaam Date: Tue, 31 Dec 2024 22:20:05 +0900 Subject: [PATCH 15/27] =?UTF-8?q?feature/Boolti-343=20=ED=8B=B0=EC=BC=93?= =?UTF-8?q?=20=EC=84=A0=ED=83=9D=20=EB=B0=94=ED=85=80=EC=8B=9C=ED=8A=B8=20?= =?UTF-8?q?=ED=95=98=EB=8B=A8=20=ED=8C=A8=EB=94=A9=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../screen/ticketing/ChooseTicketBottomSheet.kt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/screen/ticketing/ChooseTicketBottomSheet.kt b/presentation/src/main/java/com/nexters/boolti/presentation/screen/ticketing/ChooseTicketBottomSheet.kt index 5d452aee..1612998a 100644 --- a/presentation/src/main/java/com/nexters/boolti/presentation/screen/ticketing/ChooseTicketBottomSheet.kt +++ b/presentation/src/main/java/com/nexters/boolti/presentation/screen/ticketing/ChooseTicketBottomSheet.kt @@ -99,10 +99,8 @@ fun ChooseTicketBottomSheet( contentColor = MaterialTheme.colorScheme.surfaceTint, containerColor = Grey85, ) { - Column( - modifier = Modifier - .padding(bottom = 20.dp) - .heightIn(max = 564.dp) + Box( + modifier = Modifier.heightIn(max = 564.dp) ) { uiState.selected?.let { ChooseTicketBottomSheetContent2( @@ -138,7 +136,9 @@ private fun ChooseTicketBottomSheetContent1( onSelectItem: (TicketWithQuantity) -> Unit, ) { val listState = rememberLazyListState() - Column { + Column( + modifier = Modifier.padding(bottom = 20.dp), + ) { Text( text = stringResource(id = R.string.choose_ticket_bottomsheet_title), style = MaterialTheme.typography.titleLarge.copy(color = Grey30), From 982794ab4650356eb931a4d1a240d9827e1c57b1 Mon Sep 17 00:00:00 2001 From: mangbaam Date: Tue, 31 Dec 2024 22:52:24 +0900 Subject: [PATCH 16/27] =?UTF-8?q?feature/Boolti-343=20=EA=B2=B0=EC=A0=9C?= =?UTF-8?q?=20=EB=82=B4=EC=97=AD,=20=EA=B2=B0=EC=A0=9C=20=EC=B7=A8?= =?UTF-8?q?=EC=86=8C=20=ED=99=94=EB=A9=B4=20=ED=95=98=EB=8B=A8=20=ED=8C=A8?= =?UTF-8?q?=EB=94=A9=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../reservationdetail/ReservationDetailScreen.kt | 6 ++++-- .../boolti/presentation/screen/refund/ReasonPage.kt | 5 +++-- .../boolti/presentation/screen/refund/RefundInfoPage.kt | 3 +-- .../boolti/presentation/screen/refund/RefundScreen.kt | 8 +++----- .../boolti/presentation/screen/signout/SignoutScreen.kt | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/reservationdetail/ReservationDetailScreen.kt b/presentation/src/main/java/com/nexters/boolti/presentation/reservationdetail/ReservationDetailScreen.kt index 1d161df2..374b1042 100644 --- a/presentation/src/main/java/com/nexters/boolti/presentation/reservationdetail/ReservationDetailScreen.kt +++ b/presentation/src/main/java/com/nexters/boolti/presentation/reservationdetail/ReservationDetailScreen.kt @@ -10,6 +10,7 @@ import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.navigationBarsPadding import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size import androidx.compose.foundation.rememberScrollState @@ -74,7 +75,7 @@ fun ReservationDetailScreen( } Scaffold( - modifier = modifier, + modifier = modifier.navigationBarsPadding(), topBar = { BtBackAppBar( title = stringResource(id = R.string.reservation_detail), @@ -143,7 +144,8 @@ fun ReservationDetailScreen( if (state.reservation.isRefundable) { MainButton( modifier = modifier - .padding(horizontal = marginHorizontal, vertical = 8.dp) + .padding(horizontal = marginHorizontal) + .padding(top = 8.dp, bottom = 20.dp) .fillMaxWidth(), colors = MainButtonDefaults.buttonColors( containerColor = Grey15, diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/screen/refund/ReasonPage.kt b/presentation/src/main/java/com/nexters/boolti/presentation/screen/refund/ReasonPage.kt index 72bfc3a7..d48e9a3f 100644 --- a/presentation/src/main/java/com/nexters/boolti/presentation/screen/refund/ReasonPage.kt +++ b/presentation/src/main/java/com/nexters/boolti/presentation/screen/refund/ReasonPage.kt @@ -4,6 +4,7 @@ import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.heightIn +import androidx.compose.foundation.layout.navigationBarsPadding import androidx.compose.foundation.layout.padding import androidx.compose.material3.Text import androidx.compose.runtime.Composable @@ -23,7 +24,7 @@ fun ReasonPage( onNextClick: () -> Unit, modifier: Modifier = Modifier, ) { - Column(modifier = modifier) { + Column(modifier = modifier.navigationBarsPadding()) { Text( modifier = Modifier .padding(top = 20.dp) @@ -48,7 +49,7 @@ fun ReasonPage( modifier = Modifier .fillMaxWidth() .padding(horizontal = marginHorizontal) - .padding(bottom = 8.dp), + .padding(bottom = 20.dp), onClick = onNextClick, enabled = reason.isNotBlank(), label = stringResource(id = R.string.next), diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/screen/refund/RefundInfoPage.kt b/presentation/src/main/java/com/nexters/boolti/presentation/screen/refund/RefundInfoPage.kt index 43bc1974..d0a25bec 100644 --- a/presentation/src/main/java/com/nexters/boolti/presentation/screen/refund/RefundInfoPage.kt +++ b/presentation/src/main/java/com/nexters/boolti/presentation/screen/refund/RefundInfoPage.kt @@ -136,8 +136,7 @@ fun RefundInfoPage( modifier = Modifier .fillMaxWidth() .padding(horizontal = marginHorizontal) - .padding(top = 16.dp) - .padding(vertical = 8.dp), + .padding(top = 16.dp, bottom = 20.dp), onClick = onRequest, enabled = uiState.isAbleToRequest, label = stringResource(id = R.string.refund_button) diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/screen/refund/RefundScreen.kt b/presentation/src/main/java/com/nexters/boolti/presentation/screen/refund/RefundScreen.kt index 248d862f..da617429 100644 --- a/presentation/src/main/java/com/nexters/boolti/presentation/screen/refund/RefundScreen.kt +++ b/presentation/src/main/java/com/nexters/boolti/presentation/screen/refund/RefundScreen.kt @@ -86,13 +86,14 @@ fun RefundScreen( val reservation = uiState.reservation ?: return@Scaffold HorizontalPager( - modifier = Modifier.fillMaxSize(), + modifier = Modifier + .fillMaxSize() + .padding(innerPadding), state = pagerState, userScrollEnabled = false, ) { index -> if (index == 0 && !isGift) { ReasonPage( - modifier = Modifier.padding(innerPadding), onNextClick = { scope.launch { pagerState.animateScrollToPage(1) @@ -105,9 +106,6 @@ fun RefundScreen( RefundInfoPage( uiState = uiState, refundPolicy = refundPolicy, - modifier = Modifier - .fillMaxSize() - .padding(innerPadding), reservation = reservation, onRequest = { openDialog = true }, onRefundPolicyChecked = viewModel::toggleRefundPolicyCheck, diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/screen/signout/SignoutScreen.kt b/presentation/src/main/java/com/nexters/boolti/presentation/screen/signout/SignoutScreen.kt index d4047f49..5b386f2a 100644 --- a/presentation/src/main/java/com/nexters/boolti/presentation/screen/signout/SignoutScreen.kt +++ b/presentation/src/main/java/com/nexters/boolti/presentation/screen/signout/SignoutScreen.kt @@ -50,7 +50,7 @@ fun SignoutScreen( modifier = Modifier .fillMaxWidth() .padding(horizontal = marginHorizontal) - .padding(bottom = 42.dp), + .padding(bottom = 20.dp), label = if (firstPage) stringResource(R.string.next) else stringResource(R.string.signout_button), enabled = firstPage || reason.isNotBlank(), onClick = { From 24bab961541692a35c8c079a08c3a906b0a0cb75 Mon Sep 17 00:00:00 2001 From: mangbaam Date: Tue, 31 Dec 2024 23:04:17 +0900 Subject: [PATCH 17/27] =?UTF-8?q?feature/Boolti-343=20=ED=8B=B0=EC=BC=93?= =?UTF-8?q?=20=EC=83=81=EC=84=B8=20=ED=99=94=EB=A9=B4=20=EA=B0=84=EA=B2=A9?= =?UTF-8?q?=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ticket/detail/TicketDetailScreen.kt | 197 +++++++++--------- 1 file changed, 98 insertions(+), 99 deletions(-) diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/screen/ticket/detail/TicketDetailScreen.kt b/presentation/src/main/java/com/nexters/boolti/presentation/screen/ticket/detail/TicketDetailScreen.kt index 7410599d..dd23540f 100644 --- a/presentation/src/main/java/com/nexters/boolti/presentation/screen/ticket/detail/TicketDetailScreen.kt +++ b/presentation/src/main/java/com/nexters/boolti/presentation/screen/ticket/detail/TicketDetailScreen.kt @@ -22,6 +22,7 @@ import androidx.compose.foundation.layout.aspectRatio import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.navigationBarsPadding import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size import androidx.compose.foundation.layout.width @@ -206,7 +207,7 @@ private fun TicketDetailScreen( } Scaffold( - modifier = modifier, + modifier = modifier.navigationBarsPadding(), topBar = { BtBackAppBar( title = stringResource(R.string.ticket_detail_title), @@ -228,6 +229,7 @@ private fun TicketDetailScreen( Column( modifier = Modifier .padding(horizontal = 29.dp) + .padding(bottom = 20.dp) .verticalScroll(scrollState), ) { val ticketShape = TicketShape( @@ -237,7 +239,7 @@ private fun TicketDetailScreen( cornerRadius = 8.dp.toPx(), bottomAreaHeight = ticketSectionHeightUntilTicketInfo, ) - Column( + Box( modifier = Modifier .onGloballyPositioned { coordinates -> contentWidth = coordinates.size.width.toFloat() @@ -254,112 +256,109 @@ private fun TicketDetailScreen( ) ), shape = ticketShape, - ), + ) ) { - Box { - // 배경 블러된 이미지 - Box(contentAlignment = Alignment.BottomCenter) { - AsyncImage( - model = asyncImageBlurModel( - context, - ticketGroup.poster, - radius = 24 - ), - modifier = Modifier - .width(contentWidth.toDp()) - .aspectRatio(317 / 570f) - .alpha(.8f), - contentScale = ContentScale.Crop, - contentDescription = null, - ) - Box( - Modifier - .fillMaxWidth() - .aspectRatio(317 / 125f) - .background( - brush = Brush.verticalGradient( - listOf( - Black.copy(alpha = 0f), - Black - ) - ), - ) - ) - } - Column( + // 배경 블러된 이미지 + Box(contentAlignment = Alignment.BottomCenter) { + AsyncImage( + model = asyncImageBlurModel( + context, + ticketGroup.poster, + radius = 24 + ), modifier = Modifier + .width(contentWidth.toDp()) + .aspectRatio(317 / 570f) + .alpha(.8f), + contentScale = ContentScale.Crop, + contentDescription = null, + ) + Box( + Modifier + .fillMaxWidth() + .aspectRatio(317 / 125f) .background( - brush = Brush.linearGradient( - colors = listOf( - Color(0xCCC5CACD), - Grey95.copy(alpha = .8f) - ), + brush = Brush.verticalGradient( + listOf( + Black.copy(alpha = 0f), + Black + ) ), - shape = ticketShape, ) - ) { - Title(showName = ticketGroup.showName) - - QrCodes( - modifier = Modifier - .fillMaxWidth() - .padding(top = 20.dp) - .padding(horizontal = marginHorizontal), - ticketGroup = ticketGroup, - pagerState = pagerState, - onClickQr = onClickQr, - ) - - DottedDivider( - modifier = Modifier - .fillMaxWidth() - .padding(top = 28.dp) - .padding(horizontal = marginHorizontal), - color = White.copy(alpha = 0.3f), - thickness = 2.dp + ) + } + Column( + modifier = Modifier + .background( + brush = Brush.linearGradient( + colors = listOf( + Color(0xCCC5CACD), + Grey95.copy(alpha = .8f) + ), + ), + shape = ticketShape, ) + ) { + Title(showName = ticketGroup.showName) - Column( - modifier = Modifier - .onGloballyPositioned { coordinates -> - ticketSectionHeightUntilTicketInfo = - coordinates.size.height.toFloat() - } - ) { - Notice(notice = ticketGroup.ticketNotice) - - val copySuccessMessage = - stringResource(id = R.string.ticketing_address_copied_message) - Inquiry( - hostName = ticketGroup.hostName, - hostPhoneNumber = ticketGroup.hostPhoneNumber, - onClickCopyPlace = { - clipboardManager.setText(AnnotatedString(ticketGroup.streetAddress)) - if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.S_V2) { - snackbarHostController.showMessage(copySuccessMessage) - } - }, - onClickNavigateToShowDetail = { - navigateToShowDetail(ticketGroup.showId) - } - ) - } - } + QrCodes( + modifier = Modifier + .fillMaxWidth() + .padding(top = 20.dp) + .padding(horizontal = marginHorizontal), + ticketGroup = ticketGroup, + pagerState = pagerState, + onClickQr = onClickQr, + ) - // 티켓 좌상단 꼭지점 그라데이션 - Box( + DottedDivider( modifier = Modifier - .align(Alignment.TopStart) - .size(105.dp) - .alpha(.45f) - .background( - Brush.linearGradient( - colors = listOf(White, White.copy(alpha = 0f)), - end = Offset(50f, 50f), - ) - ), + .fillMaxWidth() + .padding(top = 28.dp) + .padding(horizontal = marginHorizontal), + color = White.copy(alpha = 0.3f), + thickness = 2.dp ) + + Column( + modifier = Modifier + .onGloballyPositioned { coordinates -> + ticketSectionHeightUntilTicketInfo = + coordinates.size.height.toFloat() + } + ) { + Notice(notice = ticketGroup.ticketNotice) + + val copySuccessMessage = + stringResource(id = R.string.ticketing_address_copied_message) + Inquiry( + hostName = ticketGroup.hostName, + hostPhoneNumber = ticketGroup.hostPhoneNumber, + onClickCopyPlace = { + clipboardManager.setText(AnnotatedString(ticketGroup.streetAddress)) + if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.S_V2) { + snackbarHostController.showMessage(copySuccessMessage) + } + }, + onClickNavigateToShowDetail = { + navigateToShowDetail(ticketGroup.showId) + } + ) + } } + // 티켓 좌상단 꼭지점 그라데이션 + Box( + modifier = Modifier + .align(Alignment.TopStart) + .size(105.dp) + .alpha(.45f) + .background( + Brush.linearGradient( + colors = listOf(White, White.copy(alpha = 0f)), + end = Offset(50f, 50f), + ) + ), + ) } Spacer(modifier = Modifier.size(20.dp)) @@ -371,7 +370,7 @@ private fun TicketDetailScreen( ) { Text( modifier = Modifier - .padding(top = 20.dp, bottom = 60.dp) + .padding(top = 20.dp) .align(Alignment.CenterHorizontally) .clickable { showEnterCodeDialog = true }, text = stringResource(R.string.input_enter_code_button), @@ -384,7 +383,7 @@ private fun TicketDetailScreen( if (uiState.isRefundableGift) { Text( modifier = Modifier - .padding(top = 20.dp, bottom = 60.dp) + .padding(top = 20.dp) .align(Alignment.CenterHorizontally) .clickable { showRefundGiftTicket = true }, text = stringResource(R.string.cancel_registered_gift_button), From e08ce085836511dd30aa08e0cec43035fdd4f5d1 Mon Sep 17 00:00:00 2001 From: mangbaam Date: Tue, 31 Dec 2024 23:22:30 +0900 Subject: [PATCH 18/27] =?UTF-8?q?feature/Boolti-343=20=ED=8B=B0=EC=BC=93?= =?UTF-8?q?=20=EC=83=81=EC=84=B8=20=ED=99=94=EB=A9=B4=20=EA=B0=84=EA=B2=A9?= =?UTF-8?q?=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../screen/ticket/detail/TicketDetailScreen.kt | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/screen/ticket/detail/TicketDetailScreen.kt b/presentation/src/main/java/com/nexters/boolti/presentation/screen/ticket/detail/TicketDetailScreen.kt index dd23540f..542aaa85 100644 --- a/presentation/src/main/java/com/nexters/boolti/presentation/screen/ticket/detail/TicketDetailScreen.kt +++ b/presentation/src/main/java/com/nexters/boolti/presentation/screen/ticket/detail/TicketDetailScreen.kt @@ -217,8 +217,9 @@ private fun TicketDetailScreen( ) { innerPadding -> Box( modifier = Modifier + .fillMaxSize() .padding(innerPadding) - .nestedScroll(pullToRefreshState.nestedScrollConnection) + .nestedScroll(pullToRefreshState.nestedScrollConnection), ) { PullToRefreshContainer( modifier = Modifier @@ -229,8 +230,9 @@ private fun TicketDetailScreen( Column( modifier = Modifier .padding(horizontal = 29.dp) - .padding(bottom = 20.dp) .verticalScroll(scrollState), + verticalArrangement = Arrangement.spacedBy(20.dp), + horizontalAlignment = Alignment.CenterHorizontally, ) { val ticketShape = TicketShape( width = contentWidth, @@ -241,11 +243,11 @@ private fun TicketDetailScreen( ) Box( modifier = Modifier + .padding(top = 16.dp) .onGloballyPositioned { coordinates -> contentWidth = coordinates.size.width.toFloat() ticketSectionHeight = coordinates.size.height.toFloat() } - .padding(top = 16.dp) .clip(ticketShape) .border( width = 1.dp, @@ -361,7 +363,6 @@ private fun TicketDetailScreen( ) } - Spacer(modifier = Modifier.size(20.dp)) RefundPolicySection(uiState.refundPolicy) if ( @@ -370,8 +371,6 @@ private fun TicketDetailScreen( ) { Text( modifier = Modifier - .padding(top = 20.dp) - .align(Alignment.CenterHorizontally) .clickable { showEnterCodeDialog = true }, text = stringResource(R.string.input_enter_code_button), style = MaterialTheme.typography.bodySmall, @@ -383,8 +382,6 @@ private fun TicketDetailScreen( if (uiState.isRefundableGift) { Text( modifier = Modifier - .padding(top = 20.dp) - .align(Alignment.CenterHorizontally) .clickable { showRefundGiftTicket = true }, text = stringResource(R.string.cancel_registered_gift_button), style = MaterialTheme.typography.bodySmall, @@ -392,6 +389,8 @@ private fun TicketDetailScreen( textDecoration = TextDecoration.Underline, ) } + + Spacer(Modifier.size(20.dp)) } } } From 368d4dfcbc63f61d20883f0595033d7251fb62e1 Mon Sep 17 00:00:00 2001 From: mangbaam Date: Sat, 11 Jan 2025 20:44:22 +0900 Subject: [PATCH 19/27] =?UTF-8?q?Boolti-343=20=EC=84=A0=EB=AC=BC=20?= =?UTF-8?q?=EC=99=84=EB=A3=8C,=20=ED=8B=B0=EC=BC=93=EC=84=A0=ED=83=9D=20?= =?UTF-8?q?=EB=B0=94=ED=85=80=EC=8B=9C=ED=8A=B8=20=EB=8C=80=EC=9D=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../screen/giftcomplete/GiftCompleteScreen.kt | 29 ++++++++++--------- .../ticketing/ChooseTicketBottomSheet.kt | 4 +-- 2 files changed, 18 insertions(+), 15 deletions(-) diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/screen/giftcomplete/GiftCompleteScreen.kt b/presentation/src/main/java/com/nexters/boolti/presentation/screen/giftcomplete/GiftCompleteScreen.kt index e32c7944..562c0e28 100644 --- a/presentation/src/main/java/com/nexters/boolti/presentation/screen/giftcomplete/GiftCompleteScreen.kt +++ b/presentation/src/main/java/com/nexters/boolti/presentation/screen/giftcomplete/GiftCompleteScreen.kt @@ -73,7 +73,7 @@ fun GiftCompleteScreen( onClickClose: () -> Unit, navigateToReservation: (reservation: ReservationDetail) -> Unit, viewModel: GiftCompleteViewModel = hiltViewModel(), -) { +) { val reservationState by viewModel.reservation.collectAsStateWithLifecycle() val reservation = reservationState @@ -110,11 +110,14 @@ fun GiftCompleteScreen( PaymentToolbar(onClickHome = onClickHome, onClickClose = onClickClose) }, ) { innerPadding -> - Box { + Box( + modifier = Modifier + .fillMaxSize() + .padding(innerPadding) + .padding(horizontal = marginHorizontal), + ) { Column( modifier = Modifier - .padding(innerPadding) - .padding(horizontal = marginHorizontal) .verticalScroll(rememberScrollState()) ) { val month = reservation.salesEndDateTime.month.value @@ -185,15 +188,15 @@ fun GiftCompleteScreen( ShowInformation( reservation = reservation ) - SecondaryButton( - modifier = Modifier - .fillMaxWidth() - .padding(top = 16.dp) - .padding(vertical = 8.dp), - label = stringResource(R.string.show_reservation), - ) { - navigateToReservation(reservation) - } + } + SecondaryButton( + modifier = Modifier + .align(Alignment.BottomCenter) + .fillMaxWidth() + .padding(top = 16.dp, bottom = 20.dp), + label = stringResource(R.string.show_reservation), + ) { + navigateToReservation(reservation) } } } diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/screen/ticketing/ChooseTicketBottomSheet.kt b/presentation/src/main/java/com/nexters/boolti/presentation/screen/ticketing/ChooseTicketBottomSheet.kt index 1612998a..356b6df9 100644 --- a/presentation/src/main/java/com/nexters/boolti/presentation/screen/ticketing/ChooseTicketBottomSheet.kt +++ b/presentation/src/main/java/com/nexters/boolti/presentation/screen/ticketing/ChooseTicketBottomSheet.kt @@ -137,7 +137,7 @@ private fun ChooseTicketBottomSheetContent1( ) { val listState = rememberLazyListState() Column( - modifier = Modifier.padding(bottom = 20.dp), + modifier = Modifier.padding(bottom = 32.dp), ) { Text( text = stringResource(id = R.string.choose_ticket_bottomsheet_title), @@ -250,7 +250,7 @@ private fun ChooseTicketBottomSheetContent2( label = stringResource(buttonTextId), modifier = Modifier .fillMaxWidth() - .padding(start = 24.dp, end = 24.dp, top = 8.dp, bottom = 24.dp) + .padding(start = 20.dp, end = 20.dp, top = 8.dp, bottom = 20.dp) .height(48.dp), onClick = { onTicketingClicked(ticket, ticketCount) }, ) From 9e177891fc7e1828f04a2204f04edfc71e46f674 Mon Sep 17 00:00:00 2001 From: mangbaam Date: Sat, 11 Jan 2025 20:44:49 +0900 Subject: [PATCH 20/27] =?UTF-8?q?Boolti-343=20=EA=B3=B5=EC=97=B0=20?= =?UTF-8?q?=EC=83=81=EC=84=B8=20=EB=B2=84=ED=8A=BC=EC=9D=98=20=EA=B7=B8?= =?UTF-8?q?=EB=9D=BC=EB=8D=B0=EC=9D=B4=EC=85=98=20UI=20=EC=BB=B4=ED=8F=AC?= =?UTF-8?q?=EB=84=8C=ED=8A=B8=ED=99=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/GradientBackground.kt | 85 +++++++++++++++++++ .../screen/showdetail/ShowDetailButtons.kt | 29 ++----- 2 files changed, 91 insertions(+), 23 deletions(-) create mode 100644 presentation/src/main/java/com/nexters/boolti/presentation/component/GradientBackground.kt diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/component/GradientBackground.kt b/presentation/src/main/java/com/nexters/boolti/presentation/component/GradientBackground.kt new file mode 100644 index 00000000..5c3e1733 --- /dev/null +++ b/presentation/src/main/java/com/nexters/boolti/presentation/component/GradientBackground.kt @@ -0,0 +1,85 @@ +package com.nexters.boolti.presentation.component + +import androidx.compose.foundation.background +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.width +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Surface +import androidx.compose.runtime.Composable +import androidx.compose.runtime.getValue +import androidx.compose.runtime.mutableStateOf +import androidx.compose.runtime.remember +import androidx.compose.runtime.setValue +import androidx.compose.ui.Alignment +import androidx.compose.ui.Modifier +import androidx.compose.ui.graphics.Brush +import androidx.compose.ui.graphics.Color +import androidx.compose.ui.layout.onGloballyPositioned +import androidx.compose.ui.platform.LocalDensity +import androidx.compose.ui.tooling.preview.Preview +import androidx.compose.ui.unit.Dp +import androidx.compose.ui.unit.dp +import com.nexters.boolti.presentation.extension.toDp +import com.nexters.boolti.presentation.theme.BooltiTheme +import com.nexters.boolti.presentation.theme.marginHorizontal + +@Composable +fun TopGradientBackground( + modifier: Modifier = Modifier, + bgColor: Color = MaterialTheme.colorScheme.background, + gradientHeight: Dp = 16.dp, + content: @Composable () -> Unit, +) { + val density = LocalDensity.current + var contentWidthDp by remember { mutableStateOf(0.dp) } + + Column( + modifier = modifier, + ) { + Box( + Modifier + .width(contentWidthDp) + .height(gradientHeight) + .background( + brush = Brush.verticalGradient(listOf(Color.Transparent, bgColor)) + ) + ) + Box( + Modifier + .onGloballyPositioned { contentWidthDp = it.size.width.toDp(density) } + .background(bgColor), + ) { + content() + } + } +} + +@Preview +@Composable +private fun TopGradientBackgroundPreview() { + BooltiTheme { + Surface( + color = Color.White, + ) { + Box( + modifier = Modifier.fillMaxSize(), + ) { + TopGradientBackground( + modifier = Modifier + .align(Alignment.BottomCenter), + ) { + SecondaryButton( + modifier = Modifier + .padding(horizontal = marginHorizontal) + .padding(bottom = 20.dp), + label = "예매하기", + ) { } + } + } + } + } +} diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/screen/showdetail/ShowDetailButtons.kt b/presentation/src/main/java/com/nexters/boolti/presentation/screen/showdetail/ShowDetailButtons.kt index 68ff50c6..27d60431 100644 --- a/presentation/src/main/java/com/nexters/boolti/presentation/screen/showdetail/ShowDetailButtons.kt +++ b/presentation/src/main/java/com/nexters/boolti/presentation/screen/showdetail/ShowDetailButtons.kt @@ -2,18 +2,13 @@ package com.nexters.boolti.presentation.screen.showdetail import androidx.compose.foundation.background import androidx.compose.foundation.layout.Arrangement -import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Row -import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.fillMaxWidth -import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier -import androidx.compose.ui.graphics.Brush -import androidx.compose.ui.graphics.Color -import androidx.compose.ui.layout.onSizeChanged +import androidx.compose.ui.layout.onGloballyPositioned import androidx.compose.ui.platform.LocalDensity import androidx.compose.ui.res.stringResource import androidx.compose.ui.tooling.preview.Preview @@ -23,6 +18,7 @@ import com.nexters.boolti.domain.model.ShowState import com.nexters.boolti.presentation.R import com.nexters.boolti.presentation.component.MainButton import com.nexters.boolti.presentation.component.MainButtonDefaults +import com.nexters.boolti.presentation.component.TopGradientBackground import com.nexters.boolti.presentation.extension.asString import com.nexters.boolti.presentation.extension.toDp import com.nexters.boolti.presentation.theme.BooltiTheme @@ -39,24 +35,11 @@ fun ShowDetailButtons( onHeightChanged: (height: Dp) -> Unit = {}, ) { val density = LocalDensity.current - Column( - modifier = Modifier.onSizeChanged { - onHeightChanged(it.height.toDp(density)) - }, + TopGradientBackground( + modifier = Modifier.onGloballyPositioned { coord -> + onHeightChanged(coord.size.height.toDp(density)) + } ) { - Spacer( - modifier = Modifier - .fillMaxWidth() - .height(16.dp) - .background( - brush = Brush.verticalGradient( - colors = listOf( - Color.Transparent, - MaterialTheme.colorScheme.background, - ) - ) - ) - ) Row( modifier = Modifier .fillMaxWidth() From 53a6e85002e110d33d6089be2faebdbefa87f365 Mon Sep 17 00:00:00 2001 From: mangbaam Date: Sat, 11 Jan 2025 20:44:59 +0900 Subject: [PATCH 21/27] =?UTF-8?q?Boolti-343=20=EB=A1=9C=EA=B7=B8=EC=9D=B8?= =?UTF-8?q?=20=ED=99=94=EB=A9=B4=20=EB=8C=80=EC=9D=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../boolti/presentation/screen/login/LoginScreen.kt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/screen/login/LoginScreen.kt b/presentation/src/main/java/com/nexters/boolti/presentation/screen/login/LoginScreen.kt index 77645681..de97638e 100644 --- a/presentation/src/main/java/com/nexters/boolti/presentation/screen/login/LoginScreen.kt +++ b/presentation/src/main/java/com/nexters/boolti/presentation/screen/login/LoginScreen.kt @@ -1,12 +1,12 @@ package com.nexters.boolti.presentation.screen.login -import android.widget.Toast import androidx.activity.compose.BackHandler import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.navigationBarsPadding import androidx.compose.foundation.layout.padding import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.foundation.text.ClickableText @@ -25,7 +25,6 @@ import androidx.compose.runtime.saveable.rememberSaveable import androidx.compose.runtime.setValue import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier -import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.platform.LocalUriHandler import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.SpanStyle @@ -136,7 +135,9 @@ private fun SignUpBottomSheet( val spanOffset = Pair(term.indexOf(tag), tag.length) Column( - modifier = modifier.padding(horizontal = 24.dp), + modifier = modifier + .padding(horizontal = 24.dp) + .navigationBarsPadding(), ) { Text( modifier = Modifier @@ -169,7 +170,7 @@ private fun SignUpBottomSheet( .fillMaxWidth() .padding(top = 18.dp) .padding(vertical = 8.dp) - .padding(bottom = 34.dp), + .padding(bottom = 20.dp), label = stringResource(id = R.string.signup_with_agreement), onClick = signUp, ) From e395ff2d9ef91a82b0142b05b39dee066d50f87d Mon Sep 17 00:00:00 2001 From: mangbaam Date: Sat, 11 Jan 2025 20:45:18 +0900 Subject: [PATCH 22/27] =?UTF-8?q?Boolti-343=20=EC=98=88=EB=A7=A4=20?= =?UTF-8?q?=ED=99=94=EB=A9=B4=20stateless=20=EC=BB=B4=ED=8F=AC=EC=A0=80?= =?UTF-8?q?=EB=B8=94=20=EB=B6=84=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../screen/ticketing/TicketingScreen.kt | 97 +++++++++++++++---- 1 file changed, 80 insertions(+), 17 deletions(-) diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/screen/ticketing/TicketingScreen.kt b/presentation/src/main/java/com/nexters/boolti/presentation/screen/ticketing/TicketingScreen.kt index b0788a50..b80d1bee 100644 --- a/presentation/src/main/java/com/nexters/boolti/presentation/screen/ticketing/TicketingScreen.kt +++ b/presentation/src/main/java/com/nexters/boolti/presentation/screen/ticketing/TicketingScreen.kt @@ -91,6 +91,8 @@ import com.nexters.boolti.tosspayments.TossPaymentWidgetActivity import com.nexters.boolti.tosspayments.TossPaymentWidgetActivity.Companion.RESULT_FAIL import com.nexters.boolti.tosspayments.TossPaymentWidgetActivity.Companion.RESULT_SOLD_OUT import com.nexters.boolti.tosspayments.TossPaymentWidgetActivity.Companion.RESULT_SUCCESS +import kotlinx.coroutines.flow.Flow +import kotlinx.coroutines.flow.emptyFlow @Composable fun TicketingScreen( @@ -99,10 +101,52 @@ fun TicketingScreen( onBackClicked: () -> Unit = {}, onReserved: (reservationId: String, showId: String) -> Unit, navigateToBusiness: () -> Unit, +) { + val uiState by viewModel.uiState.collectAsStateWithLifecycle() + + TicketingScreen( + showId = viewModel.showId, + salesTicketTypeId = viewModel.salesTicketTypeId, + uiState = uiState, + event = viewModel.event, + onBackClicked = onBackClicked, + onReserved = onReserved, + navigateToBusiness = navigateToBusiness, + onChangeReservationName = viewModel::setReservationName, + onChangeReservationPhoneNumber = viewModel::setReservationPhoneNumber, + onChangeDepositorName = viewModel::setDepositorName, + onChangeDepositorPhoneNumber = viewModel::setDepositorPhoneNumber, + onToggleIsSameContactInfo = viewModel::toggleIsSameContactInfo, + onClickCheckInviteCode = viewModel::checkInviteCode, + onInviteCodeChanged = viewModel::setInviteCode, + onToggleAgreement = viewModel::toggleAgreement, + onClickReservation = viewModel::reservation, + modifier = modifier, + ) +} + +@Composable +private fun TicketingScreen( + showId: String, + salesTicketTypeId: String, + uiState: TicketingState, + event: Flow, + onBackClicked: () -> Unit = {}, + onReserved: (reservationId: String, showId: String) -> Unit, + navigateToBusiness: () -> Unit, + onChangeReservationName: (String) -> Unit, + onChangeReservationPhoneNumber: (String) -> Unit, + onChangeDepositorName: (String) -> Unit, + onChangeDepositorPhoneNumber: (String) -> Unit, + onToggleIsSameContactInfo: () -> Unit, + onClickCheckInviteCode: () -> Unit, + onInviteCodeChanged: (String) -> Unit, + onToggleAgreement: () -> Unit, + onClickReservation: () -> Unit, + modifier: Modifier = Modifier, ) { val scrollState = rememberScrollState() val snackbarHostState = remember { SnackbarHostState() } - val uiState by viewModel.uiState.collectAsStateWithLifecycle() var showConfirmDialog by remember { mutableStateOf(false) } var showPaymentFailureDialog by remember { mutableStateOf(false) } var showTicketSoldOutDialog by remember { mutableStateOf(false) } @@ -117,7 +161,7 @@ fun TicketingScreen( val reservationId = intent.getStringExtra("reservationId") ?: return@rememberLauncherForActivityResult - onReserved(reservationId, viewModel.showId) + onReserved(reservationId, showId) } RESULT_SOLD_OUT -> showTicketSoldOutDialog = true @@ -125,8 +169,8 @@ fun TicketingScreen( } } - LaunchedEffect(viewModel.event) { - viewModel.event.collect { + LaunchedEffect(event) { + event.collect { when (it) { is TicketingEvent.TicketingSuccess -> { showConfirmDialog = false @@ -141,11 +185,11 @@ fun TicketingScreen( clientKey = BuildConfig.TOSS_CLIENT_KEY, customerKey = "user-${it.userId}", orderId = it.orderId, - orderName = "${viewModel.showId}/${uiState.ticketName}/${uiState.ticketCount}/Android", + orderName = "${showId}/${uiState.ticketName}/${uiState.ticketCount}/Android", currency = Currency.KRW.name, countryCode = "KR", - showId = viewModel.showId, - salesTicketTypeId = viewModel.salesTicketTypeId, + showId = showId, + salesTicketTypeId = salesTicketTypeId, ticketCount = uiState.ticketCount, reservationName = uiState.reservationName, reservationPhoneNumber = uiState.reservationContact, @@ -199,8 +243,8 @@ fun TicketingScreen( name = uiState.reservationName, phoneNumber = uiState.reservationContact, isSameContactInfo = uiState.isSameContactInfo, - onNameChanged = viewModel::setReservationName, - onPhoneNumberChanged = viewModel::setReservationPhoneNumber, + onNameChanged = onChangeReservationName, + onPhoneNumberChanged = onChangeReservationPhoneNumber, ) // 입금자 정보 @@ -209,9 +253,9 @@ fun TicketingScreen( name = uiState.depositorName, phoneNumber = uiState.depositorContact, isSameContactInfo = uiState.isSameContactInfo, - onClickSameContact = viewModel::toggleIsSameContactInfo, - onNameChanged = viewModel::setDepositorName, - onPhoneNumberChanged = viewModel::setDepositorPhoneNumber, + onClickSameContact = onToggleIsSameContactInfo, + onNameChanged = onChangeDepositorName, + onPhoneNumberChanged = onChangeDepositorPhoneNumber, ) } @@ -229,8 +273,8 @@ fun TicketingScreen( InviteCodeSection( uiState.inviteCode, uiState.inviteCodeStatus, - onClickCheckInviteCode = viewModel::checkInviteCode, - onInviteCodeChanged = viewModel::setInviteCode, + onClickCheckInviteCode = onClickCheckInviteCode, + onInviteCodeChanged = onInviteCodeChanged, ) } @@ -240,7 +284,7 @@ fun TicketingScreen( OrderAgreementSection( totalAgreed = uiState.orderAgreed, agreement = uiState.orderAgreement, - onClickTotalAgree = viewModel::toggleAgreement, + onClickTotalAgree = onToggleAgreement, onClickShow = { when (it) { 0 -> policyPageUrl = "https://boolti.in/site-policy/privacy" @@ -309,7 +353,7 @@ fun TicketingScreen( ticketName = uiState.ticketName, ticketCount = uiState.ticketCount, totalPrice = uiState.totalPrice, - onClick = viewModel::reservation, + onClick = onClickReservation, onDismiss = { showConfirmDialog = false }, ) } @@ -789,11 +833,30 @@ private fun SectionTicketInfo(label: String, value: String, marginTop: Dp = 16.d @Preview @Composable private fun TicketingDetailScreenPreview() { + val uiState = TicketingState( + showName = "2024 TOGETHER LUCKY CLUB", + ticketName = "일반 티켓 B", + ticketCount = 2, + totalPrice = 5000, + ) BooltiTheme { Surface { TicketingScreen( + showId = "", + salesTicketTypeId = "", + uiState = uiState, + event = emptyFlow(), onReserved = { _, _ -> }, - navigateToBusiness = {} + navigateToBusiness = {}, + onChangeReservationName = {}, + onChangeReservationPhoneNumber = {}, + onChangeDepositorName = {}, + onChangeDepositorPhoneNumber = {}, + onToggleIsSameContactInfo = {}, + onToggleAgreement = {}, + onClickCheckInviteCode = {}, + onInviteCodeChanged = {}, + onClickReservation = {}, ) } } From 06d9515fbe9b20b7f05fb79899c59c45f0443c57 Mon Sep 17 00:00:00 2001 From: mangbaam Date: Sat, 11 Jan 2025 20:50:43 +0900 Subject: [PATCH 23/27] =?UTF-8?q?Boolti-343=20=EA=B2=B0=EC=A0=9C=20?= =?UTF-8?q?=ED=99=94=EB=A9=B4=20=EB=8C=80=EC=9D=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../component/GradientBackground.kt | 5 +++- .../screen/ticketing/TicketingScreen.kt | 25 +++++-------------- 2 files changed, 10 insertions(+), 20 deletions(-) diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/component/GradientBackground.kt b/presentation/src/main/java/com/nexters/boolti/presentation/component/GradientBackground.kt index 5c3e1733..f2ebe297 100644 --- a/presentation/src/main/java/com/nexters/boolti/presentation/component/GradientBackground.kt +++ b/presentation/src/main/java/com/nexters/boolti/presentation/component/GradientBackground.kt @@ -32,13 +32,16 @@ fun TopGradientBackground( modifier: Modifier = Modifier, bgColor: Color = MaterialTheme.colorScheme.background, gradientHeight: Dp = 16.dp, + onHeightChanged: (Dp) -> Unit = {}, content: @Composable () -> Unit, ) { val density = LocalDensity.current var contentWidthDp by remember { mutableStateOf(0.dp) } Column( - modifier = modifier, + modifier = modifier.onGloballyPositioned { + onHeightChanged(it.size.height.toDp(density)) + }, ) { Box( Modifier diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/screen/ticketing/TicketingScreen.kt b/presentation/src/main/java/com/nexters/boolti/presentation/screen/ticketing/TicketingScreen.kt index b80d1bee..9be2d0ff 100644 --- a/presentation/src/main/java/com/nexters/boolti/presentation/screen/ticketing/TicketingScreen.kt +++ b/presentation/src/main/java/com/nexters/boolti/presentation/screen/ticketing/TicketingScreen.kt @@ -44,8 +44,6 @@ import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.draw.clip import androidx.compose.ui.draw.rotate -import androidx.compose.ui.graphics.Brush -import androidx.compose.ui.graphics.RectangleShape import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.res.painterResource import androidx.compose.ui.res.stringResource @@ -72,6 +70,7 @@ import com.nexters.boolti.presentation.component.MainButton import com.nexters.boolti.presentation.component.PolicyBottomSheet import com.nexters.boolti.presentation.component.ShowItem import com.nexters.boolti.presentation.component.ToastSnackbarHost +import com.nexters.boolti.presentation.component.TopGradientBackground import com.nexters.boolti.presentation.extension.filterToPhoneNumber import com.nexters.boolti.presentation.theme.BooltiTheme import com.nexters.boolti.presentation.theme.Error @@ -152,6 +151,7 @@ private fun TicketingScreen( var showTicketSoldOutDialog by remember { mutableStateOf(false) } var policyPageUrl: String? by remember { mutableStateOf(null) } val context = LocalContext.current + var bottomButtonHeight by remember { mutableStateOf(0.dp) } val paymentLauncher = rememberLauncherForActivityResult(ActivityResultContracts.StartActivityForResult()) { result -> @@ -307,26 +307,13 @@ private fun TicketingScreen( modifier = Modifier.fillMaxWidth(), onClick = navigateToBusiness ) - Spacer(modifier = Modifier.height(120.dp)) + Spacer(modifier = Modifier.height(bottomButtonHeight)) } - Column( - modifier = Modifier.align(Alignment.BottomCenter) + TopGradientBackground( + modifier = Modifier.align(Alignment.BottomCenter), + onHeightChanged = { bottomButtonHeight = it }, ) { - Box( - modifier = Modifier - .fillMaxWidth() - .height(16.dp) - .background( - brush = Brush.verticalGradient( - colors = listOf( - MaterialTheme.colorScheme.background.copy(alpha = 0F), - MaterialTheme.colorScheme.background, - ) - ), - shape = RectangleShape, - ) - ) MainButton( modifier = Modifier .fillMaxWidth() From 63369ecaa8298d8aa4b1ade40d6725579b9497d0 Mon Sep 17 00:00:00 2001 From: mangbaam Date: Sat, 11 Jan 2025 20:54:17 +0900 Subject: [PATCH 24/27] =?UTF-8?q?Boolti-343=20=EC=84=A0=EB=AC=BC=20?= =?UTF-8?q?=ED=99=94=EB=A9=B4=20=EB=8C=80=EC=9D=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../presentation/screen/gift/GiftScreen.kt | 25 +++++-------------- 1 file changed, 6 insertions(+), 19 deletions(-) diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/screen/gift/GiftScreen.kt b/presentation/src/main/java/com/nexters/boolti/presentation/screen/gift/GiftScreen.kt index 7f1975af..2183d852 100644 --- a/presentation/src/main/java/com/nexters/boolti/presentation/screen/gift/GiftScreen.kt +++ b/presentation/src/main/java/com/nexters/boolti/presentation/screen/gift/GiftScreen.kt @@ -26,8 +26,6 @@ import androidx.compose.runtime.remember import androidx.compose.runtime.setValue import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier -import androidx.compose.ui.graphics.Brush -import androidx.compose.ui.graphics.RectangleShape import androidx.compose.ui.graphics.vector.ImageVector import androidx.compose.ui.platform.LocalContext import androidx.compose.ui.res.stringResource @@ -45,6 +43,7 @@ import com.nexters.boolti.presentation.component.BusinessInformation import com.nexters.boolti.presentation.component.MainButton import com.nexters.boolti.presentation.component.PolicyBottomSheet import com.nexters.boolti.presentation.component.ShowItem +import com.nexters.boolti.presentation.component.TopGradientBackground import com.nexters.boolti.presentation.screen.ticketing.InputRow import com.nexters.boolti.presentation.screen.ticketing.OrderAgreementSection import com.nexters.boolti.presentation.screen.ticketing.PaymentFailureDialog @@ -73,6 +72,7 @@ fun GiftScreen( var showTicketSoldOutDialog by remember { mutableStateOf(false) } var showPaymentFailureDialog by remember { mutableStateOf(false) } var policyPageUrl: String? by remember { mutableStateOf(null) } + var bottomButtonHeight by remember { mutableStateOf(0.dp) } val paymentLauncher = rememberLauncherForActivityResult(ActivityResultContracts.StartActivityForResult()) { result -> @@ -231,26 +231,13 @@ fun GiftScreen( modifier = Modifier.fillMaxWidth(), onClick = navigateToBusiness ) - Spacer(modifier = Modifier.height(120.dp)) + Spacer(modifier = Modifier.height(bottomButtonHeight)) } - Column( - modifier = Modifier.align(Alignment.BottomCenter) + TopGradientBackground( + modifier = Modifier.align(Alignment.BottomCenter), + onHeightChanged = { bottomButtonHeight = it }, ) { - Box( - modifier = Modifier - .fillMaxWidth() - .height(16.dp) - .background( - brush = Brush.verticalGradient( - colors = listOf( - MaterialTheme.colorScheme.background.copy(alpha = 0F), - MaterialTheme.colorScheme.background, - ) - ), - shape = RectangleShape, - ) - ) MainButton( modifier = Modifier .fillMaxWidth() From abcc82a6968567c11f1f331bf86818f97bb4f78d Mon Sep 17 00:00:00 2001 From: mangbaam Date: Sat, 11 Jan 2025 20:59:24 +0900 Subject: [PATCH 25/27] =?UTF-8?q?Boolti-343=20=EB=A7=81=ED=81=AC,=20sns=20?= =?UTF-8?q?=ED=99=94=EB=A9=B4=20=EB=8C=80=EC=9D=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../presentation/screen/profileedit/link/LinkEditScreen.kt | 4 +++- .../presentation/screen/profileedit/sns/SnsEditScreen.kt | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/screen/profileedit/link/LinkEditScreen.kt b/presentation/src/main/java/com/nexters/boolti/presentation/screen/profileedit/link/LinkEditScreen.kt index 073c0e48..dd99367c 100644 --- a/presentation/src/main/java/com/nexters/boolti/presentation/screen/profileedit/link/LinkEditScreen.kt +++ b/presentation/src/main/java/com/nexters/boolti/presentation/screen/profileedit/link/LinkEditScreen.kt @@ -36,6 +36,7 @@ import com.nexters.boolti.presentation.component.BtAppBarDefaults import com.nexters.boolti.presentation.component.MainButton import com.nexters.boolti.presentation.theme.Grey30 import com.nexters.boolti.presentation.theme.Grey90 +import com.nexters.boolti.presentation.theme.marginHorizontal @Composable fun LinkEditScreen( @@ -171,7 +172,8 @@ fun LinkEditScreen( MainButton( modifier = Modifier .align(Alignment.BottomCenter) - .padding(horizontal = 20.dp, vertical = 8.dp) + .padding(marginHorizontal) + .padding(bottom = 20.dp) .fillMaxWidth(), label = stringResource(R.string.link_remove), colors = ButtonDefaults.buttonColors( diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/screen/profileedit/sns/SnsEditScreen.kt b/presentation/src/main/java/com/nexters/boolti/presentation/screen/profileedit/sns/SnsEditScreen.kt index 1e343cd0..825bc231 100644 --- a/presentation/src/main/java/com/nexters/boolti/presentation/screen/profileedit/sns/SnsEditScreen.kt +++ b/presentation/src/main/java/com/nexters/boolti/presentation/screen/profileedit/sns/SnsEditScreen.kt @@ -175,7 +175,9 @@ private fun SnsEditScreen( Spacer(Modifier.weight(1f)) if (isEditMode) { MainButton( - modifier = Modifier.fillMaxWidth(), + modifier = Modifier + .fillMaxWidth() + .padding(bottom = 20.dp), colors = MainButtonDefaults.buttonColors( containerColor = MaterialTheme.colorScheme.onSurfaceVariant, contentColor = Grey90, @@ -234,7 +236,7 @@ private fun SnsEditPreview() { BooltiTheme { SnsEditScreen( - isEditMode = false, + isEditMode = true, selectedSns = selectedSns, username = username, usernameHasError = usernameHasError, From ed8f98cf9ef2fe6b04d31b40df6b884cb36abbb9 Mon Sep 17 00:00:00 2001 From: mangbaam Date: Sun, 12 Jan 2025 00:15:11 +0900 Subject: [PATCH 26/27] =?UTF-8?q?Boolti-343=20=EC=97=AC=EB=9F=AC=20?= =?UTF-8?q?=ED=8E=98=EC=9D=B4=EC=A7=80=20=ED=95=98=EB=8B=A8=20=EB=A7=88?= =?UTF-8?q?=EC=A7=84=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../presentation/reservationdetail/ReservationDetailScreen.kt | 3 +++ .../nexters/boolti/presentation/screen/link/LinkListScreen.kt | 2 +- .../screen/perforemdshows/PerformedShowsScreen.kt | 2 +- .../screen/profileedit/profile/ProfileEditScreen.kt | 3 +++ .../nexters/boolti/presentation/screen/qr/HostedShowScreen.kt | 4 +++- .../presentation/screen/reservations/ReservationsScreen.kt | 2 +- .../presentation/screen/ticket/detail/TicketDetailScreen.kt | 3 +-- 7 files changed, 13 insertions(+), 6 deletions(-) diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/reservationdetail/ReservationDetailScreen.kt b/presentation/src/main/java/com/nexters/boolti/presentation/reservationdetail/ReservationDetailScreen.kt index 374b1042..6a911647 100644 --- a/presentation/src/main/java/com/nexters/boolti/presentation/reservationdetail/ReservationDetailScreen.kt +++ b/presentation/src/main/java/com/nexters/boolti/presentation/reservationdetail/ReservationDetailScreen.kt @@ -9,6 +9,7 @@ import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.navigationBarsPadding import androidx.compose.foundation.layout.padding @@ -161,6 +162,8 @@ fun ReservationDetailScreen( } ) } + + Spacer(Modifier.size(32.dp)) } if (showRefundDialog) { diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/screen/link/LinkListScreen.kt b/presentation/src/main/java/com/nexters/boolti/presentation/screen/link/LinkListScreen.kt index b9d6683f..586b38da 100644 --- a/presentation/src/main/java/com/nexters/boolti/presentation/screen/link/LinkListScreen.kt +++ b/presentation/src/main/java/com/nexters/boolti/presentation/screen/link/LinkListScreen.kt @@ -88,7 +88,7 @@ private fun LinkListScreen( .padding(horizontal = marginHorizontal) .fillMaxWidth(), verticalArrangement = Arrangement.spacedBy(16.dp), - contentPadding = PaddingValues(vertical = 20.dp), + contentPadding = PaddingValues(top = 20.dp, bottom = 32.dp), ) { items(links) { link -> LinkItem(link = link) { diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/screen/perforemdshows/PerformedShowsScreen.kt b/presentation/src/main/java/com/nexters/boolti/presentation/screen/perforemdshows/PerformedShowsScreen.kt index cdf0aad4..b5a7ddc3 100644 --- a/presentation/src/main/java/com/nexters/boolti/presentation/screen/perforemdshows/PerformedShowsScreen.kt +++ b/presentation/src/main/java/com/nexters/boolti/presentation/screen/perforemdshows/PerformedShowsScreen.kt @@ -78,7 +78,7 @@ private fun PerformedShowsScreen( modifier = Modifier.padding(innerPadding), ) { LazyColumn( - contentPadding = PaddingValues(vertical = 20.dp), + contentPadding = PaddingValues(top = 20.dp, bottom = 32.dp), verticalArrangement = Arrangement.spacedBy(12.dp), ) { items(shows) { show -> diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/screen/profileedit/profile/ProfileEditScreen.kt b/presentation/src/main/java/com/nexters/boolti/presentation/screen/profileedit/profile/ProfileEditScreen.kt index 480c141e..03936dc0 100644 --- a/presentation/src/main/java/com/nexters/boolti/presentation/screen/profileedit/profile/ProfileEditScreen.kt +++ b/presentation/src/main/java/com/nexters/boolti/presentation/screen/profileedit/profile/ProfileEditScreen.kt @@ -374,7 +374,10 @@ fun ProfileEditScreen( } } } + + Spacer(Modifier.size(32.dp)) } + if (saving) BtCircularProgressIndicator(modifier = Modifier.align(Alignment.Center)) } if (showExitAlertDialog) { diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/screen/qr/HostedShowScreen.kt b/presentation/src/main/java/com/nexters/boolti/presentation/screen/qr/HostedShowScreen.kt index 003e23b4..7000af1f 100644 --- a/presentation/src/main/java/com/nexters/boolti/presentation/screen/qr/HostedShowScreen.kt +++ b/presentation/src/main/java/com/nexters/boolti/presentation/screen/qr/HostedShowScreen.kt @@ -8,6 +8,7 @@ import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.navigationBarsPadding import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size import androidx.compose.foundation.lazy.LazyColumn @@ -50,6 +51,7 @@ fun HostedShowScreen( val uiState by viewModel.uiState.collectAsStateWithLifecycle() Scaffold( + modifier = Modifier.navigationBarsPadding(), topBar = { BtBackAppBar( title = stringResource(R.string.hostedShowsTitle), @@ -79,7 +81,7 @@ fun HostedShows( ) { LazyColumn( modifier = modifier, - contentPadding = PaddingValues(vertical = 12.dp), + contentPadding = PaddingValues(top = 12.dp, bottom = 32.dp), verticalArrangement = Arrangement.spacedBy(12.dp), ) { items(shows, key = { show -> show.id }) { show -> diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/screen/reservations/ReservationsScreen.kt b/presentation/src/main/java/com/nexters/boolti/presentation/screen/reservations/ReservationsScreen.kt index 6e376cdb..2bc61af0 100644 --- a/presentation/src/main/java/com/nexters/boolti/presentation/screen/reservations/ReservationsScreen.kt +++ b/presentation/src/main/java/com/nexters/boolti/presentation/screen/reservations/ReservationsScreen.kt @@ -118,7 +118,7 @@ private fun ReservationsContent( ) { LazyColumn( modifier = modifier, - contentPadding = PaddingValues(top = 20.dp) + contentPadding = PaddingValues(top = 20.dp, bottom = 32.dp), ) { items( count = reservations.size, diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/screen/ticket/detail/TicketDetailScreen.kt b/presentation/src/main/java/com/nexters/boolti/presentation/screen/ticket/detail/TicketDetailScreen.kt index 542aaa85..097559f9 100644 --- a/presentation/src/main/java/com/nexters/boolti/presentation/screen/ticket/detail/TicketDetailScreen.kt +++ b/presentation/src/main/java/com/nexters/boolti/presentation/screen/ticket/detail/TicketDetailScreen.kt @@ -390,7 +390,7 @@ private fun TicketDetailScreen( ) } - Spacer(Modifier.size(20.dp)) + Spacer(Modifier.size(32.dp)) } } } @@ -728,7 +728,6 @@ private fun Section( ) { Column( modifier - .padding(bottom = 12.dp) .fillMaxWidth() .border(1.dp, color = White.copy(alpha = .15f), shape = RoundedCornerShape(8.dp)) .padding(start = 20.dp, end = 20.dp, bottom = if (contentVisible) 20.dp else 0.dp) From 3ac8ae4a66438109da62131eed8de4b145f90ce8 Mon Sep 17 00:00:00 2001 From: mangbaam Date: Sun, 12 Jan 2025 00:36:09 +0900 Subject: [PATCH 27/27] =?UTF-8?q?Boolti-343=20develop=20=EB=A8=B8=EC=A7=80?= =?UTF-8?q?=20=EC=B6=A9=EB=8F=8C=20=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../nexters/boolti/presentation/screen/home/HomeScreen.kt | 5 ++++- .../nexters/boolti/presentation/screen/my/MyNavigation.kt | 3 +++ .../boolti/presentation/screen/show/ShowNavigation.kt | 3 +++ .../nexters/boolti/presentation/screen/show/ShowScreen.kt | 2 -- .../boolti/presentation/screen/ticket/TicketNavigation.kt | 4 ++++ 5 files changed, 14 insertions(+), 3 deletions(-) diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/screen/home/HomeScreen.kt b/presentation/src/main/java/com/nexters/boolti/presentation/screen/home/HomeScreen.kt index c68fa82b..9b17ffe1 100644 --- a/presentation/src/main/java/com/nexters/boolti/presentation/screen/home/HomeScreen.kt +++ b/presentation/src/main/java/com/nexters/boolti/presentation/screen/home/HomeScreen.kt @@ -120,11 +120,12 @@ fun HomeScreen( } ) { innerPadding -> NavHost( - modifier = modifier.padding(innerPadding), + modifier = modifier, navController = navController, startDestination = HomeRoute.Show, ) { showScreen( + modifier = Modifier.padding(bottom = innerPadding.calculateBottomPadding()), navigateToShowDetail = navigateToShowDetail, navigateToBusiness = navigateToBusiness, navigateToShowRegistration = { @@ -134,12 +135,14 @@ fun HomeScreen( ) ticketScreen( + modifier = Modifier.padding(innerPadding), isLoggedIn = isLoggedIn, navigateToLogin = navigateToLogin, navigateToTicketDetail = navigateToTicketDetail, ) myScreen( + modifier = Modifier.padding(innerPadding), navigateToLogin = navigateToLogin, navigateToAccountSetting = navigateToAccountSetting, navigateToReservations = navigateToReservations, diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/screen/my/MyNavigation.kt b/presentation/src/main/java/com/nexters/boolti/presentation/screen/my/MyNavigation.kt index b04e1bf8..1e32e59c 100644 --- a/presentation/src/main/java/com/nexters/boolti/presentation/screen/my/MyNavigation.kt +++ b/presentation/src/main/java/com/nexters/boolti/presentation/screen/my/MyNavigation.kt @@ -1,5 +1,6 @@ package com.nexters.boolti.presentation.screen.my +import androidx.compose.ui.Modifier import androidx.navigation.NavGraphBuilder import androidx.navigation.compose.composable import com.nexters.boolti.presentation.screen.navigation.HomeRoute @@ -11,6 +12,7 @@ fun NavGraphBuilder.myScreen( navigateToProfile: () -> Unit, navigateToShowRegistration: () -> Unit, navigateToQrScan: () -> Unit, + modifier: Modifier = Modifier, ) { composable { MyScreen( @@ -20,6 +22,7 @@ fun NavGraphBuilder.myScreen( navigateToProfile = navigateToProfile, navigateToShowRegistration = navigateToShowRegistration, onClickQrScan = navigateToQrScan, + modifier = modifier, ) } } diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/screen/show/ShowNavigation.kt b/presentation/src/main/java/com/nexters/boolti/presentation/screen/show/ShowNavigation.kt index 69e6db02..4e6171e7 100644 --- a/presentation/src/main/java/com/nexters/boolti/presentation/screen/show/ShowNavigation.kt +++ b/presentation/src/main/java/com/nexters/boolti/presentation/screen/show/ShowNavigation.kt @@ -1,6 +1,7 @@ package com.nexters.boolti.presentation.screen.show import android.content.Intent +import androidx.compose.ui.Modifier import androidx.navigation.NavGraphBuilder import androidx.navigation.compose.composable import androidx.navigation.navDeepLink @@ -10,6 +11,7 @@ fun NavGraphBuilder.showScreen( navigateToShowDetail: (showId: String) -> Unit, navigateToBusiness: () -> Unit, navigateToShowRegistration: () -> Unit, + modifier: Modifier = Modifier, ) { composable( deepLinks = listOf( @@ -20,6 +22,7 @@ fun NavGraphBuilder.showScreen( ) ) { ShowScreen( + modifier = modifier, onClickShowItem = navigateToShowDetail, navigateToBusiness = navigateToBusiness, navigateToShowRegistration = navigateToShowRegistration, diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/screen/show/ShowScreen.kt b/presentation/src/main/java/com/nexters/boolti/presentation/screen/show/ShowScreen.kt index c1a3f783..5495ae5b 100644 --- a/presentation/src/main/java/com/nexters/boolti/presentation/screen/show/ShowScreen.kt +++ b/presentation/src/main/java/com/nexters/boolti/presentation/screen/show/ShowScreen.kt @@ -7,7 +7,6 @@ import androidx.compose.foundation.interaction.MutableInteractionSource import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column -import androidx.compose.foundation.layout.ExperimentalLayoutApi import androidx.compose.foundation.layout.PaddingValues import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.Spacer @@ -72,7 +71,6 @@ import com.nexters.boolti.presentation.theme.point1 import com.nexters.boolti.presentation.theme.point4 import com.nexters.boolti.presentation.theme.statusBarHeight -@OptIn(ExperimentalLayoutApi::class) @Composable fun ShowScreen( navigateToBusiness: () -> Unit, diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/screen/ticket/TicketNavigation.kt b/presentation/src/main/java/com/nexters/boolti/presentation/screen/ticket/TicketNavigation.kt index 3fdc490e..a70ed922 100644 --- a/presentation/src/main/java/com/nexters/boolti/presentation/screen/ticket/TicketNavigation.kt +++ b/presentation/src/main/java/com/nexters/boolti/presentation/screen/ticket/TicketNavigation.kt @@ -1,6 +1,7 @@ package com.nexters.boolti.presentation.screen.ticket import android.content.Intent +import androidx.compose.ui.Modifier import androidx.navigation.NavGraphBuilder import androidx.navigation.compose.composable import androidx.navigation.navDeepLink @@ -10,6 +11,7 @@ fun NavGraphBuilder.ticketScreen( isLoggedIn: Boolean?, navigateToTicketDetail: (String) -> Unit, navigateToLogin: () -> Unit, + modifier: Modifier = Modifier, ) { composable( deepLinks = listOf( @@ -21,10 +23,12 @@ fun NavGraphBuilder.ticketScreen( ) { when (isLoggedIn) { true -> TicketScreen( + modifier = modifier, onClickTicket = navigateToTicketDetail, ) false -> TicketLoginScreen( + modifier = modifier, onLoginClick = navigateToLogin )