Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions app/src/main/kotlin/com/bff/wespot/main/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ import android.content.pm.PackageManager
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.activity.result.contract.ActivityResultContracts
import androidx.activity.viewModels
import androidx.core.content.ContextCompat
Expand Down Expand Up @@ -41,6 +43,14 @@ class MainActivity : ComponentActivity() {
lateinit var analyticsHelper: AnalyticsHelper

override fun onCreate(savedInstanceState: Bundle?) {
enableEdgeToEdge(
statusBarStyle = SystemBarStyle.dark(
scrim = android.graphics.Color.TRANSPARENT,
),
navigationBarStyle = SystemBarStyle.dark(
scrim = android.graphics.Color.TRANSPARENT,
),
)
super.onCreate(savedInstanceState)
requestNotificationPermission()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.RowScope
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.material3.Icon
import androidx.compose.material3.NavigationBar
Expand Down Expand Up @@ -40,10 +41,12 @@ internal fun BottomNavigationTab(
) {
NavigationBar(
containerColor = WeSpotThemeManager.colors.naviColor,
modifier = modifier.height(69.dp),
modifier = modifier.navigationBarsPadding(),
) {
Row(
modifier = Modifier.fillMaxWidth(),
modifier = Modifier
.fillMaxWidth()
.height(69.dp),
horizontalArrangement = Arrangement.SpaceAround,
verticalAlignment = Alignment.CenterVertically,
) {
Expand Down
10 changes: 10 additions & 0 deletions app/src/main/kotlin/com/bff/wespot/splash/SplashActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ package com.bff.wespot.splash
import android.os.Build
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.SystemBarStyle
import androidx.activity.enableEdgeToEdge
import androidx.activity.viewModels
import androidx.core.splashscreen.SplashScreen.Companion.installSplashScreen
import androidx.lifecycle.Lifecycle
Expand Down Expand Up @@ -30,6 +32,14 @@ class SplashActivity : ComponentActivity() {

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
enableEdgeToEdge(
statusBarStyle = SystemBarStyle.dark(
scrim = android.graphics.Color.TRANSPARENT,
),
navigationBarStyle = SystemBarStyle.dark(
scrim = android.graphics.Color.TRANSPARENT,
),
)

// Push Notification으로 접근 시, setOnExitAnimationListener이 호출되지 않는다.
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S && !isNavigateFromPushNotification) {
Expand Down
10 changes: 10 additions & 0 deletions feature/auth/src/main/kotlin/com/bff/wespot/auth/AuthActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ import android.os.Bundle
import android.view.View
import android.view.ViewTreeObserver
import androidx.activity.ComponentActivity
import androidx.activity.SystemBarStyle
import androidx.activity.compose.setContent
import androidx.activity.enableEdgeToEdge
import androidx.activity.viewModels
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.material3.Surface
Expand Down Expand Up @@ -68,6 +70,14 @@ class AuthActivity : ComponentActivity() {

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
enableEdgeToEdge(
statusBarStyle = SystemBarStyle.dark(
scrim = android.graphics.Color.TRANSPARENT,
),
navigationBarStyle = SystemBarStyle.dark(
scrim = android.graphics.Color.TRANSPARENT,
),
)
val toastMessage = intent.getStringExtra(EXTRA_TOAST_MESSAGE)
val from = intent.getStringExtra(EXTRA_FROM)
intent.removeExtra(EXTRA_TOAST_MESSAGE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.aspectRatio
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.width
import androidx.compose.foundation.pager.rememberPagerState
Expand Down Expand Up @@ -111,7 +112,12 @@ fun AuthScreen(
}
}

Box(modifier = Modifier.fillMaxSize(), contentAlignment = Alignment.BottomCenter) {
Box(
modifier = Modifier
.fillMaxSize()
.navigationBarsPadding(),
contentAlignment = Alignment.BottomCenter,
) {
Button(
onClick = {
coroutineScope.launch {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.imePadding
import androidx.compose.foundation.layout.navigationBarsPadding
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.text.KeyboardOptions
import androidx.compose.material3.ExperimentalMaterial3Api
Expand Down Expand Up @@ -113,7 +114,8 @@ fun ClassScreen(
Box(
modifier = Modifier
.fillMaxSize()
.imePadding(),
.imePadding()
.navigationBarsPadding(),
contentAlignment = Alignment.BottomCenter,
) {
WSButton(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.aspectRatio
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.runtime.Composable
import androidx.compose.runtime.getValue
Expand Down Expand Up @@ -69,7 +70,12 @@ fun CompleteScreen(
)
}

Box(modifier = Modifier.fillMaxSize(), contentAlignment = Alignment.BottomCenter) {
Box(
modifier = Modifier
.fillMaxSize()
.navigationBarsPadding(),
contentAlignment = Alignment.BottomCenter,
) {
Column {
WSButton(
onClick = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -364,9 +364,9 @@ private fun RegisterBottomSheetContent(
},
modifier = Modifier.clickable {
if (checked[0]) {
action(AuthAction.OnConsentChanged(listOf(false, false, false, false)))
action(AuthAction.OnConsentChanged(listOf(false, false, false, false, false)))
} else {
action(AuthAction.OnConsentChanged(listOf(true, true, true, true)))
action(AuthAction.OnConsentChanged(listOf(true, true, true, true, true)))
}
},
)
Expand All @@ -381,6 +381,31 @@ private fun RegisterBottomSheetContent(
Column(
modifier = Modifier.padding(top = 14.dp, bottom = 38.dp, start = 30.dp, end = 20.dp),
) {
TermRow(
title = stringResource(R.string.over_14),
checked = checked[4],
navigateToWebLink = {
navigator.navigateToWebLink(
context = context,
webLink = state.termsOfServiceLink,
)
},
onClicked = {
action(
AuthAction.OnConsentChanged(
checked.toMutableList().apply {
if (this[4]) {
this[4] = false
this[0] = false
} else {
this[4] = true
}
},
),
)
},
)

TermRow(
title = stringResource(id = R.string.service_term),
checked = checked[1],
Expand Down Expand Up @@ -460,7 +485,7 @@ private fun RegisterBottomSheetContent(
WSButton(
onClick = onClicked,
text = stringResource(id = R.string.accept_and_start),
enabled = checked.drop(1).take(2).all { it },
enabled = checked[1] && checked[2] && checked[4],
) {
it.invoke()
}
Expand All @@ -481,7 +506,8 @@ private fun TermRow(
.clip(RoundedCornerShape(8.dp))
.clickableSingle {
navigateToWebLink.invoke()
}.padding(start = 8.dp, end = 22.dp, top = 12.dp, bottom = 12.dp),
}
.padding(start = 8.dp, end = 22.dp, top = 12.dp, bottom = 12.dp),
) {
Icon(
painter = painterResource(id = com.bff.wespot.ui.R.drawable.exclude),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
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.material3.ExperimentalMaterial3Api
import androidx.compose.material3.Icon
Expand Down Expand Up @@ -146,7 +147,12 @@ fun GradeScreen(
}
}

Box(modifier = Modifier.fillMaxSize(), contentAlignment = Alignment.BottomCenter) {
Box(
modifier = Modifier
.fillMaxSize()
.navigationBarsPadding(),
contentAlignment = Alignment.BottomCenter,
) {
WSButton(
onClick = {
if (edit) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.imePadding
import androidx.compose.foundation.layout.navigationBarsPadding
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.shape.CircleShape
Expand Down Expand Up @@ -115,7 +116,8 @@ internal fun ImageScreen(
),
),
)
}.clip(CircleShape)
}
.clip(CircleShape)
.size(110.dp),
contentScale = ContentScale.Crop,
)
Expand Down Expand Up @@ -186,7 +188,8 @@ internal fun ImageScreen(
Box(
modifier = Modifier
.fillMaxSize()
.imePadding(),
.imePadding()
.navigationBarsPadding(),
contentAlignment = Alignment.BottomCenter,
) {
WSButton(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ 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.material3.ExperimentalMaterial3Api
import androidx.compose.material3.Scaffold
Expand Down Expand Up @@ -138,7 +139,12 @@ fun NameScreen(
}
}

Box(modifier = Modifier.fillMaxSize(), contentAlignment = Alignment.BottomCenter) {
Box(
modifier = Modifier
.fillMaxSize()
.navigationBarsPadding(),
contentAlignment = Alignment.BottomCenter,
) {
WSButton(
onClick = {
if (edit) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.imePadding
import androidx.compose.foundation.layout.navigationBarsPadding
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.size
import androidx.compose.foundation.lazy.LazyColumn
Expand Down Expand Up @@ -188,6 +189,7 @@ fun SchoolScreen(
modifier = Modifier
.fillMaxSize()
.imePadding()
.navigationBarsPadding()
.zIndex(2f),
contentAlignment = Alignment.BottomCenter,
) {
Expand Down
1 change: 1 addition & 0 deletions feature/auth/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@
<string name="introduction_placeholder">(ex. 귀염둥이 엥뿌삐 ENFP)</string>
<string name="line_limit_20">%1$s / 20</string>
<string name="profile_image">프로필 이미지</string>
<string name="over_14">(필수) 만 14세 이상입니다</string>
</resources>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ package com.bff.wespot.community.all

import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.SystemBarStyle
import androidx.activity.compose.setContent
import androidx.activity.enableEdgeToEdge
import androidx.activity.viewModels
import androidx.compose.animation.fadeIn
import androidx.compose.animation.fadeOut
Expand Down Expand Up @@ -39,6 +41,14 @@ class CommunityAllActivity : ComponentActivity() {
@OptIn(ExperimentalMaterial3Api::class)
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
enableEdgeToEdge(
statusBarStyle = SystemBarStyle.dark(
scrim = android.graphics.Color.TRANSPARENT,
),
navigationBarStyle = SystemBarStyle.dark(
scrim = android.graphics.Color.TRANSPARENT,
),
)
setContent {
val navController = rememberNavController()
var title by remember {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ package com.bff.wespot.community.categorydetail

import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.SystemBarStyle
import androidx.activity.compose.setContent
import androidx.activity.enableEdgeToEdge
import androidx.activity.viewModels
import androidx.compose.runtime.getValue
import androidx.core.view.WindowCompat
import androidx.paging.compose.collectAsLazyPagingItems
import com.bff.wespot.community.categorydetail.screen.CategoryScreen
import com.bff.wespot.community.categorydetail.state.CategoryDetailSideEffect
Expand All @@ -26,8 +26,14 @@ class CategoryDetailActivity : ComponentActivity() {

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
enableEdgeToEdge()
WindowCompat.setDecorFitsSystemWindows(window, false)
enableEdgeToEdge(
statusBarStyle = SystemBarStyle.dark(
scrim = android.graphics.Color.TRANSPARENT,
),
navigationBarStyle = SystemBarStyle.dark(
scrim = android.graphics.Color.TRANSPARENT,
),
)

setContent {
WeSpotTheme {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ package com.bff.wespot.community.detail
import android.content.Intent
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.SystemBarStyle
import androidx.activity.compose.setContent
import androidx.activity.enableEdgeToEdge
import androidx.activity.result.contract.ActivityResultContracts
import androidx.activity.viewModels
import androidx.compose.runtime.getValue
Expand Down Expand Up @@ -35,6 +37,14 @@ class PostDetailActivity : ComponentActivity() {

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
enableEdgeToEdge(
statusBarStyle = SystemBarStyle.dark(
scrim = android.graphics.Color.TRANSPARENT,
),
navigationBarStyle = SystemBarStyle.dark(
scrim = android.graphics.Color.TRANSPARENT,
),
)

setContent {
val state by viewModel.collectAsState()
Expand Down
Loading
Loading