Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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 .github/workflows/develop_PR_builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
${{ runner.os }}-gradle-

- name: Build with Gradle
run: ./gradlew build -PcompileSdkVersion=34 --stacktrace --parallel
run: ./gradlew build -PcompileSdkVersion=36 --stacktrace --parallel

- name: On Success, Notify in Slack
if: ${{ success() }}
Expand Down
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

This file was deleted.

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) { view, windowInsets ->
val insets = windowInsets.getInsets(WindowInsetsCompat.Type.statusBars())
view.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
10 changes: 6 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,7 +8,9 @@ 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.statusBarsPadding
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
Expand Down Expand Up @@ -37,8 +39,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 +88,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 All @@ -114,6 +112,8 @@ fun LoginScreen(
),
),
) {
Spacer(modifier = Modifier.statusBarsPadding())

Image(
painter = painterResource(id = com.teamwable.common.R.drawable.ic_share_logo),
contentDescription = "",
Expand Down Expand Up @@ -156,6 +156,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
10 changes: 7 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 @@ -105,6 +107,8 @@ class MainActivity : AppCompatActivity(), Navigation {
supportFragmentManager.findFragmentById(R.id.fcv_main) as NavHostFragment
val navController = navHostFragment.navController

navController.setGraph(R.navigation.graph_main)

binding.bnvMain.apply {
itemIconTintList = null
setupWithNavController(navController)
Expand Down Expand Up @@ -220,14 +224,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
Loading