diff --git a/app/build.gradle.kts b/app/build.gradle.kts index d9e85826..6cbe8cbd 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -30,7 +30,7 @@ android { isDebuggable = true applicationIdSuffix = ".dev" manifestPlaceholders += mapOf( - "appName" to "@string/app_name_dev" + "appName" to "@string/app_name_dev", ) } @@ -38,7 +38,7 @@ android { isDebuggable = false signingConfig = signingConfigs.getByName("release") manifestPlaceholders += mapOf( - "appName" to "@string/app_name" + "appName" to "@string/app_name", ) } } @@ -49,7 +49,6 @@ android { } dependencies { - coreLibraryDesugaring(libs.desugar.jdk) implementations( projects.core.data, projects.core.datastore, @@ -66,10 +65,11 @@ dependencies { libs.androidx.startup, libs.androidx.core, libs.androidx.splash, + libs.androidx.activity.compose, libs.timber, libs.bundles.androidx.compose, platform(libs.firebase.bom), libs.firebase.analytics, - libs.firebase.crashlytics + libs.firebase.crashlytics, ) } diff --git a/app/src/main/kotlin/com/nexters/bandalart/android/MainActivity.kt b/app/src/main/kotlin/com/nexters/bandalart/android/MainActivity.kt index d03ebaf9..40353545 100644 --- a/app/src/main/kotlin/com/nexters/bandalart/android/MainActivity.kt +++ b/app/src/main/kotlin/com/nexters/bandalart/android/MainActivity.kt @@ -3,6 +3,7 @@ package com.nexters.bandalart.android import android.os.Bundle import androidx.activity.ComponentActivity import androidx.activity.compose.setContent +import androidx.activity.enableEdgeToEdge import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen import com.nexters.bandalart.android.core.designsystem.theme.BandalartTheme import com.nexters.bandalart.android.ui.BandalartApp @@ -12,8 +13,11 @@ import dagger.hilt.android.AndroidEntryPoint class MainActivity : ComponentActivity() { override fun onCreate(savedInstanceState: Bundle?) { - super.onCreate(savedInstanceState) installSplashScreen() + super.onCreate(savedInstanceState) + + enableEdgeToEdge() + setContent { BandalartTheme { BandalartApp() diff --git a/build-logic/src/main/kotlin/internal/android.kt b/build-logic/src/main/kotlin/internal/android.kt index 69ec819a..51a42f6f 100644 --- a/build-logic/src/main/kotlin/internal/android.kt +++ b/build-logic/src/main/kotlin/internal/android.kt @@ -41,6 +41,7 @@ internal fun Project.configureAndroid(extension: CommonExtension<*, *, *, *, *>) } dependencies.add("detektPlugins", libs.findLibrary("detekt-plugin-formatting").get()) + dependencies.add("coreLibraryDesugaring", libs.findLibrary("desugar-jdk").get()) buildTypes { getByName("debug") { diff --git a/core/designsystem/src/main/kotlin/com/nexters/bandalart/android/core/designsystem/theme/Theme.kt b/core/designsystem/src/main/kotlin/com/nexters/bandalart/android/core/designsystem/theme/Theme.kt index ed420060..0d3e7ce3 100644 --- a/core/designsystem/src/main/kotlin/com/nexters/bandalart/android/core/designsystem/theme/Theme.kt +++ b/core/designsystem/src/main/kotlin/com/nexters/bandalart/android/core/designsystem/theme/Theme.kt @@ -52,14 +52,8 @@ fun BandalartTheme( darkTheme -> DarkColorScheme else -> LightColorScheme } + val view = LocalView.current - if (!view.isInEditMode) { - SideEffect { - val window = (view.context as Activity).window - window.statusBarColor = colorScheme.primary.toArgb() - WindowCompat.getInsetsController(window, view).isAppearanceLightStatusBars = darkTheme - } - } SideEffect { val window = (view.context as Activity).window diff --git a/core/ui/build.gradle.kts b/core/ui/build.gradle.kts index 91c65dba..024286c8 100644 --- a/core/ui/build.gradle.kts +++ b/core/ui/build.gradle.kts @@ -14,7 +14,6 @@ android { } dependencies { - coreLibraryDesugaring(libs.desugar.jdk) implementations( projects.core.designsystem, projects.core.util, diff --git a/core/ui/src/main/kotlin/com/nexters/bandalart/android/core/ui/WindowInsets.kt b/core/ui/src/main/kotlin/com/nexters/bandalart/android/core/ui/WindowInsets.kt index 6602e22e..839a9f5c 100644 --- a/core/ui/src/main/kotlin/com/nexters/bandalart/android/core/ui/WindowInsets.kt +++ b/core/ui/src/main/kotlin/com/nexters/bandalart/android/core/ui/WindowInsets.kt @@ -23,5 +23,6 @@ val StatusBarAndActionBarHeightDp // https://stackoverflow.com/questions/75123079/how-do-i-detect-which-type-of-navigation-bar-is-active @Composable fun getNavigationBarPadding(): Dp { - return if (NavigationBarHeightDp == 0.dp) 32.dp else NavigationBarHeightDp - 16.dp + return if (NavigationBarHeightDp == 0.dp) 64.dp + else NavigationBarHeightDp } diff --git a/feature/home/build.gradle.kts b/feature/home/build.gradle.kts index 94d59062..05ed45ca 100644 --- a/feature/home/build.gradle.kts +++ b/feature/home/build.gradle.kts @@ -15,7 +15,6 @@ android { } dependencies { - coreLibraryDesugaring(libs.desugar.jdk) implementations( projects.core.designsystem, projects.core.domain, diff --git a/feature/home/src/main/kotlin/com/nexters/bandalart/android/feature/home/BandalartBottomSheet.kt b/feature/home/src/main/kotlin/com/nexters/bandalart/android/feature/home/BandalartBottomSheet.kt index 16957d77..65f02b40 100644 --- a/feature/home/src/main/kotlin/com/nexters/bandalart/android/feature/home/BandalartBottomSheet.kt +++ b/feature/home/src/main/kotlin/com/nexters/bandalart/android/feature/home/BandalartBottomSheet.kt @@ -14,6 +14,7 @@ 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.aspectRatio import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.height @@ -69,7 +70,6 @@ import com.nexters.bandalart.android.core.designsystem.theme.Gray400 import com.nexters.bandalart.android.core.designsystem.theme.Gray700 import com.nexters.bandalart.android.core.designsystem.theme.White import com.nexters.bandalart.android.core.ui.ComponentPreview -import com.nexters.bandalart.android.core.ui.NavigationBarHeightDp import com.nexters.bandalart.android.core.ui.ObserveAsEvents import com.nexters.bandalart.android.core.ui.R import com.nexters.bandalart.android.core.ui.ThemeColor @@ -252,14 +252,16 @@ fun BandalartBottomSheetContent( modifier = modifier .wrapContentSize() .statusBarsPadding() + .navigationBarsPadding() .noRippleClickable { }, sheetState = bottomSheetState, dragHandle = null, + // https://stackoverflow.com/questions/69560253/modal-bottom-sheet-scrim-color-is-not-shown-in-status-bar-in-jetpack-compose + windowInsets = WindowInsets(0, 0, 0, 66), ) { Column( modifier = Modifier .background(White) - .navigationBarsPadding() .noRippleClickable { focusManager.clearFocus() }, ) { Spacer(modifier = Modifier.height(20.dp)) @@ -404,6 +406,7 @@ fun BandalartBottomSheetContent( } if (isMainCell && uiState.isCellDataCopied) { Spacer(modifier = Modifier.height(22.dp)) + Spacer(modifier = Modifier.height(if (uiState.isEmojiPickerOpened) (-32).dp else 0.dp)) BottomSheetSubTitleText(text = stringResource(R.string.bottomsheet_color)) BandalartColorPicker( initColor = ThemeColor( @@ -581,7 +584,7 @@ fun BandalartBottomSheetContent( modifier = Modifier.weight(1f), ) } - Spacer(modifier = Modifier.height(NavigationBarHeightDp + getNavigationBarPadding())) + Spacer(modifier = Modifier.height(getNavigationBarPadding())) } if (scrollState.value > 0) { Column( diff --git a/feature/home/src/main/kotlin/com/nexters/bandalart/android/feature/home/ui/bandalart/BandalartEmojiBottomSheet.kt b/feature/home/src/main/kotlin/com/nexters/bandalart/android/feature/home/ui/bandalart/BandalartEmojiBottomSheet.kt index c2e59460..9c95d57b 100644 --- a/feature/home/src/main/kotlin/com/nexters/bandalart/android/feature/home/ui/bandalart/BandalartEmojiBottomSheet.kt +++ b/feature/home/src/main/kotlin/com/nexters/bandalart/android/feature/home/ui/bandalart/BandalartEmojiBottomSheet.kt @@ -3,6 +3,7 @@ package com.nexters.bandalart.android.feature.home.ui.bandalart import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.WindowInsets import androidx.compose.foundation.layout.wrapContentSize import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.material3.ModalBottomSheet @@ -33,6 +34,7 @@ fun BandalartEmojiBottomSheet( modifier = modifier.wrapContentSize(), sheetState = bottomSheetState, dragHandle = null, + windowInsets = WindowInsets(0, 0, 0, 0), ) { Column { BandalartEmojiPicker( diff --git a/feature/home/src/main/kotlin/com/nexters/bandalart/android/feature/home/ui/bandalart/BandalartEmojiPicker.kt b/feature/home/src/main/kotlin/com/nexters/bandalart/android/feature/home/ui/bandalart/BandalartEmojiPicker.kt index 01a3edde..c1aaa51b 100644 --- a/feature/home/src/main/kotlin/com/nexters/bandalart/android/feature/home/ui/bandalart/BandalartEmojiPicker.kt +++ b/feature/home/src/main/kotlin/com/nexters/bandalart/android/feature/home/ui/bandalart/BandalartEmojiPicker.kt @@ -9,10 +9,8 @@ import androidx.compose.foundation.layout.Arrangement 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.aspectRatio import androidx.compose.foundation.layout.fillMaxWidth -import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.padding import androidx.compose.foundation.shape.RoundedCornerShape import androidx.compose.material3.Card @@ -34,7 +32,6 @@ import com.nexters.bandalart.android.core.designsystem.theme.Gray100 import com.nexters.bandalart.android.core.designsystem.theme.Gray400 import com.nexters.bandalart.android.core.designsystem.theme.White import com.nexters.bandalart.android.core.ui.ComponentPreview -import com.nexters.bandalart.android.core.ui.NavigationBarHeightDp import com.nexters.bandalart.android.core.ui.component.EmojiText import kotlinx.coroutines.launch @@ -139,7 +136,6 @@ fun BandalartEmojiPicker( } } } - Spacer(modifier = Modifier.height(NavigationBarHeightDp)) } } diff --git a/feature/home/src/main/kotlin/com/nexters/bandalart/android/feature/home/ui/bandalart/BandalartListBottomSheet.kt b/feature/home/src/main/kotlin/com/nexters/bandalart/android/feature/home/ui/bandalart/BandalartListBottomSheet.kt index 18e17362..9cc0cb3e 100644 --- a/feature/home/src/main/kotlin/com/nexters/bandalart/android/feature/home/ui/bandalart/BandalartListBottomSheet.kt +++ b/feature/home/src/main/kotlin/com/nexters/bandalart/android/feature/home/ui/bandalart/BandalartListBottomSheet.kt @@ -9,6 +9,7 @@ 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.WindowInsets import androidx.compose.foundation.layout.aspectRatio import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.height @@ -43,7 +44,6 @@ import com.nexters.bandalart.android.core.designsystem.theme.Gray800 import com.nexters.bandalart.android.core.designsystem.theme.Gray900 import com.nexters.bandalart.android.core.designsystem.theme.White import com.nexters.bandalart.android.core.ui.ComponentPreview -import com.nexters.bandalart.android.core.ui.NavigationBarHeightDp import com.nexters.bandalart.android.core.ui.R import com.nexters.bandalart.android.core.ui.component.FixedSizeText import com.nexters.bandalart.android.core.ui.getNavigationBarPadding @@ -74,6 +74,7 @@ fun BandalartListBottomSheet( onDismissRequest = onCancelClicked, sheetState = bottomSheetState, dragHandle = null, + windowInsets = WindowInsets(0, 0, 0, 0), ) { Column( modifier = Modifier @@ -116,7 +117,7 @@ fun BandalartListBottomSheet( LazyColumn( modifier = Modifier.padding(horizontal = 20.dp), verticalArrangement = Arrangement.spacedBy(12.dp), - contentPadding = PaddingValues(bottom = NavigationBarHeightDp + getNavigationBarPadding()), + contentPadding = PaddingValues(bottom = 20.dp), ) { items( count = bandalartList.size, @@ -136,36 +137,34 @@ fun BandalartListBottomSheet( onCancelClicked = onCancelClicked, ) } - item { - Spacer(modifier = Modifier.height(20.dp)) + } + Row { + Button( + modifier = Modifier + .weight(1f) + .height(56.dp) + .padding(horizontal = 24.dp), + onClick = createBandalart, + colors = ButtonDefaults.buttonColors(containerColor = Gray200), + ) { Row { - Button( - modifier = Modifier - .weight(1f) - .height(56.dp) - .padding(horizontal = 24.dp), - onClick = createBandalart, - colors = ButtonDefaults.buttonColors(containerColor = Gray200), - ) { - Row { - Icon( - imageVector = Icons.Default.Add, - contentDescription = stringResource(R.string.add_descrption), - tint = Gray600, - modifier = Modifier.size(20.dp), - ) - Spacer(modifier = Modifier.padding(start = 4.dp)) - FixedSizeText( - text = stringResource(R.string.bandalart_list_add), - color = Gray800, - fontSize = 16.sp, - fontWeight = FontWeight.W600, - ) - } - } + Icon( + imageVector = Icons.Default.Add, + contentDescription = stringResource(R.string.add_descrption), + tint = Gray600, + modifier = Modifier.size(20.dp), + ) + Spacer(modifier = Modifier.padding(start = 4.dp)) + FixedSizeText( + text = stringResource(R.string.bandalart_list_add), + color = Gray800, + fontSize = 16.sp, + fontWeight = FontWeight.W600, + ) } } } + Spacer(modifier = Modifier.height(getNavigationBarPadding())) } } } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 65f2e84e..dc4873ad 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,49 +1,49 @@ [versions] -android-gradle-plugin = "8.1.4" +android-gradle-plugin = "8.2.2" gradle-dependency-handler-extensions = "1.1.0" google-secrets = "2.0.1" -google-service = "4.4.0" +google-service = "4.4.1" -kotlin-core = "1.9.20" -kotlin-detekt = "1.23.3" +kotlin-core = "1.9.22" +kotlin-detekt = "1.23.5" kotlin-ktlint-gradle = "11.6.1" -kotlin-ktlint-source = "0.49.1" +kotlin-ktlint-source = "0.50.0" -kotlinx-coroutines = "1.7.3" +kotlinx-coroutines = "1.8.0" kotlinx-datetime = "0.4.0" kotlinx-serialization = "1.6.2" kotlinx-serialization-converter = "1.0.0" -kotlinx-collections-immutable = "0.3.6" +kotlinx-collections-immutable = "0.3.7" -android-hilt = "2.49" +android-hilt = "2.50" androidx-core = "1.12.0" androidx-datastore = "1.0.0" -androidx-lifecycle-runtime = "2.6.2" +androidx-lifecycle-runtime = "2.7.0" androidx-splash = "1.0.1" androidx-startup = "1.1.1" -androidx-activity-compose = "1.8.1" -androidx-compose-compiler = "1.5.4" -androidx-compose-bom = "2023.10.01" -androidx-compose-material3 = "1.2.0-alpha12" +androidx-activity-compose = "1.8.2" +androidx-compose-compiler = "1.5.8" +androidx-compose-bom = "2024.02.00" +androidx-compose-material3 = "1.2.0" androidx-compose-runtime-tracing = "1.0.0-beta01" androidx-compose-constraintlayout = "1.0.1" -androidx-compose-navigation = "2.7.5" +androidx-compose-navigation = "2.7.7" androidx-hilt-navigation-compose = "1.1.0" desugar-jdk = "2.0.4" javax-inject = "1" -ktor-client = "2.3.5" +ktor-client = "2.3.8" retrofit = "2.9.0" -okhttp = "5.0.0-alpha.11" +okhttp = "5.0.0-alpha.12" lottie-compose = "5.2.0" timber = "5.0.1" facebook-shimmer = "0.5.0" -firebase-bom = "32.6.0" +firebase-bom = "32.7.2" firebase-crashlytics = "2.9.9" -ksp = "1.9.20-1.0.14" +ksp = "1.9.22-1.0.17" test-kotest = "5.8.0"