Skip to content
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

[USER] 시간표 마이그레이션 이슈(Bottom Sheet Height & IME Issue) #292

Open
Jokwanhee opened this issue Jun 17, 2024 · 0 comments
Assignees

Comments

@Jokwanhee
Copy link
Contributor

Feature Name

Bottom Sheet 가 올라가면서 아래 Content Bottom Padding을 Bottom Sheet 높이만큼 주고 있었다. 키보드가 올라옴으로써 기존의 코드에서는 Content 영역이 흰배경으로 잠깐 왔다가 돌아오면서 깜빡이는 현상이 있었음.

기존 코드

.padding(
  bottom = sheetState.requireOffset().pxToDp
)

bottom sheet state offset을 활용하여 bottom padding을 주고 있었음.

  • 문제점 : sheetState가 변경될 때마다 해당 Offset이 변함. 즉, 키보드가 올라올 때, bottom padding 값이 300 dp 였다가 키보드의 가려지는 bottom sheet 때문에 영역이 줄어듬. 300dp -> 200dp 로 줄어듬으로써, 잠깐 흰 배경이 content 영역을 차지함으로써, 깜빡이는 현상이 나타났다가 돌아옴.

수정 코드

위 커밋으로 어느정도 해결함. (하지만 만족스러운 해결방법이 아닌 것 같음.)

  • Keyboard 올라옴을 detect 하고 있다가 상태값을 전달 => Bottom Sheet 동적으로 높이 변경

문제점

val sheetState = rememberBottomSheetState(
  initialValue = BottomSheetValue.Collapsed
)

BottomSheetState 상태 값을 가지는 하위 composable recomposition 최적화가 쉽지 않음. 해당 논의가 StackOverFlow 에서 논의되었지만, 해결되어 보이지 않음.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant