Skip to content

Commit 53cd0e9

Browse files
authored
Merge pull request #184 from Team-Wable/feature/#183-android-15
[Feature/#183] android 15
2 parents 0c089a8 + b690b2e commit 53cd0e9

File tree

17 files changed

+113
-132
lines changed

17 files changed

+113
-132
lines changed

.github/workflows/develop_PR_builder.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ jobs:
7979
${{ runner.os }}-gradle-
8080
8181
- name: Build with Gradle
82-
run: ./gradlew build -PcompileSdkVersion=34 --stacktrace --parallel
82+
run: ./gradlew build -PcompileSdkVersion=36 --stacktrace --parallel
8383

8484
- name: On Success, Notify in Slack
8585
if: ${{ success() }}

app/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ fun String.removeQuotes(): String {
2525

2626
android {
2727
namespace = "com.teamwable.wable"
28-
compileSdk = 34
28+
compileSdk = libs.versions.compileSdk.get().toInt()
2929

3030
defaultConfig {
3131
applicationId = "com.teamwable.wable"

core/designsystem/src/main/java/com/teamwable/designsystem/extension/system/SetSystemUiColor.kt

Lines changed: 0 additions & 35 deletions
This file was deleted.

core/ui/src/main/java/com/teamwable/ui/extensions/ContextExt.kt

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -98,14 +98,6 @@ fun Context.pxToDp(px: Int): Int {
9898
).toInt()
9999
}
100100

101-
fun Context.statusBarColorOf(
102-
@ColorRes resId: Int,
103-
) {
104-
if (this is Activity) {
105-
window?.statusBarColor = colorOf(resId)
106-
}
107-
}
108-
109101
fun Context.statusBarModeOf(isLightStatusBar: Boolean = true) {
110102
if (this is Activity) {
111103
window.apply {

core/ui/src/main/java/com/teamwable/ui/extensions/FragmentExt.kt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,6 @@ val Fragment.viewLifeCycle
4646
val Fragment.viewLifeCycleScope
4747
get() = viewLifecycleOwner.lifecycleScope
4848

49-
fun Fragment.statusBarColorOf(
50-
@ColorRes resId: Int,
51-
) {
52-
requireActivity().statusBarColorOf(resId)
53-
}
54-
5549
fun Fragment.openUri(uri: String) {
5650
Intent(Intent.ACTION_VIEW, Uri.parse(uri)).also {
5751
runCatching { startActivity(it) }
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package com.teamwable.ui.extensions
2+
3+
import android.view.View
4+
import androidx.annotation.ColorRes
5+
import androidx.core.view.ViewCompat
6+
import androidx.core.view.WindowInsetsCompat
7+
import androidx.core.view.updateLayoutParams
8+
9+
fun View.visible(isVisible: Boolean) {
10+
this.visibility = if (isVisible) View.VISIBLE else View.GONE
11+
}
12+
13+
fun View.setStatusBarColor(@ColorRes resId: Int) {
14+
setBackgroundResource(resId)
15+
16+
ViewCompat.setOnApplyWindowInsetsListener(this) { view, windowInsets ->
17+
val insets = windowInsets.getInsets(WindowInsetsCompat.Type.statusBars())
18+
view.updateLayoutParams {
19+
height = insets.top
20+
}
21+
windowInsets
22+
}
23+
}

core/ui/src/main/java/com/teamwable/ui/extensions/ViewVisibleExt.kt

Lines changed: 0 additions & 7 deletions
This file was deleted.

core/ui/src/main/res/values/themes.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
<resources>
22
<!-- Base application theme. -->
33
<style name="Base.Theme.Wable" parent="Theme.Material3.Light.NoActionBar">
4-
<item name="android:statusBarColor">@android:color/white</item>
4+
<item name="android:statusBarColor">@android:color/transparent</item>
5+
<item name="android:navigationBarColor">@android:color/transparent</item>
56
<item name="android:windowLightStatusBar">true</item>
67
<item name="android:windowBackground">@color/white</item>
78
<item name="android:windowIsTranslucent">true</item>

feature/auth/src/main/java/com/teamwable/auth/LoginScreen.kt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ import androidx.compose.foundation.layout.Spacer
88
import androidx.compose.foundation.layout.aspectRatio
99
import androidx.compose.foundation.layout.fillMaxSize
1010
import androidx.compose.foundation.layout.fillMaxWidth
11+
import androidx.compose.foundation.layout.navigationBarsPadding
1112
import androidx.compose.foundation.layout.padding
13+
import androidx.compose.foundation.layout.statusBarsPadding
1214
import androidx.compose.material3.Text
1315
import androidx.compose.runtime.Composable
1416
import androidx.compose.runtime.LaunchedEffect
@@ -37,8 +39,6 @@ import com.teamwable.common.util.AmplitudeSignInTag.CLICK_SIGNIN_KAKAO
3739
import com.teamwable.common.util.AmplitudeUtil.trackEvent
3840
import com.teamwable.designsystem.component.dialog.WableOneButtonDialog
3941
import com.teamwable.designsystem.extension.modifier.noRippleDebounceClickable
40-
import com.teamwable.designsystem.extension.system.SetStatusBarColor
41-
import com.teamwable.designsystem.theme.SystemLoginSystemAppBar
4242
import com.teamwable.designsystem.theme.WableTheme
4343
import com.teamwable.designsystem.type.DialogType
4444

@@ -88,8 +88,6 @@ fun LoginRoute(
8888
fun LoginScreen(
8989
onLoginBtnClick: () -> Unit,
9090
) {
91-
SetStatusBarColor(color = SystemLoginSystemAppBar)
92-
9391
val configuration = LocalConfiguration.current
9492
val screenHeightPx = with(LocalDensity.current) { configuration.screenHeightDp.dp.toPx() }
9593
val halfScreenHeightPx = screenHeightPx * 0.514f
@@ -114,6 +112,8 @@ fun LoginScreen(
114112
),
115113
),
116114
) {
115+
Spacer(modifier = Modifier.statusBarsPadding())
116+
117117
Image(
118118
painter = painterResource(id = com.teamwable.common.R.drawable.ic_share_logo),
119119
contentDescription = "",
@@ -156,6 +156,8 @@ fun LoginScreen(
156156
.aspectRatio(6.56f)
157157
.noRippleDebounceClickable { onLoginBtnClick() },
158158
)
159+
160+
Spacer(modifier = Modifier.navigationBarsPadding())
159161
}
160162
}
161163

feature/main-compose/src/main/java/com/teamwable/main_compose/MainComposeActivity.kt

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,10 @@ import android.content.pm.ActivityInfo
55
import android.os.Bundle
66
import androidx.activity.ComponentActivity
77
import androidx.activity.compose.setContent
8+
import androidx.activity.enableEdgeToEdge
89
import com.teamwable.common.di.MAIN
910
import com.teamwable.common.intentprovider.IntentProvider
10-
import com.teamwable.designsystem.extension.system.SetLightNavigationBar
11-
import com.teamwable.designsystem.extension.system.SetStatusBarColor
1211
import com.teamwable.designsystem.theme.WableTheme
13-
import com.teamwable.designsystem.theme.WableTheme.colors
1412
import dagger.hilt.android.AndroidEntryPoint
1513
import javax.inject.Inject
1614

@@ -23,12 +21,11 @@ class MainComposeActivity : ComponentActivity() {
2321
@SuppressLint("SourceLockedOrientationActivity")
2422
override fun onCreate(savedInstanceState: Bundle?) {
2523
super.onCreate(savedInstanceState)
24+
enableEdgeToEdge()
2625
requestedOrientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT
2726
setContent {
2827
WableTheme {
2928
val navigator: MainNavigator = rememberMainNavigator()
30-
SetStatusBarColor(color = colors.white)
31-
SetLightNavigationBar()
3229
MainScreen(
3330
navigator = navigator,
3431
intentProvider = intentProvider,

0 commit comments

Comments
 (0)