Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
28877e8
#183 [feat] : add View extension for status bar color management in a…
chanubc Oct 18, 2025
bb72ea1
#183 [feat] : update theme to use transparent status and navigation b…
chanubc Oct 18, 2025
091a186
#183 [chore] : remove unused function
chanubc Oct 18, 2025
d04b1e8
#183 [feat] : update compileSdk and dependencies for Android 15 support
chanubc Oct 18, 2025
f8c14f4
#183 [feat] : refactor layout to support edge-to-edge display and man…
chanubc Oct 18, 2025
4770ca5
#183 [feat] : compose ν™”λ©΄ enable edge to edge 적용
chanubc Oct 18, 2025
b1f825a
#183 [refact] : version 변경에 λ”°λ₯Έ deprecated μ½”λ“œ μˆ˜μ •
chanubc Oct 18, 2025
2da1bc7
#183 [fix] : update LaunchedEffect to use lifecycleOwner for better l…
chanubc Oct 18, 2025
e324f46
#183 [fix] : correct ViewCompat listener to use the view itself for s…
chanubc Oct 18, 2025
61ae7fe
#183 [fix] : remove unused function
chanubc Oct 18, 2025
09fc954
#183 [fix] : update compileSdkVersion to 36 in CI configuration
chanubc Oct 18, 2025
69036c5
#183 [fix] : update build command to include clean step for better bu…
chanubc Oct 18, 2025
4738992
#183 [fix] : update cache key in CI configuration for improved cache …
chanubc Oct 18, 2025
d6faffd
#183 [fix] : 버전 변경에 λ”°λ₯Έ app:navGraph xml νƒœκ·Έ λͺ»μ°ΎλŠ” 였λ₯˜ ν•΄κ²°
chanubc Oct 18, 2025
ff9e0ac
Revert "#183 [fix] : update cache key in CI configuration for improve…
chanubc Oct 18, 2025
d63fb76
Revert "#183 [fix] : update build command to include clean step for b…
chanubc Oct 18, 2025
b690b2e
#183 [fix] : edge to edge 전체화면 μ μš©μ— λ”°λ₯Έ status bar padding μΆ”κ°€
chanubc Oct 19, 2025
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
2 changes: 1 addition & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ fun String.removeQuotes(): String {

android {
namespace = "com.teamwable.wable"
compileSdk = 34
compileSdk = libs.versions.compileSdk.get().toInt()

defaultConfig {
applicationId = "com.teamwable.wable"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,6 @@ fun Context.pxToDp(px: Int): Int {
).toInt()
}

fun Context.statusBarColorOf(
@ColorRes resId: Int,
) {
if (this is Activity) {
window?.statusBarColor = colorOf(resId)
}
}

fun Context.statusBarModeOf(isLightStatusBar: Boolean = true) {
if (this is Activity) {
window.apply {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,6 @@ val Fragment.viewLifeCycle
val Fragment.viewLifeCycleScope
get() = viewLifecycleOwner.lifecycleScope

fun Fragment.statusBarColorOf(
@ColorRes resId: Int,
) {
requireActivity().statusBarColorOf(resId)
}

fun Fragment.openUri(uri: String) {
Intent(Intent.ACTION_VIEW, Uri.parse(uri)).also {
runCatching { startActivity(it) }
Expand Down
23 changes: 23 additions & 0 deletions core/ui/src/main/java/com/teamwable/ui/extensions/ViewExt.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package com.teamwable.ui.extensions

import android.view.View
import androidx.annotation.ColorRes
import androidx.core.view.ViewCompat
import androidx.core.view.WindowInsetsCompat
import androidx.core.view.updateLayoutParams

fun View.visible(isVisible: Boolean) {
this.visibility = if (isVisible) View.VISIBLE else View.GONE
}

fun View.setStatusBarColor(@ColorRes resId: Int) {
setBackgroundResource(resId)

ViewCompat.setOnApplyWindowInsetsListener(this.rootView) { _, windowInsets ->
val insets = windowInsets.getInsets(WindowInsetsCompat.Type.statusBars())
updateLayoutParams {
height = insets.top
}
windowInsets
}
}

This file was deleted.

3 changes: 2 additions & 1 deletion core/ui/src/main/res/values/themes.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<resources>
<!-- Base application theme. -->
<style name="Base.Theme.Wable" parent="Theme.Material3.Light.NoActionBar">
<item name="android:statusBarColor">@android:color/white</item>
<item name="android:statusBarColor">@android:color/transparent</item>
<item name="android:navigationBarColor">@android:color/transparent</item>
<item name="android:windowLightStatusBar">true</item>
<item name="android:windowBackground">@color/white</item>
<item name="android:windowIsTranslucent">true</item>
Expand Down
7 changes: 3 additions & 4 deletions feature/auth/src/main/java/com/teamwable/auth/LoginScreen.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,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.material3.Text
import androidx.compose.runtime.Composable
Expand Down Expand Up @@ -37,8 +38,6 @@ import com.teamwable.common.util.AmplitudeSignInTag.CLICK_SIGNIN_KAKAO
import com.teamwable.common.util.AmplitudeUtil.trackEvent
import com.teamwable.designsystem.component.dialog.WableOneButtonDialog
import com.teamwable.designsystem.extension.modifier.noRippleDebounceClickable
import com.teamwable.designsystem.extension.system.SetStatusBarColor
import com.teamwable.designsystem.theme.SystemLoginSystemAppBar
import com.teamwable.designsystem.theme.WableTheme
import com.teamwable.designsystem.type.DialogType

Expand Down Expand Up @@ -88,8 +87,6 @@ fun LoginRoute(
fun LoginScreen(
onLoginBtnClick: () -> Unit,
) {
SetStatusBarColor(color = SystemLoginSystemAppBar)

val configuration = LocalConfiguration.current
val screenHeightPx = with(LocalDensity.current) { configuration.screenHeightDp.dp.toPx() }
val halfScreenHeightPx = screenHeightPx * 0.514f
Expand Down Expand Up @@ -156,6 +153,8 @@ fun LoginScreen(
.aspectRatio(6.56f)
.noRippleDebounceClickable { onLoginBtnClick() },
)

Spacer(modifier = Modifier.navigationBarsPadding())
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@ import android.content.pm.ActivityInfo
import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.activity.enableEdgeToEdge
import com.teamwable.common.di.MAIN
import com.teamwable.common.intentprovider.IntentProvider
import com.teamwable.designsystem.extension.system.SetLightNavigationBar
import com.teamwable.designsystem.extension.system.SetStatusBarColor
import com.teamwable.designsystem.theme.WableTheme
import com.teamwable.designsystem.theme.WableTheme.colors
import dagger.hilt.android.AndroidEntryPoint
import javax.inject.Inject

Expand All @@ -23,12 +21,11 @@ class MainComposeActivity : ComponentActivity() {
@SuppressLint("SourceLockedOrientationActivity")
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
enableEdgeToEdge()
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT
setContent {
WableTheme {
val navigator: MainNavigator = rememberMainNavigator()
SetStatusBarColor(color = colors.white)
SetLightNavigationBar()
MainScreen(
navigator = navigator,
intentProvider = intentProvider,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import androidx.compose.foundation.layout.Box
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.material3.Scaffold
import androidx.compose.material3.SnackbarHost
import androidx.compose.material3.SnackbarHostState
Expand All @@ -14,7 +15,6 @@ import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.LocalContext
import androidx.compose.ui.unit.dp
import androidx.compose.ui.zIndex
import androidx.core.content.ContextCompat.startActivity
import androidx.navigation.NavGraph.Companion.findStartDestination
import androidx.navigation.compose.NavHost
import androidx.navigation.navOptions
Expand Down Expand Up @@ -56,6 +56,7 @@ internal fun MainScreen(
Scaffold(
topBar = {
WableAppBar(
modifier = Modifier.statusBarsPadding(),
visibility = navigator.shouldShowTopBar(),
canNavigateBack = navigator.isBackStackNotEmpty(),
navigateUp = { navigator.navigateUp() },
Expand All @@ -64,9 +65,11 @@ internal fun MainScreen(
},
content = { innerPadding ->
Box(
modifier = Modifier
.fillMaxSize()
.padding(innerPadding),
modifier =
if (!navigator.shouldShowTopBar()) Modifier.fillMaxSize()
else Modifier
.fillMaxSize()
.padding(innerPadding),
) {
NavHost(
navController = navigator.navController,
Expand All @@ -84,11 +87,11 @@ internal fun MainScreen(
navOptions = navOptions,
)
},
navigateToHome = { startActivity(localContext, intent, null) },
navigateToHome = { localContext.startActivity(intent) },
)
loginNavGraph(
navigateToFirstLckWatch = { navigator.navigateToFirstLckWatch() },
navigateToHome = { startActivity(localContext, intent, null) },
navigateToHome = { localContext.startActivity(intent) },
onShowErrorSnackBar = onShowErrorSnackBar,
)
firstLckWatchNavGraph(
Expand All @@ -104,7 +107,7 @@ internal fun MainScreen(
onShowErrorSnackBar = onShowErrorSnackBar,
)
agreeTermsNavGraph(
navigateToHome = { startActivity(localContext, intent, null) },
navigateToHome = { localContext.startActivity(intent) },
onShowErrorSnackBar = onShowErrorSnackBar,
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ fun SplashRoute(
val lifecycleOwner = LocalLifecycleOwner.current
val composition by rememberLottieComposition(LottieCompositionSpec.RawRes(R.raw.wable_splash))

LaunchedEffect(Unit) {
LaunchedEffect(lifecycleOwner) {
delay(2000)
viewModel.observeAutoLogin()
}
Expand Down
8 changes: 5 additions & 3 deletions feature/main/src/main/java/com/teamwable/main/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import android.content.Context
import android.content.Intent
import android.content.pm.ActivityInfo
import android.os.Bundle
import androidx.activity.enableEdgeToEdge
import androidx.activity.result.contract.ActivityResultContracts
import androidx.appcompat.app.AppCompatActivity
import androidx.lifecycle.lifecycleScope
Expand All @@ -24,8 +25,8 @@ import com.teamwable.common.util.AmplitudeHomeTag.CLICK_NEWS_BOTNAVI
import com.teamwable.common.util.AmplitudeUtil.trackEvent
import com.teamwable.home.HomeFragment
import com.teamwable.main.databinding.ActivityMainBinding
import com.teamwable.ui.extensions.setStatusBarColor
import com.teamwable.ui.extensions.showAlertDialog
import com.teamwable.ui.extensions.statusBarColorOf
import com.teamwable.ui.extensions.statusBarModeOf
import com.teamwable.ui.extensions.toast
import com.teamwable.ui.extensions.visible
Expand Down Expand Up @@ -63,6 +64,7 @@ class MainActivity : AppCompatActivity(), Navigation {

@SuppressLint("SourceLockedOrientationActivity")
override fun onCreate(savedInstanceState: Bundle?) {
enableEdgeToEdge()
super.onCreate(savedInstanceState)
binding = ActivityMainBinding.inflate(layoutInflater)
setContentView(binding.root)
Expand Down Expand Up @@ -220,14 +222,14 @@ class MainActivity : AppCompatActivity(), Navigation {
navController.addOnDestinationChangedListener { _, destination, _ ->
when (destination.id) {
in darkStatusBarDestinations -> {
statusBarColorOf(com.teamwable.ui.R.color.black)
binding.statusBarBackground.setStatusBarColor(com.teamwable.ui.R.color.black)
statusBarModeOf(false)
}

in noStatusBarChangeDestinations -> Unit

else -> {
statusBarColorOf(com.teamwable.ui.R.color.white)
binding.statusBarBackground.setStatusBarColor(com.teamwable.ui.R.color.white)
statusBarModeOf()
}
}
Expand Down
97 changes: 54 additions & 43 deletions feature/main/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
@@ -1,52 +1,63 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">

<androidx.fragment.app.FragmentContainerView
android:id="@+id/fcv_main"
android:name="androidx.navigation.fragment.NavHostFragment"
android:layout_width="0dp"
android:layout_height="0dp"
app:defaultNavHost="true"
app:layout_constraintBottom_toTopOf="@id/divider_main_bnv"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:navGraph="@navigation/graph_main" />
<View
android:id="@+id/status_bar_background"
android:layout_width="match_parent"
android:layout_height="0dp" />
Comment on lines +7 to +10
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | πŸ”΄ Critical

μƒνƒœλ°” λ°°κ²½ View의 높이가 0dp둜 μ„€μ •λ˜μ–΄ λ Œλ”λ§λ˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€.

status_bar_background View의 높이가 0dp둜 μ„€μ •λ˜μ–΄ μžˆμ–΄ 화면에 ν‘œμ‹œλ˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€. MainActivity.ktμ—μ„œ 이 View에 색상을 μ„€μ •ν•˜μ§€λ§Œ νš¨κ³Όκ°€ 없을 κ²ƒμž…λ‹ˆλ‹€.

λ‹€μŒ diffλ₯Ό μ μš©ν•˜μ—¬ μƒνƒœλ°” λ†’μ΄λ§ŒνΌ ν‘œμ‹œλ˜λ„λ‘ μˆ˜μ •ν•˜μ„Έμš”:

     <View
         android:id="@+id/status_bar_background"
         android:layout_width="match_parent"
-        android:layout_height="0dp" />
+        android:layout_height="wrap_content"
+        android:layout_alignParentTop="true"
+        android:fitsSystemWindows="true" />

λ˜λŠ” insets을 ν™œμš©ν•˜μ—¬ λ™μ μœΌλ‘œ μƒνƒœλ°” 높이λ₯Ό μ μš©ν•˜λŠ” 방법도 κ³ λ €ν•΄μ£Όμ„Έμš”.

πŸ“ Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
<View
android:id="@+id/status_bar_background"
android:layout_width="match_parent"
android:layout_height="0dp" />
<View
android:id="@+id/status_bar_background"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:fitsSystemWindows="true" />
πŸ€– Prompt for AI Agents
In feature/main/src/main/res/layout/activity_main.xml lines 7-10, the
status_bar_background View has android:layout_height="0dp" so it doesn't render;
change the layout to give it a real height (e.g., replace 0dp with wrap_content
or reference a dimension like @dimen/status_bar_height) and add a
status_bar_height dimen (or compute it at runtime) OR remove the fixed height
and instead apply system window insets in MainActivity (use
WindowInsets/WindowInsetsCompat to set the view's height or top padding to the
status bar inset) so the background covers the status bar area.


<androidx.constraintlayout.widget.Group
android:id="@+id/group_main_bnv"
android:layout_width="wrap_content"
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
app:constraint_referenced_ids="divider_main_bnv, bnv_main" />
android:fitsSystemWindows="true">
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

fitsSystemWindows="true"κ°€ enableEdgeToEdge()와 μΆ©λŒν•©λ‹ˆλ‹€.

enableEdgeToEdge()λŠ” μ½˜ν…μΈ κ°€ μ‹œμŠ€ν…œ λ°” μ•„λž˜κΉŒμ§€ ν™•μž₯λ˜λ„λ‘ μ„€μ •ν•˜μ§€λ§Œ, fitsSystemWindows="true"λŠ” insets을 μ†ŒλΉ„ν•˜κ³  νŒ¨λ”©μ„ μΆ”κ°€ν•˜μ—¬ edge-to-edgeλ₯Ό λ¬΄νš¨ν™”ν•©λ‹ˆλ‹€.

λ‹€μŒ diffλ₯Ό μ μš©ν•˜μ—¬ μΆ©λŒμ„ ν•΄κ²°ν•˜μ„Έμš”:

     <androidx.constraintlayout.widget.ConstraintLayout
         android:layout_width="match_parent"
         android:layout_height="match_parent"
-        android:fitsSystemWindows="true">
+        android:clipToPadding="false">

그리고 ν•„μš”ν•œ 경우 WindowInsetsCompatλ₯Ό μ‚¬μš©ν•˜μ—¬ κ°œλ³„ 뷰에 insets을 μˆ˜λ™μœΌλ‘œ μ μš©ν•˜μ„Έμš”.

πŸ“ Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
android:fitsSystemWindows="true">
android:layout_width="match_parent"
android:layout_height="match_parent">
πŸ€– Prompt for AI Agents
In feature/main/src/main/res/layout/activity_main.xml around line 15, the layout
has android:fitsSystemWindows="true" which conflicts with enableEdgeToEdge();
remove or set this attribute to false so the content can extend beneath system
bars, and if specific views still need inset handling apply WindowInsetsCompat
in code to consume/apply insets (add padding/margin) on those views as needed.


<com.google.android.material.divider.MaterialDivider
android:id="@+id/divider_main_bnv"
android:layout_width="0dp"
android:layout_height="1dp"
app:dividerColor="@color/gray_200"
app:layout_constraintBottom_toTopOf="@id/bnv_main"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
<androidx.fragment.app.FragmentContainerView
android:id="@+id/fcv_main"
android:name="androidx.navigation.fragment.NavHostFragment"
android:layout_width="0dp"
android:layout_height="0dp"
app:defaultNavHost="true"
app:layout_constraintBottom_toTopOf="@id/divider_main_bnv"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:navGraph="@navigation/graph_main" />

<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/bnv_main"
android:layout_width="0dp"
android:layout_height="84dp"
app:backgroundTint="@color/white"
app:itemActiveIndicatorStyle="@null"
app:itemPaddingBottom="25dp"
app:itemPaddingTop="13dp"
app:itemRippleColor="@color/white"
app:itemTextAppearanceActive="@style/TextAppearance.Wable.Caption5"
app:itemTextAppearanceActiveBoldEnabled="false"
app:itemTextAppearanceInactive="@style/TextAppearance.Wable.Caption5"
app:itemTextColor="@color/sel_main_bnv_menu_color"
app:labelVisibilityMode="labeled"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:menu="@menu/menu_main_navigation" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.Group
android:id="@+id/group_main_bnv"
android:layout_width="wrap_content"
android:layout_height="match_parent"
app:constraint_referenced_ids="divider_main_bnv, bnv_main" />

<com.google.android.material.divider.MaterialDivider
android:id="@+id/divider_main_bnv"
android:layout_width="0dp"
android:layout_height="1dp"
app:dividerColor="@color/gray_200"
app:layout_constraintBottom_toTopOf="@id/bnv_main"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />

<com.google.android.material.bottomnavigation.BottomNavigationView
android:id="@+id/bnv_main"
android:layout_width="0dp"
android:layout_height="84dp"
app:backgroundTint="@color/white"
app:itemActiveIndicatorStyle="@null"
app:itemPaddingBottom="25dp"
app:itemPaddingTop="13dp"
app:itemRippleColor="@color/white"
app:itemTextAppearanceActive="@style/TextAppearance.Wable.Caption5"
app:itemTextAppearanceActiveBoldEnabled="false"
app:itemTextAppearanceInactive="@style/TextAppearance.Wable.Caption5"
app:itemTextColor="@color/sel_main_bnv_menu_color"
app:labelVisibilityMode="labeled"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:menu="@menu/menu_main_navigation" />
</androidx.constraintlayout.widget.ConstraintLayout>
</RelativeLayout>
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import androidx.lifecycle.flowWithLifecycle
import com.teamwable.common.util.AmplitudeSignUpTag.CLICK_NEXT_YEAR_SIGNUP
import com.teamwable.common.util.AmplitudeUtil.trackEvent
import com.teamwable.designsystem.component.button.WableButton
import com.teamwable.designsystem.extension.system.SetStatusBarColor
import com.teamwable.designsystem.theme.WableTheme
import com.teamwable.model.profile.MemberInfoEditModel
import com.teamwable.onboarding.R
Expand Down Expand Up @@ -68,8 +67,6 @@ fun FirstLckWatchRoute(
fun FirstLckWatchScreen(
onNextBtnClick: (Int) -> Unit,
) {
SetStatusBarColor(color = WableTheme.colors.white)

val options = (2012..2025).toImmutableList()

var expanded by remember { mutableStateOf(false) }
Expand Down
Loading
Loading