-
Notifications
You must be signed in to change notification settings - Fork 1
[Feature/#183] android 15 #184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
โฆage status bar color
WalkthroughcompileSdkยทminSdk์ ๋น๋ ๋๊ตฌ๊ฐ ์ํฅ๋๊ณ edgeโtoโedge UI๊ฐ ํ์ฑํ๋์์ต๋๋ค. ์ฌ๋ฌ Composable/ํ์ฅ ํจ์๊ฐ ์ ๊ฑฐ๋๊ฑฐ๋ View๋ก ์ด๋๋์๊ณ , ์กํฐ๋นํฐ ๋ ์ด์์๊ณผ ํ ๋ง๊ฐ ์ฌ๊ตฌ์ฑ๋์ด ํฌ๋ช ์ํ๋ฐ ์๋ฆฌํ์์์ inset ๊ธฐ๋ฐ ์ฒ๋ฆฌ๋ก ์ ํ๋์์ต๋๋ค. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User
participant Activity as MainActivity / MainComposeActivity
participant Edge as enableEdgeToEdge()
participant Layout as activity_main(status_bar_background View)
participant Insets as View.setStatusBarColor / WindowInsets
participant Nav as NavHostFragment / Compose Nav
User->>Activity: ์ฑ ์์ / ํ๋ฉด ์ ํ
Activity->>Edge: enableEdgeToEdge()
Edge-->>Activity: ์์คํ
๋ฐ๋ฅผ ์ฃ์งโํฌโ์ฃ์ง๋ก ์ค์
Activity->>Layout: ๋ ์ด์์ ์ด๊ธฐํ (status_bar_background ํฌํจ)
Note right of Layout #F3F7FF: ์ํ๋ฐ ์๋ฆฌํ์์๋ฅผ View๋ก ์ฒ๋ฆฌ\nWindowInsets ๋ฆฌ์ค๋๋ก ๋์ด/ํจ๋ฉ ์กฐ์
Nav->>Insets: ๋ชฉ์ ์ง ๋ณ๊ฒฝ ์ ์์/๋์ด ์ ์ฉ ์์ฒญ
Insets->>Layout: ๋ฐฐ๊ฒฝ ๋ฆฌ์์ค ์ค์ ๋ฐ ์๋จ inset ์ ์ฉ
Estimated code review effort๐ฏ 3 (Moderate) | โฑ๏ธ ~25 ๋ถ Suggested reviewers
Poem
Pre-merge checks and finishing touchesโ Failed checks (1 warning)
โ Passed checks (4 passed)
โจ Finishing touches
๐งช Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
๐ Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
๐ Files selected for processing (10)
app/build.gradle.kts(1 hunks)core/ui/src/main/java/com/teamwable/ui/extensions/ContextExt.kt(0 hunks)core/ui/src/main/java/com/teamwable/ui/extensions/FragmentExt.kt(0 hunks)core/ui/src/main/java/com/teamwable/ui/extensions/ViewExt.kt(1 hunks)core/ui/src/main/java/com/teamwable/ui/extensions/ViewVisibleExt.kt(0 hunks)core/ui/src/main/res/values/themes.xml(1 hunks)feature/main/src/main/java/com/teamwable/main/MainActivity.kt(4 hunks)feature/main/src/main/res/layout/activity_main.xml(1 hunks)gradle/libs.versions.toml(3 hunks)gradle/wrapper/gradle-wrapper.properties(1 hunks)
๐ค Files with no reviewable changes (3)
- core/ui/src/main/java/com/teamwable/ui/extensions/ContextExt.kt
- core/ui/src/main/java/com/teamwable/ui/extensions/FragmentExt.kt
- core/ui/src/main/java/com/teamwable/ui/extensions/ViewVisibleExt.kt
๐งฐ Additional context used
๐งฌ Code graph analysis (1)
feature/main/src/main/java/com/teamwable/main/MainActivity.kt (2)
core/ui/src/main/java/com/teamwable/ui/extensions/FragmentExt.kt (1)
statusBarModeOf(56-58)core/ui/src/main/java/com/teamwable/ui/extensions/ContextExt.kt (1)
statusBarModeOf(101-107)
โฐ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: PR Checker
๐ Additional comments (12)
app/build.gradle.kts (1)
28-28: ๋ฒ์ ์นดํ๋ก๊ทธ ์ฐธ์กฐ๋ก ๊ฐ์ ๋จ.
compileSdk๋ฅผ ํ๋์ฝ๋ฉ๋ ๊ฐ์์ ๋ฒ์ ์นดํ๋ก๊ทธ๋ก ๋ณ๊ฒฝํ์ฌ ๋ฒ์ ๊ด๋ฆฌ๊ฐ ์ค์ํ๋์์ต๋๋ค. ์ด๋ ๋ชจ๋ฒ ์ฌ๋ก์ด๋ฉฐ ํ๋ก์ ํธ ์ ์ฒด์์ SDK ๋ฒ์ ์ ์ผ๊ด์ฑ์ ๋ณด์ฅํฉ๋๋ค.gradle/wrapper/gradle-wrapper.properties (1)
4-4: AGP 8.13.0๊ณผ ํธํ ๊ฐ๋ฅํ Gradle ๋ฒ์ ์ผ๋ก ์ ๋ฐ์ดํธ๋จ.Gradle์ 8.7์์ 8.13์ผ๋ก ์ ๋ฐ์ดํธํ ๊ฒ์ AGP 8.13.0 ์๊ตฌ์ฌํญ๊ณผ ์ผ์นํ๋ฉฐ ์ ์ ํฉ๋๋ค.
gradle/libs.versions.toml (3)
3-3: minSdk ๋ณ๊ฒฝ ์ฌํญ ํ์ธ ํ์ (24 โ 28).minSdk๋ฅผ 24์์ 28๋ก ๋ณ๊ฒฝํ๋ฉด Android 7.x ๊ธฐ๊ธฐ ์ง์์ด ์ค๋จ๋ฉ๋๋ค. ์ด๋ ์๋นํ ๋น์ฆ๋์ค ์ํฅ(์์ฅ ๋๋ฌ ๋ฒ์ ๊ฐ์)์ ๋ฏธ์น ์ ์์ผ๋ฏ๋ก ์๋์ ์ธ ๋ณ๊ฒฝ์ธ์ง ํ์ธ์ด ํ์ํฉ๋๋ค.
46-46: AGP ๋ฒ์ ๋ํญ ์ ๊ทธ๋ ์ด๋ ๊ฒ์ฆ ํ์ (8.5.1 โ 8.13.0).์ฃผ์ ๋ฒ์ ์ ํ(8๊ฐ ๋ง์ด๋ ๋ฒ์ )์ด๋ฏ๋ก, ํ์ JDK 17 ์ด์ ์ฌ์ฉ ์ฌ๋ถ ํ์ธ ๋ฐ ํ๋ก์ ํธ์ ๊ธฐ์กด ๋น๋ ์คํฌ๋ฆฝํธ์์ ์ ๊ฑฐ๋ AGP API ์ฌ์ฉ ์ฌ๋ถ๋ฅผ ๊ฒ์ฆํ์ญ์์ค. ๋ก์ปฌ ๋น๋ ํ ์คํธ๋ฅผ ํตํด ํธํ์ฑ์ ํ์ธํ๋ ๊ฒ์ ๊ถ์ฅํฉ๋๋ค.
16-17: AndroidX ๋ผ์ด๋ธ๋ฌ๋ฆฌ๊ฐ Android 15 ์ง์์ ์ํด ์ ์ ํ ์ ๋ฐ์ดํธ๋จ.
coreKtx 1.13.1 โ 1.17.0๊ณผappcompat 1.7.0 โ 1.7.1์ ๋ฐ์ดํธ๋ Android 15 ํธํ์ฑ ๊ฐ์ ๊ณผ ์ผ์นํฉ๋๋ค.core/ui/src/main/res/values/themes.xml (1)
4-5: LGTM! Edge-to-edge UI๋ฅผ ์ํ ์ ์ ํ ํ ๋ง ์ค์ ์ ๋๋ค.ํฌ๋ช ์ํ๋ฐ์ ๋ค๋น๊ฒ์ด์ ๋ฐ ์ค์ ์ Android 15 ๋์ ๋ฐ edge-to-edge ๊ตฌํ์ ์ํ ํ์ค์ ์ธ ์ ๊ทผ ๋ฐฉ์์ ๋๋ค.
core/ui/src/main/java/com/teamwable/ui/extensions/ViewExt.kt (1)
9-11: LGTM! ๋ช ํํ๊ณ ๊ฐ๊ฒฐํ ๊ตฌํ์ ๋๋ค.Visibility ํ ๊ธ ๋ก์ง์ด ์ ํํ๊ฒ ๊ตฌํ๋์ด ์์ต๋๋ค.
feature/main/src/main/java/com/teamwable/main/MainActivity.kt (2)
67-67: LGTM! Edge-to-edge๊ฐ ์ฌ๋ฐ๋ฅด๊ฒ ํ์ฑํ๋์์ต๋๋ค.
enableEdgeToEdge()๋ฅผsuper.onCreate()์ ์ ํธ์ถํ๋ ๊ฒ์ Android 15 ๋์์ ์ํ ๊ถ์ฅ ํจํด์ ๋๋ค.
225-232: LGTM! ์ํ๋ฐ ์์ ์ ํ ๋ก์ง์ด ๋ช ํํ๊ฒ ๊ตฌํ๋์์ต๋๋ค.๋ค๋น๊ฒ์ด์ ๋ชฉ์ ์ง์ ๋ฐ๋ผ ์ํ๋ฐ ์์๊ณผ ๋ชจ๋๋ฅผ ์ ์ ํ๊ฒ ๋ณ๊ฒฝํ๊ณ ์์ต๋๋ค.
feature/main/src/main/res/layout/activity_main.xml (3)
2-10: LGTM! ์ํ๋ฐ ๋ฐฐ๊ฒฝ์ ์ํ ์ ์ ํ ๋ ์ด์์ ๊ตฌ์กฐ์ ๋๋ค.
status_bar_backgroundView๊ฐ ์ถ๊ฐ๋์ด ๋์ ์ผ๋ก ์ํ๋ฐ ์์์ ์ ์ดํ ์ ์๊ฒ ๋์์ต๋๋ค. ์ด๊ธฐ ๋์ด๋ฅผ 0dp๋ก ์ค์ ํ๊ณ ๋ฐํ์์ window insets๋ฅผ ํตํด ์กฐ์ ํ๋ ๋ฐฉ์์ edge-to-edge UI์ ํ์ค ํจํด์ ๋๋ค.
15-15:fitsSystemWindows="true"์ค์ ์ด edge-to-edge UI์ ์๋๋๋ก ๋์ํ๋์ง ํ์ธํด์ฃผ์ธ์.Edge-to-edge UI์์
fitsSystemWindows="true"๋ฅผ ์ฌ์ฉํ๋ฉด ์์คํ ๋ฐ ์์ญ์ ํผํ๊ธฐ ์ํ ์๋ ํจ๋ฉ์ด ์ถ๊ฐ๋ฉ๋๋ค. ํ์ฌ ๊ตฌ์กฐ์์๋:
status_bar_background๊ฐ ๋ณ๋๋ก ์ํ๋ฐ ์์ญ์ ์ฒ๋ฆฌํ๊ณ ์๊ณConstraintLayout์ดfitsSystemWindows="true"๋ก ์์คํ ์ฐฝ insets๋ฅผ ์๋นํฉ๋๋ค์ด๊ฒ์ด ์๋๋ ๋์์ธ์ง, ์๋๋ฉด
fitsSystemWindows๋ฅผ ์ ๊ฑฐํ๊ณ ์๋์ผ๋ก ํจ๋ฉ์ ๊ด๋ฆฌํด์ผ ํ๋์ง ์ค์ ๊ธฐ๊ธฐ์์ ํ ์คํธํด์ฃผ์ธ์. ํนํ ๋ค์ ์ฌํญ๋ค์ ํ์ธํด์ฃผ์ธ์:
- ์๋จ ์ฝํ ์ธ ๊ฐ ์ํ๋ฐ์ ๊ฒน์น์ง ์๋์ง
- ํ๋จ ๋ค๋น๊ฒ์ด์ ๋ฐ ์์ญ์ด ์๋๋๋ก ๋์ํ๋์ง
- ๋ค์ํ ํ๋ฉด ๋น์จ (์ ์ค์ฒ ๋ค๋น๊ฒ์ด์ vs ๋ฒํผ ๋ค๋น๊ฒ์ด์ )์์ ์ ์ ๋์ํ๋์ง
17-61: LGTM! ํ๋จ ๋ค๋น๊ฒ์ด์ ๊ตฌ์กฐ๊ฐ ๋ช ํํ๊ฒ ์ฌ๊ตฌ์ฑ๋์์ต๋๋ค.
Group์ ์ฌ์ฉํ์ฌ ํ๋จ ๋ค๋น๊ฒ์ด์ ์์๋ค์ ํจ๊ป ๊ด๋ฆฌํ ์ ์๊ฒ ๋์ด ๊ฐ์์ฑ ์ ์ด๊ฐ ๋ ์ฉ์ดํด์ก์ต๋๋ค.
| compileSdk = "36" | ||
| minSdk = "28" | ||
| targetSdk = "35" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
targetSdk๋ฅผ compileSdk์ ์ผ์น์์ผ์ผ ํจ (ํ์ฌ ๋ถ์ผ์น: targetSdk 35 < compileSdk 36).
Android 15 ์์ ์ง์ ๋ฐ PR ์ค๋ช ์ edge-to-edge ๊ธฐ๋ฅ์ ์ํด targetSdk๋ฅผ 36์ผ๋ก ์ ๋ฐ์ดํธํด์ผ ํฉ๋๋ค. targetSdk๊ฐ compileSdk๋ณด๋ค ๋ฎ์ผ๋ฉด ์ต์ OS ์ต์ ํ๋ฅผ ํ์ฉํ ์ ์์ผ๋ฉฐ, edge-to-edge ๊ตฌํ์ ๋ฌธ์ ๊ฐ ๋ฐ์ํ ์ ์์ต๋๋ค.
์ ์๋๋ ์์ :
- targetSdk = "35"
+ targetSdk = "36"๐ 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.
| compileSdk = "36" | |
| minSdk = "28" | |
| targetSdk = "35" | |
| compileSdk = "36" | |
| minSdk = "28" | |
| targetSdk = "36" |
๐ค Prompt for AI Agents
In gradle/libs.versions.toml around lines 2 to 4, targetSdk is set to 35 while
compileSdk is 36; update targetSdk to "36" so it matches compileSdk to enable
Android 15 optimizations and proper edge-to-edge behavior โ edit the targetSdk
entry value from "35" to "36" and save the file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
๐งน Nitpick comments (1)
feature/main-compose/src/main/java/com/teamwable/main_compose/splash/SplashScreen.kt (1)
32-35: LaunchedEffect ํค๋ฅผ lifecycleOwner๋ก ๋ฐ๊พผ ์๋ ํ์ธ ํ์ โ observeAutoLogin ์ค๋ณต ์คํ ๋ฆฌ์คํฌ
lifecycleOwner ๊ต์ฒด(๊ตฌ์ฑ ๋ณ๊ฒฝ, NavHost ์ฌ๋ง์ดํธ ๋ฑ) ์ ๋ณธ ํจ๊ณผ๊ฐ ์ฌ์คํ๋์ด 2์ด ํ observeAutoLogin()์ด ๋ค์ ํธ์ถ๋ ์ ์์ต๋๋ค. observeAutoLogin()์ด ๋ฉฑ๋ฑ(idempotent)ํ๊ฑฐ๋ ์ค๋ณต ๊ตฌ๋ ์ ๋ฐฉ์งํ์ง ์์ผ๋ฉด ๋คํธ์ํฌ/๊ตฌ๋ ์ค๋ณต์ด ๋ฐ์ํ ์ ์์ต๋๋ค. ์๋๋ ๋์์ธ๊ฐ์?
ํ ๋ฒ๋ง ์คํํ๋ ค๋ฉด Unit ํค๋ก ์ ์งํ๋ ํธ์ด ์์ ํฉ๋๋ค:
- LaunchedEffect(lifecycleOwner) { + LaunchedEffect(Unit) { delay(2000) viewModel.observeAutoLogin() }
๋ง์ฝ owner ๋ณ๊ฒฝ ์ ์ฌ์คํ์ด ๋ชฉ์ ์ด๋ผ๋ฉด, VM ๋ด๋ถ์์ ์ค๋ณต ๋ฐฉ์ด(once ํ๋๊ทธ/AtomicBoolean, distinctUntilChanged, ์ด์ Job cancel ๋ฑ) ๋๋ init ๋ธ๋ก์์ 1ํ๋ง ๊ด์ฐฐ์ ์์ํ๋๋ก ์ ๋ฆฌํ๋ ๊ฒ์ ๊ถ์ฅํฉ๋๋ค.
์ฐธ๊ณ (์ ํ): ์๋ sideEffect ์์ง์ repeatOnLifecycle ํจํด์ผ๋ก ๋ฐ๊พธ๋ฉด ์๋ช ์ฃผ๊ธฐ ๊ฒฝ๊ณ๊ฐ ๋ ๋ช ํํฉ๋๋ค.
LaunchedEffect(lifecycleOwner) { lifecycleOwner.lifecycle.repeatOnLifecycle(Lifecycle.State.STARTED) { viewModel.sideEffect.collect { /* navigate */ } } }๋ํ ์ต์ ๋ด๋น๊ฒ์ด์ ๋๋ค๋ฅผ ๋ณด์ฅํ๋ ค๋ฉด rememberUpdatedState๋ก ์บก์ฒํ์ธ์.
๐ Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
๐ Files selected for processing (5)
feature/auth/src/main/java/com/teamwable/auth/LoginScreen.kt(2 hunks)feature/main-compose/src/main/java/com/teamwable/main_compose/MainComposeActivity.kt(2 hunks)feature/main-compose/src/main/java/com/teamwable/main_compose/MainScreen.kt(5 hunks)feature/main-compose/src/main/java/com/teamwable/main_compose/splash/SplashScreen.kt(1 hunks)feature/onboarding/src/main/java/com/teamwable/onboarding/firstlckwatch/FirstLckWatchScreen.kt(0 hunks)
๐ค Files with no reviewable changes (1)
- feature/onboarding/src/main/java/com/teamwable/onboarding/firstlckwatch/FirstLckWatchScreen.kt
๐งฐ Additional context used
๐งฌ Code graph analysis (1)
feature/main-compose/src/main/java/com/teamwable/main_compose/MainScreen.kt (1)
feature/auth/src/main/java/com/teamwable/auth/naviagation/AuthNavigation.kt (1)
loginNavGraph(14-26)
โฐ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: PR Checker
๐ Additional comments (8)
feature/main-compose/src/main/java/com/teamwable/main_compose/MainComposeActivity.kt (2)
8-8: LGTM: edge-to-edge ์ง์์ ์ํ ์ฌ๋ฐ๋ฅธ importAndroid์ ํ์ค edge-to-edge API import๊ฐ ์ ์ ํ๊ฒ ์ถ๊ฐ๋์์ต๋๋ค.
24-24: enableEdgeToEdge() ํธ์ถ ์ ์ ํจ - ๊ฒ์ฆ ์๋ฃ
enableEdgeToEdge()๊ฐ ์ฌ๋ฐ๋ฅด๊ฒ ํธ์ถ๋์์ผ๋ฉฐ,MainScreenComposable์์statusBarsPadding()๋ชจ๋ํ์ด์ด๋ฅผ ํตํด WindowInsets์ ์ ์ ํ ์ฒ๋ฆฌํ๊ณ ์์ต๋๋ค. ์ฝํ ์ธ ๊ฐ ์ํ๋ฐ ์๋์ ๊ฐ๋ ค์ง์ง ์๋๋ก ์ ๋๋ก ๊ตฌํ๋์ด ์์ต๋๋ค.feature/auth/src/main/java/com/teamwable/auth/LoginScreen.kt (2)
11-11: Import ์ถ๊ฐ ํ์ธ๋จ.Edge-to-edge UI๋ฅผ ์ํ
navigationBarsPaddingimport๊ฐ ์ ์ ํ ์ถ๊ฐ๋์์ต๋๋ค.
156-157: Edge-to-edge ๋์์ด ์ฌ๋ฐ๋ฅด๊ฒ ๊ตฌํ๋์์ต๋๋ค.ํ๋ฉด ํ๋จ์
navigationBarsPadding()์ ์ถ๊ฐํ์ฌ ์์คํ ๋ค๋น๊ฒ์ด์ ๋ฐ์ ์ปจํ ์ธ ๊ฐ ๊ฒน์น์ง ์๋๋ก ์ฒ๋ฆฌํ์ต๋๋ค. ๋ค๋ง Android 15 ๊ธฐ๊ธฐ์์ ๋ค์ํ ๋ค๋น๊ฒ์ด์ ๋ฐ ์ค์ (์ ์ค์ฒ/๋ฒํผ)์ผ๋ก ์ค์ ํ ์คํธํ์ฌ ๊ฐ๊ฒฉ์ด ์ ์ ํ์ง ํ์ธํด์ฃผ์ธ์.feature/main-compose/src/main/java/com/teamwable/main_compose/MainScreen.kt (4)
7-7: Import ์ถ๊ฐ ํ์ธ๋จ.Edge-to-edge ์ง์์ ์ํ
statusBarsPaddingimport๊ฐ ์ ์ ํ ์ถ๊ฐ๋์์ต๋๋ค.
59-59: ์ํ๋ฐ ํจ๋ฉ์ด ์ฌ๋ฐ๋ฅด๊ฒ ์ ์ฉ๋์์ต๋๋ค.WableAppBar์
statusBarsPadding()์ ์ถ๊ฐํ์ฌ edge-to-edge ๋ชจ๋์์ ์ํ๋ฐ์ ๊ฒน์น์ง ์๋๋ก ์ฒ๋ฆฌํ์ต๋๋ค.
68-72: ์กฐ๊ฑด๋ถ ํจ๋ฉ ๋ก์ง์ด ์ ํํฉ๋๋ค.Top bar ํ์ ์ฌ๋ถ์ ๋ฐ๋ผ
innerPadding์ ์กฐ๊ฑด๋ถ๋ก ์ ์ฉํ์ฌ ์ปจํ ์ธ ๊ฐ ์ ์ ํ ๋ฐฐ์น๋๋๋ก ๊ตฌํํ์ต๋๋ค. Top bar๊ฐ ํ์๋ ๋๋ ํจ๋ฉ์ ์ ์ฉํ๊ณ , ์จ๊ฒจ์ง ๋๋ ์ ์ฒด ํ๋ฉด์ ์ฌ์ฉํ๋ ๋ก์ง์ด ์ฌ๋ฐ๋ฆ ๋๋ค.
90-90: Activity ์์ ๋ฐฉ์์ด ๊ฐ์ํ๋์์ต๋๋ค.
ContextCompat.startActivity๋์localContext.startActivity๋ฅผ ์ง์ ์ฌ์ฉํ๋๋ก ๋ณ๊ฒฝ๋์์ต๋๋ค.localContext๋ ์ ํจํ Context์ด๋ฏ๋ก ์ด ๋ณ๊ฒฝ์ ์ ์ ํฉ๋๋ค.Also applies to: 94-94, 110-110
โฆtatus bar insets handling
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
๐งน Nitpick comments (1)
feature/main/src/main/res/layout/activity_main.xml (1)
2-5: ๋ถํ์ํ ๋ ์ด์์ ์ค์ฒฉ์ ๋จ์ํํ ์ ์์ต๋๋ค.
RelativeLayout์ด ๋จ์ผConstraintLayout์ ๋ํํ๋ ๊ตฌ์กฐ๋ ๋ถํ์ํ ๋ทฐ ๊ณ์ธต ๊น์ด๋ฅผ ์ถ๊ฐํฉ๋๋ค.ConstraintLayout์ ๋ฃจํธ๋ก ์ฌ์ฉํ๊ณstatus_bar_background์ ๋ค๋น๊ฒ์ด์ ์ปดํฌ๋ํธ๋ฅผ ๋ชจ๋ ์ ์ฝ ์กฐ๊ฑด์ผ๋ก ๋ฐฐ์นํ๋ฉด ๋ ํจ์จ์ ์ ๋๋ค.๋ ์ด์์ ๊ตฌ์กฐ๋ฅผ ๋จ์ํํ๋ ค๋ฉด ๋ค์๊ณผ ๊ฐ์ด ์์ ํ ์ ์์ต๋๋ค:
<?xml version="1.0" encoding="utf-8"?> <androidx.constraintlayout.widget.ConstraintLayout 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"> <View android:id="@+id/status_bar_background" android:layout_width="0dp" android:layout_height="wrap_content" android:fitsSystemWindows="true" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="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" /> <!-- ๋๋จธ์ง ๋ทฐ๋ค... --> </androidx.constraintlayout.widget.ConstraintLayout>Also applies to: 12-14
๐ Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
๐ Files selected for processing (3)
.github/workflows/develop_PR_builder.yml(1 hunks)feature/main/src/main/java/com/teamwable/main/MainActivity.kt(5 hunks)feature/main/src/main/res/layout/activity_main.xml(1 hunks)
๐ง Files skipped from review as they are similar to previous changes (1)
- .github/workflows/develop_PR_builder.yml
๐งฐ Additional context used
๐งฌ Code graph analysis (1)
feature/main/src/main/java/com/teamwable/main/MainActivity.kt (2)
core/ui/src/main/java/com/teamwable/ui/extensions/FragmentExt.kt (1)
statusBarModeOf(56-58)core/ui/src/main/java/com/teamwable/ui/extensions/ContextExt.kt (1)
statusBarModeOf(101-107)
โฐ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: PR Checker
๐ Additional comments (3)
feature/main/src/main/java/com/teamwable/main/MainActivity.kt (3)
67-67: LGTM! enableEdgeToEdge() ํธ์ถ ์์น๊ฐ ์ฌ๋ฐ๋ฆ ๋๋ค.
super.onCreate()์ด์ ์enableEdgeToEdge()๋ฅผ ํธ์ถํ๋ ๊ฒ์ด Android ๊ณต์ ๊ฐ์ด๋์ ๋ง์ต๋๋ค.
227-227: ์ํ๋ฐ ์์ ๊ด๋ฆฌ ๋ฐฉ์ ๋ณ๊ฒฝ์ ํ์ธํ์ต๋๋ค.Window ๊ธฐ๋ฐ์
statusBarColorOf()์์ View ๊ธฐ๋ฐ์setStatusBarColor()๋ก ๋ณ๊ฒฝ๋์์ต๋๋ค. ์ด ์ ๊ทผ ๋ฐฉ์์ edge-to-edge UI์ ํจ๊ป ์ฌ์ฉํ๊ธฐ์ ์ ํฉํ์ง๋ง,activity_main.xml์status_bar_backgroundView๊ฐ ์ฌ๋ฐ๋ฅด๊ฒ ๊ตฌ์ฑ๋์ด์ผ ์ ์ ๋์ํฉ๋๋ค.Also applies to: 234-234
110-110: ์ฝ๋๊ฐ ์ ์์ ๋๋ค. navGraph ์ค์ ์ค๋ณต ์ฐ๋ ค๋ ํด์๋์์ต๋๋ค.XML์
FragmentContainerView์app:navGraph์์ฑ์ด ์ค์ ๋์ด ์์ง ์์ผ๋ฏ๋ก, ์ฝ๋์navController.setGraph(R.navigation.graph_main)ํธ์ถ์ ํ์์ ์ด๊ณ ์ค๋ณต์ด ์๋๋๋ค. ์ด๋ NavHostFragment ์ค์ ์์ ํ์ค์ ์ธ ํจํด์ ๋๋ค.
| <View | ||
| android:id="@+id/status_bar_background" | ||
| android:layout_width="match_parent" | ||
| android:layout_height="0dp" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์ํ๋ฐ ๋ฐฐ๊ฒฝ 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.
| <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.
| android:layout_width="match_parent" | ||
| android:layout_height="match_parent" | ||
| app:constraint_referenced_ids="divider_main_bnv, bnv_main" /> | ||
| android:fitsSystemWindows="true"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
| 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.
sohyun127
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๊ณ ์ํ์ จ์ต๋๋ค!!๐๐๐
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
๐งน Nitpick comments (1)
feature/auth/src/main/java/com/teamwable/auth/LoginScreen.kt (1)
115-116: statusBarsPadding() ๊ตฌํ์ด ์ฌ๋ฐ๋ฅด๊ฒ ์ ์ฉ๋์์ต๋๋ค.์ฝ๋๋ฒ ์ด์ค ์ ์ฒด์์
statusBarsPadding()์ฌ์ฉ์ ํ์ธํ์ผ๋ฉฐ, LoginScreen.kt ๋ผ์ธ 115์ ๊ตฌํ์ MainScreen.kt์ ํจํด๊ณผ ์ผ์นํฉ๋๋ค. edge-to-edge ๋ ์ด์์ ์ฒ๋ฆฌ๊ฐ ์ ์ ํ๊ฒ ์ด๋ฃจ์ด์ก์ต๋๋ค.๋ผ์ธ 116์ ๋น ์ค์ ์ ๊ฑฐํ์ฌ ์ฝ๋ ์ ๋ฆฌ๋ฅผ ๊ถ์ฅํฉ๋๋ค.
๐ Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
๐ Files selected for processing (1)
feature/auth/src/main/java/com/teamwable/auth/LoginScreen.kt(3 hunks)
โฐ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: PR Checker
๐ Additional comments (2)
feature/auth/src/main/java/com/teamwable/auth/LoginScreen.kt (2)
11-11: LGTM! Edge-to-edge ๊ตฌํ์ ์ํ ์ฌ๋ฐ๋ฅธ import์ ๋๋ค.
statusBarsPadding๊ณผnavigationBarsPadding์ Android 15์ edge-to-edge UI๋ฅผ ์ง์ํ๊ธฐ ์ํ ์ ์ ํ Modifier์ ๋๋ค.Also applies to: 13-13
159-160: ํ๋จ ๋ค๋น๊ฒ์ด์ ๋ฐ ์ธ์ ์ฒ๋ฆฌ๊ฐ ์ฌ๋ฐ๋ฅด๊ฒ ์ถ๊ฐ๋์์ต๋๋ค.
navigationBarsPadding()์ ์ฌ์ฉํ์ฌ ์์คํ ๋ค๋น๊ฒ์ด์ ๋ฐ ์์ญ์ ์ฌ๋ฐ๋ฅด๊ฒ ์ฒ๋ฆฌํ์ต๋๋ค. ์นด์นด์ค ๋ก๊ทธ์ธ ๋ฒํผ์ ๊ธฐ์กดbottom = 54.dpํจ๋ฉ๊ณผ ํจ๊ป ์ ์ ํ ์ฌ๋ฐฑ์ ์ ๊ณตํฉ๋๋ค.๋ค์ ์ฌํญ์ ๊ฒ์ฆํ์๊ธฐ ๋ฐ๋๋๋ค:
- ์ ์ค์ฒ ๋ด๋น๊ฒ์ด์ ์ด ํ์ฑํ๋ ๊ธฐ๊ธฐ์ ๋ฒํผ ๋ค๋น๊ฒ์ด์ ๊ธฐ๊ธฐ ๋ชจ๋์์ ํ๋จ ์ฌ๋ฐฑ์ด ์์ฐ์ค๋ฌ์ด์ง ํ์ธ
- ๊ฐ๋ก ๋ชจ๋์์๋ ๋ ์ด์์์ด ์ฌ๋ฐ๋ฅด๊ฒ ๋์ํ๋์ง ํ์ธ
โ ๐๐ต๐ฒ๐ฐ๐ธ-๐๐ถ๐๐
๐ ๐๐๐๐๐ฒ๐
๐๐ช๐ผ๐ฟ๐ธ ๐๐ฒ๐๐ฐ๐ฟ๐ถ๐ฝ๐๐ถ๐ผ๐ป
๐ท ๐ฆ๐ฐ๐ฟ๐ฒ๐ฒ๐ป๐๐ต๐ผ๐
๐ฌ ๐ง๐ผ ๐ฅ๐ฒ๐๐ถ๐ฒ๐๐ฒ๐ฟ๐
ci ์.์.๋ผ
Summary by CodeRabbit
์๋ก์ด ๊ธฐ๋ฅ
๊ฐ์ ์ฌํญ
์ ๊ฑฐ