Navigation 3은 Compose와 함께 작동하도록 설계된 새로운 탐색 라이브러리입니다. 탐색 3을 사용하면 백 스택을 완전히 제어할 수 있으며 대상 간에 이동하는 것은 목록에서 항목을 추가하고 삭제하는 것만큼 간단합니다. 다음을 제공하여 유연한 앱 탐색 시스템을 만듭니다.
백 스택의 각 항목이 사용자가 탐색한 콘텐츠를 나타내는 백 스택 모델링을 위한 규칙
뒤로 스택 변경사항 (애니메이션 포함)에 따라 자동으로 업데이트되는 UI
항목이 백 스택에 있는 동안 상태를 유지할 수 있는 백 스택의 항목 범위
여러 대상을 동시에 표시하고 이러한 레이아웃 간에 원활하게 전환할 수 있는 적응형 레이아웃 시스템
콘텐츠가 상위 레이아웃과 통신하는 메커니즘 (메타데이터)
대략적으로 다음과 같은 방법으로 탐색 3을 구현합니다.
사용자가 앱에서 이동할 수 있는 콘텐츠를 각각 고유한 키로 정의하고 해당 키를 콘텐츠로 확인하는 함수를 추가합니다. 콘텐츠 키 확인을 참고하세요.
사용자가 앱을 탐색할 때 키가 푸시되고 삭제되는 백 스택을 만듭니다. 백 스택 만들기를 참고하세요.
NavDisplay를 사용하여 앱의 뒤로 스택을 표시합니다. 뒤 스택이 변경될 때마다 관련 콘텐츠를 표시하도록 UI가 업데이트됩니다. 뒤 스택 표시를 참고하세요.
적응형 레이아웃과 다양한 플랫폼을 지원하도록 필요에 따라 NavDisplay의 장면 전략을 수정합니다.
Navigation 3은 다음과 같은 방식으로 기존 Jetpack Navigation API를 개선합니다.
Compose와의 간단한 통합을 제공합니다.
백 스택을 완전히 제어할 수 있습니다.
백 스택에서 두 개 이상의 대상을 동시에 읽을 수 있는 레이아웃을 만들 수 있으므로 창 크기 및 기타 입력의 변경사항에 적응할 수 있습니다.
이 블로그 게시물에서 Navigation 3의 원칙과 API 설계 옵션에 관해 자세히 알아보세요.
코드 샘플
레시피 저장소에는 탐색 3 구성요소를 사용하여 일반적인 탐색 문제를 해결하는 방법의 예가 포함되어 있습니다.
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 Oracle 계열사의 상표 또는 등록 상표입니다.
최종 업데이트: 2025-07-27(UTC)
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-07-27(UTC)"],[],[],null,["# Navigation 3\n\n| **Experimental:** Navigation 3 is in alpha. The APIs may change in the future. Please file bugs and feedback using the [issue tracker](https://issuetracker.google.com/issues/new?component=1750212&template=2102223).\n\nNavigation 3 is a new navigation library designed to work with Compose. With\nNavigation 3, you have full control over your back stack, and navigating to and\nfrom destinations is as simple as adding and removing items from a list. It\ncreates a flexible app navigation system by providing:\n\n- Conventions for modeling a back stack, where each entry on the back stack represents content that the user has navigated to\n- A UI that automatically updates with back stack changes (including animations)\n- A scope for items in the back stack, allowing state to be retained while an item is in the back stack\n- An adaptive layout system that allows multiple destinations to be displayed at the same time, and allowing seamless switching between those layouts\n- A mechanism for content to communicate with its parent layout (metadata)\n\nAt a high level, you implement Navigation 3 in the following ways:\n\n1. Define the content that users can navigate to in your app, each with a unique key, and add a function to resolve that key to the content. See [Resolve keys\n to content](/guide/navigation/navigation-3/basics#resolve-keys).\n2. Create a back stack that keys are pushed onto and removed as users navigate your app. See [Create a back stack](/guide/navigation/navigation-3/basics#create-back).\n3. Use a [`NavDisplay`](/reference/kotlin/androidx/navigation3/ui/package-summary#NavDisplay(kotlin.collections.List,androidx.compose.ui.Modifier,androidx.compose.ui.Alignment,kotlin.Function1,kotlin.collections.List,androidx.navigation3.ui.SceneStrategy,androidx.compose.animation.SizeTransform,kotlin.Function1,kotlin.Function1,kotlin.Function1,kotlin.Function1)) to display your app's back stack. Whenever the back stack changes, it updates the UI to display relevant content. See [Display\n the back stack](/guide/navigation/navigation-3/basics#display-back).\n4. Modify `NavDisplay`'s [scene strategies](/guide/navigation/navigation-3/custom-layouts) as needed to support adaptive layouts and different platforms.\n\nYou can see the [full source code](https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:navigation3/) for Navigation 3 on AOSP.\n\nImprovements upon Jetpack Navigation\n------------------------------------\n\nNavigation 3 improves upon the original Jetpack Navigation API in the following\nways:\n\n- Provides a simpler integration with Compose\n- Offers you full control of the back stack\n- Makes it possible to create layouts that can read more than one destination from the back stack at the same time, allowing them to adapt to changes in window size and other inputs.\n\nRead more about Navigation 3's principles and API design choices in [this blog\npost](https://android-developers.googleblog.com/2025/05/announcing-jetpack-navigation-3-for-compose.html).\n\nCode samples\n------------\n\nThe [recipes repository](https://github.com/android/nav3-recipes) contains examples of how to use the\nNavigation 3 building blocks to solve common navigation challenges."]]