Skip to content

Conversation

@haeti-dev
Copy link
Collaborator

📍 Work Description

  • 몰입모드를 통해 이미지를 더 크게 볼 수 있습니다.
  • 유저의 이름이 더 잘 보이도록 배경을 회색으로 통일했습니다.

📸 Screenshot

default.mp4

📢 To Reviewers

  • 이미지에서 Palette를 통해 주요 색깔 뽑아서 인스타처럼 그라데이션 주려고 했는데, 클린 아키텍처(context 문제) + 하드웨어 비트맵을 사용 해제해야됨 -> 프리로딩 의미가 없어짐 등등 문제로 시도하다가 폐기했습니다..

⏲️Time

- 3 h

@haeti-dev haeti-dev added the ⚙️ feature 새로운 기능 구현 label Dec 4, 2024
@haeti-dev haeti-dev added this to the 메인 화면 milestone Dec 4, 2024
@haeti-dev haeti-dev self-assigned this Dec 4, 2024
@haeti-dev haeti-dev requested a review from a team as a code owner December 4, 2024 16:26
@haeti-dev haeti-dev requested review from Ameri-Kano, TaewoongR and shinythinking and removed request for a team December 4, 2024 16:26
Copy link
Member

@TaewoongR TaewoongR left a comment

Choose a reason for hiding this comment

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

고생많으셨어요!
좀 더 시각적으로 개선되었어요

modifier: Modifier = Modifier,
progress: Float,
backgroundColor: Color = Color.Gray,
backgroundColor: Color = Color.White,
Copy link
Member

Choose a reason for hiding this comment

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

흰색이 회색보다 시각적으로 보기가 편해요

Comment on lines +28 to +54
DisposableEffect(Unit) {
// 몰입 모드 활성화
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
val windowInsetsController = window?.insetsController
windowInsetsController?.systemBarsBehavior =
WindowInsetsController.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE
windowInsetsController?.hide(WindowInsets.Type.systemBars())
} else {
@Suppress("DEPRECATION")
window?.decorView?.systemUiVisibility = (
View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY
or View.SYSTEM_UI_FLAG_FULLSCREEN
or View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
)
}

onDispose {
// 몰입 모드 비활성화
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
val windowInsetsController = window?.insetsController
windowInsetsController?.show(WindowInsets.Type.systemBars())
} else {
@Suppress("DEPRECATION")
window?.decorView?.systemUiVisibility = View.SYSTEM_UI_FLAG_VISIBLE
}
}
}
Copy link
Member

Choose a reason for hiding this comment

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

DisposableEffect 는 LaunchedEffect 랑 다르게 coroutineScope을 사용하지 않네요.
컴포지션 끝나면 onDispose 호출해서 비활성화 되는 부분 좋은 사용의 예시라고 생각드네요!

Copy link
Collaborator

Choose a reason for hiding this comment

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

DisposableEffect 라는 게 있군요! Composable 함수가 종료될 때 사용할 수 있는 함수로 라이프사이클에 따르면 onStop 과 onDestroy 사이에 onDispose가 호출된다고 하네요!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

이즈 굳~

Copy link
Collaborator

@Ameri-Kano Ameri-Kano left a comment

Choose a reason for hiding this comment

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

좋습니다!

Comment on lines +28 to +54
DisposableEffect(Unit) {
// 몰입 모드 활성화
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
val windowInsetsController = window?.insetsController
windowInsetsController?.systemBarsBehavior =
WindowInsetsController.BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE
windowInsetsController?.hide(WindowInsets.Type.systemBars())
} else {
@Suppress("DEPRECATION")
window?.decorView?.systemUiVisibility = (
View.SYSTEM_UI_FLAG_IMMERSIVE_STICKY
or View.SYSTEM_UI_FLAG_FULLSCREEN
or View.SYSTEM_UI_FLAG_HIDE_NAVIGATION
)
}

onDispose {
// 몰입 모드 비활성화
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
val windowInsetsController = window?.insetsController
windowInsetsController?.show(WindowInsets.Type.systemBars())
} else {
@Suppress("DEPRECATION")
window?.decorView?.systemUiVisibility = View.SYSTEM_UI_FLAG_VISIBLE
}
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

DisposableEffect 라는 게 있군요! Composable 함수가 종료될 때 사용할 수 있는 함수로 라이프사이클에 따르면 onStop 과 onDestroy 사이에 onDispose가 호출된다고 하네요!

@haeti-dev haeti-dev merged commit 7503b14 into develop Dec 5, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

⚙️ feature 새로운 기능 구현

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT] 스토리 몰입 모드 구현

4 participants