Skip to content

중첩 NavHost에 대한 BackSwipe 문의 #75

@ienground

Description

@ienground

안녕하세요!
NavHost A의 composable 중 한 루트를 "B"라고 하겠습니다.
B에는 다른 NavHost B가 있는데요, B의 composable 중 한 루트를 "C"(ScreenC) (startDestination)라고 하면
A에서 navigate (B)를 했을 때, B가 담고 있는 NavHost B가 실행되고 그 중 startDestination인 ScreenC가 화면에 뜨는 상태가 됩니다.
B의 다른 composable 중 다른 루트를 "D"라고 하고, ScreenC에서 NavHostB의 controller를 이용하여 navigate (D)를 하면 현재 D가 화면에 뜬 상태입니다.
여기서 BackSwipe를 했을 때, 저는 이전 화면인 C가 뜨기를 기대하나 실제로는 NavHost B 자체가 나가지며 A로 돌아갑니다.

navigate entry를 로그로 띄워놓으신 것 같아서 상황과 같이 보여드리면,
[A]
A에서 시간 지난 후 B로 로딩
[A, B]
[C]
C에서 D 클릭 시
[C, D]
반쯤 BackSwipe했을 때 entity changed: B
그리고 나가면
[A]
[C]
이렇게 됩니다.

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingenhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions