CINXE.COM

Navigation  |  Jetpack  |  Android Developers

<!doctype html> <html lang="en" dir="ltr"> <head> <meta name="google-signin-client-id" content="721724668570-nbkv1cfusk7kk4eni4pjvepaus73b13t.apps.googleusercontent.com"> <meta name="google-signin-scope" content="profile email https://www.googleapis.com/auth/developerprofiles https://www.googleapis.com/auth/developerprofiles.award"> <meta property="og:site_name" content="Android Developers"> <meta property="og:type" content="website"><meta name="theme-color" content="#34a853"><meta charset="utf-8"> <meta content="IE=Edge" http-equiv="X-UA-Compatible"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="manifest" href="/_pwa/android/manifest.json" crossorigin="use-credentials"> <link rel="preconnect" href="//www.gstatic.com" crossorigin> <link rel="preconnect" href="//fonts.gstatic.com" crossorigin> <link rel="preconnect" href="//fonts.googleapis.com" crossorigin> <link rel="preconnect" href="//apis.google.com" crossorigin> <link rel="preconnect" href="//www.google-analytics.com" crossorigin><link rel="stylesheet" href="//fonts.googleapis.com/css?family=Google+Sans:400,500,600,700|Google+Sans+Text:400,400italic,500,500italic,600,600italic,700,700italic|Roboto+Mono:400,500,700&display=swap"> <link rel="stylesheet" href="//fonts.googleapis.com/css2?family=Material+Icons&family=Material+Symbols+Outlined&display=block"><link rel="stylesheet" href="https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/android/css/app.css"> <link rel="stylesheet" href="https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/android/css/dark-theme.css" disabled> <link rel="shortcut icon" href="https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/android/images/favicon.svg"> <link rel="apple-touch-icon" href="https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/android/images/touchicon-180.png"><link rel="canonical" href="https://developer.android.com/jetpack/androidx/releases/navigation"><link rel="search" type="application/opensearchdescription+xml" title="Android Developers" href="https://developer.android.com/s/opensearch.xml"> <link rel="alternate" hreflang="en" href="https://developer.android.com/jetpack/androidx/releases/navigation" /><link rel="alternate" hreflang="x-default" href="https://developer.android.com/jetpack/androidx/releases/navigation" /><link rel="alternate" hreflang="ar" href="https://developer.android.com/jetpack/androidx/releases/navigation?hl=ar" /><link rel="alternate" hreflang="bn" href="https://developer.android.com/jetpack/androidx/releases/navigation?hl=bn" /><link rel="alternate" hreflang="zh-Hans" href="https://developer.android.com/jetpack/androidx/releases/navigation?hl=zh-cn" /><link rel="alternate" hreflang="zh-Hant" href="https://developer.android.com/jetpack/androidx/releases/navigation?hl=zh-tw" /><link rel="alternate" hreflang="fa" href="https://developer.android.com/jetpack/androidx/releases/navigation?hl=fa" /><link rel="alternate" hreflang="fr" href="https://developer.android.com/jetpack/androidx/releases/navigation?hl=fr" /><link rel="alternate" hreflang="de" href="https://developer.android.com/jetpack/androidx/releases/navigation?hl=de" /><link rel="alternate" hreflang="he" href="https://developer.android.com/jetpack/androidx/releases/navigation?hl=he" /><link rel="alternate" hreflang="hi" href="https://developer.android.com/jetpack/androidx/releases/navigation?hl=hi" /><link rel="alternate" hreflang="id" href="https://developer.android.com/jetpack/androidx/releases/navigation?hl=id" /><link rel="alternate" hreflang="it" href="https://developer.android.com/jetpack/androidx/releases/navigation?hl=it" /><link rel="alternate" hreflang="ja" href="https://developer.android.com/jetpack/androidx/releases/navigation?hl=ja" /><link rel="alternate" hreflang="ko" href="https://developer.android.com/jetpack/androidx/releases/navigation?hl=ko" /><link rel="alternate" hreflang="pl" href="https://developer.android.com/jetpack/androidx/releases/navigation?hl=pl" /><link rel="alternate" hreflang="pt-BR" href="https://developer.android.com/jetpack/androidx/releases/navigation?hl=pt-br" /><link rel="alternate" hreflang="ru" href="https://developer.android.com/jetpack/androidx/releases/navigation?hl=ru" /><link rel="alternate" hreflang="es-419" href="https://developer.android.com/jetpack/androidx/releases/navigation?hl=es-419" /><link rel="alternate" hreflang="th" href="https://developer.android.com/jetpack/androidx/releases/navigation?hl=th" /><link rel="alternate" hreflang="tr" href="https://developer.android.com/jetpack/androidx/releases/navigation?hl=tr" /><link rel="alternate" hreflang="vi" href="https://developer.android.com/jetpack/androidx/releases/navigation?hl=vi" /><title>Navigation &nbsp;|&nbsp; Jetpack &nbsp;|&nbsp; Android Developers</title> <meta property="og:title" content="Navigation &nbsp;|&nbsp; Jetpack &nbsp;|&nbsp; Android Developers"><meta property="og:url" content="https://developer.android.com/jetpack/androidx/releases/navigation"><meta property="og:image" content="https://developer.android.com/static/images/social/android-developers.png"> <meta property="og:image:width" content="1200"> <meta property="og:image:height" content="675"><meta property="og:locale" content="en"><meta name="twitter:card" content="summary_large_image"><script type="application/ld+json"> { "@context": "https://schema.org", "@type": "Article", "headline": "Navigation" } </script><script type="application/ld+json"> { "@context": "https://schema.org", "@type": "BreadcrumbList", "itemListElement": [{ "@type": "ListItem", "position": 1, "name": "Get started", "item": "https://developer.android.com/get-started/overview" },{ "@type": "ListItem", "position": 2, "name": "Jetpack", "item": "https://developer.android.com/jetpack" },{ "@type": "ListItem", "position": 3, "name": "Navigation", "item": "https://developer.android.com/jetpack/androidx/releases/navigation" }] } </script> <link rel="stylesheet" href="/extras.css"></head> <body class="" template="page" theme="android-theme" type="article" appearance layout="docs" display-toc pending> <devsite-progress type="indeterminate" id="app-progress"></devsite-progress> <section class="devsite-wrapper"> <devsite-cookie-notification-bar></devsite-cookie-notification-bar><devsite-header role="banner"> <div class="devsite-header--inner nocontent"> <div class="devsite-top-logo-row-wrapper-wrapper"> <div class="devsite-top-logo-row-wrapper"> <div class="devsite-top-logo-row"> <button type="button" id="devsite-hamburger-menu" class="devsite-header-icon-button button-flat material-icons gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Navigation menu button" visually-hidden aria-label="Open menu"> </button> <div class="devsite-product-name-wrapper"> <a href="/" class="devsite-site-logo-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Site logo" track-type="globalNav" track-name="androidDevelopers" track-metadata-position="nav" track-metadata-eventDetail="nav"> <picture> <source srcset="https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/android/images/lockup-dark-theme.svg" media="(prefers-color-scheme: dark)" class="devsite-dark-theme" alt="Android Developers"> <img src="https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/android/images/lockup.svg" class="devsite-site-logo" alt="Android Developers"> </picture> </a> <span class="devsite-product-name"> <ul class="devsite-breadcrumb-list" > <li class="devsite-breadcrumb-item "> </li> </ul> </span> </div> <div class="devsite-top-logo-row-middle"> <div class="devsite-header-upper-tabs"> <devsite-tabs class="upper-tabs"> <nav class="devsite-tabs-wrapper" aria-label="Upper tabs"> <tab class="devsite-dropdown devsite-dropdown-full devsite-active "> <a href="https://developer.android.com/jetpack" track-metadata-eventdetail="https://developer.android.com/jetpack" class="devsite-tabs-content gc-analytics-event android-dropdown-tab" track-type="nav" track-metadata-position="nav - essentials" track-metadata-module="primary nav" aria-label="Essentials, selected" data-category="Site-Wide Custom Events" data-label="Tab: Essentials" track-name="essentials" > Essentials </a> <a href="#" role="button" aria-haspopup="true" aria-expanded="false" aria-label="Dropdown menu for Essentials" track-type="nav" track-metadata-eventdetail="https://developer.android.com/jetpack" track-metadata-position="nav - essentials" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: Essentials" track-name="essentials" class="devsite-tabs-dropdown-toggle devsite-icon devsite-icon-arrow-drop-down"></a> <div class="devsite-tabs-dropdown" aria-label="submenu" hidden> <div class="devsite-tabs-dropdown-content"> <div class="devsite-tabs-dropdown-column android-dropdown android-dropdown-primary android-dropdown-studio"> <ul class="devsite-tabs-dropdown-section "> <li class="devsite-nav-title" role="heading" tooltip>Gemini in Android Studio</li> <li class="devsite-nav-description">Your AI development companion for Android development. </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/gemini-in-android" track-type="nav" track-metadata-eventdetail="https://developer.android.com/gemini-in-android" track-metadata-position="nav - essentials" track-metadata-module="tertiary nav" track-metadata-module_headline="gemini in android studio" tooltip class="button button-primary" > <div class="devsite-nav-item-title"> Learn more </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/studio" track-type="nav" track-metadata-eventdetail="https://developer.android.com/studio" track-metadata-position="nav - essentials" track-metadata-module="tertiary nav" track-metadata-module_headline="gemini in android studio" tooltip class="button button-white" > <div class="devsite-nav-item-title"> Get Android Studio </div> </a> </li> </ul> </div> <div class="devsite-tabs-dropdown-column android-dropdown"> <ul class="devsite-tabs-dropdown-section android-dropdown-section-icon android-dropdown-section-icon-launch"> <li class="devsite-nav-title" role="heading" tooltip>Get started</li> <li class="devsite-nav-description">Start by creating your first app. Go deeper with our training courses or explore app development on your own. </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/get-started/overview" track-type="nav" track-metadata-eventdetail="https://developer.android.com/get-started/overview" track-metadata-position="nav - essentials" track-metadata-module="tertiary nav" track-metadata-module_headline="get started" tooltip > <div class="devsite-nav-item-title"> Hello world </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/courses" track-type="nav" track-metadata-eventdetail="https://developer.android.com/courses" track-metadata-position="nav - essentials" track-metadata-module="tertiary nav" track-metadata-module_headline="get started" tooltip > <div class="devsite-nav-item-title"> Training courses </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/get-started/codelabs" track-type="nav" track-metadata-eventdetail="https://developer.android.com/get-started/codelabs" track-metadata-position="nav - essentials" track-metadata-module="tertiary nav" track-metadata-module_headline="get started" tooltip > <div class="devsite-nav-item-title"> Tutorials </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/kotlin" track-type="nav" track-metadata-eventdetail="https://developer.android.com/kotlin" track-metadata-position="nav - essentials" track-metadata-module="tertiary nav" track-metadata-module_headline="get started" tooltip > <div class="devsite-nav-item-title"> Kotlin for Android </div> </a> </li> <li class="devsite-nav-item"> <a href="https://play.google.com/console/about/guides/monetize/" track-type="nav" track-metadata-eventdetail="https://play.google.com/console/about/guides/monetize/" track-metadata-position="nav - essentials" track-metadata-module="tertiary nav" track-metadata-module_headline="get started" tooltip > <div class="devsite-nav-item-title"> Monetization with Play ↗️ </div> </a> </li> </ul> </div> <div class="devsite-tabs-dropdown-column android-dropdown"> <ul class="devsite-tabs-dropdown-section android-dropdown-section-icon android-dropdown-section-icon-multiple-screens"> <li class="devsite-nav-title" role="heading" tooltip>Extend by device</li> <li class="devsite-nav-description">Build apps that give your users seamless experiences from phones to tablets, watches, and more. </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/adaptive-apps" track-type="nav" track-metadata-eventdetail="https://developer.android.com/adaptive-apps" track-metadata-position="nav - essentials" track-metadata-module="tertiary nav" track-metadata-module_headline="extend by device" tooltip > <div class="devsite-nav-item-title"> Adaptive apps </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/wear" track-type="nav" track-metadata-eventdetail="https://developer.android.com/wear" track-metadata-position="nav - essentials" track-metadata-module="tertiary nav" track-metadata-module_headline="extend by device" tooltip > <div class="devsite-nav-item-title"> Wear OS </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/cars" track-type="nav" track-metadata-eventdetail="https://developer.android.com/cars" track-metadata-position="nav - essentials" track-metadata-module="tertiary nav" track-metadata-module_headline="extend by device" tooltip > <div class="devsite-nav-item-title"> Android for Cars </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/tv" track-type="nav" track-metadata-eventdetail="https://developer.android.com/tv" track-metadata-position="nav - essentials" track-metadata-module="tertiary nav" track-metadata-module_headline="extend by device" tooltip > <div class="devsite-nav-item-title"> Android TV </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/chrome-os" track-type="nav" track-metadata-eventdetail="https://developer.android.com/chrome-os" track-metadata-position="nav - essentials" track-metadata-module="tertiary nav" track-metadata-module_headline="extend by device" tooltip > <div class="devsite-nav-item-title"> ChromeOS </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/multi-device-development" track-type="nav" track-metadata-eventdetail="https://developer.android.com/multi-device-development" track-metadata-position="nav - essentials" track-metadata-module="tertiary nav" track-metadata-module_headline="extend by device" tooltip > <div class="devsite-nav-item-title"> Cross-device SDK </div> </a> </li> </ul> </div> <div class="devsite-tabs-dropdown-column android-dropdown"> <ul class="devsite-tabs-dropdown-section android-dropdown-section-icon android-dropdown-section-icon-platform"> <li class="devsite-nav-title" role="heading" tooltip>Build by category</li> <li class="devsite-nav-description">Learn to build for your use case by following Google&#39;s prescriptive and opinionated guidance. </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/games" track-type="nav" track-metadata-eventdetail="https://developer.android.com/games" track-metadata-position="nav - essentials" track-metadata-module="tertiary nav" track-metadata-module_headline="build by category" tooltip > <div class="devsite-nav-item-title"> Games </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/media" track-type="nav" track-metadata-eventdetail="https://developer.android.com/media" track-metadata-position="nav - essentials" track-metadata-module="tertiary nav" track-metadata-module_headline="build by category" tooltip > <div class="devsite-nav-item-title"> Camera & Media </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/social-and-messaging" track-type="nav" track-metadata-eventdetail="https://developer.android.com/social-and-messaging" track-metadata-position="nav - essentials" track-metadata-module="tertiary nav" track-metadata-module_headline="build by category" tooltip > <div class="devsite-nav-item-title"> Social & messaging </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/health-and-fitness" track-type="nav" track-metadata-eventdetail="https://developer.android.com/health-and-fitness" track-metadata-position="nav - essentials" track-metadata-module="tertiary nav" track-metadata-module_headline="build by category" tooltip > <div class="devsite-nav-item-title"> Health & Fitness </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/productivity" track-type="nav" track-metadata-eventdetail="https://developer.android.com/productivity" track-metadata-position="nav - essentials" track-metadata-module="tertiary nav" track-metadata-module_headline="build by category" tooltip > <div class="devsite-nav-item-title"> Productivity </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/work/overview" track-type="nav" track-metadata-eventdetail="https://developer.android.com/work/overview" track-metadata-position="nav - essentials" track-metadata-module="tertiary nav" track-metadata-module_headline="build by category" tooltip > <div class="devsite-nav-item-title"> Enterprise apps </div> </a> </li> </ul> </div> <div class="devsite-tabs-dropdown-column android-dropdown"> <ul class="devsite-tabs-dropdown-section android-dropdown-section-icon android-dropdown-section-icon-stars"> <li class="devsite-nav-title" role="heading" tooltip>Get the latest</li> <li class="devsite-nav-description">Stay in touch with the latest releases throughout the year, join our preview programs, and give us your feedback. </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/latest-updates" track-type="nav" track-metadata-eventdetail="https://developer.android.com/latest-updates" track-metadata-position="nav - essentials" track-metadata-module="tertiary nav" track-metadata-module_headline="get the latest" tooltip > <div class="devsite-nav-item-title"> Latest updates </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/latest-updates/experimental" track-type="nav" track-metadata-eventdetail="https://developer.android.com/latest-updates/experimental" track-metadata-position="nav - essentials" track-metadata-module="tertiary nav" track-metadata-module_headline="get the latest" tooltip > <div class="devsite-nav-item-title"> Experimental updates </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/studio/preview" track-type="nav" track-metadata-eventdetail="https://developer.android.com/studio/preview" track-metadata-position="nav - essentials" track-metadata-module="tertiary nav" track-metadata-module_headline="get the latest" tooltip > <div class="devsite-nav-item-title"> Android Studio preview </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/jetpack/androidx/versions" track-type="nav" track-metadata-eventdetail="https://developer.android.com/jetpack/androidx/versions" track-metadata-position="nav - essentials" track-metadata-module="tertiary nav" track-metadata-module_headline="get the latest" tooltip > <div class="devsite-nav-item-title"> Jetpack & Compose libraries </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/training/wearables/versions/4" track-type="nav" track-metadata-eventdetail="https://developer.android.com/training/wearables/versions/4" track-metadata-position="nav - essentials" track-metadata-module="tertiary nav" track-metadata-module_headline="get the latest" tooltip > <div class="devsite-nav-item-title"> Wear OS preview </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/design-for-safety/privacy-sandbox" track-type="nav" track-metadata-eventdetail="https://developer.android.com/design-for-safety/privacy-sandbox" track-metadata-position="nav - essentials" track-metadata-module="tertiary nav" track-metadata-module_headline="get the latest" tooltip > <div class="devsite-nav-item-title"> Privacy Sandbox </div> </a> </li> </ul> </div> </div> </div> </tab> <tab class="devsite-dropdown devsite-dropdown-full "> <a href="https://developer.android.com/design" track-metadata-eventdetail="https://developer.android.com/design" class="devsite-tabs-content gc-analytics-event android-dropdown-tab" track-type="nav" track-metadata-position="nav - design &amp; plan" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: Design &amp; Plan" track-name="design &amp; plan" > Design &amp; Plan </a> <a href="#" role="button" aria-haspopup="true" aria-expanded="false" aria-label="Dropdown menu for Design &amp; Plan" track-type="nav" track-metadata-eventdetail="https://developer.android.com/design" track-metadata-position="nav - design &amp; plan" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: Design &amp; Plan" track-name="design &amp; plan" class="devsite-tabs-dropdown-toggle devsite-icon devsite-icon-arrow-drop-down"></a> <div class="devsite-tabs-dropdown" aria-label="submenu" hidden> <div class="devsite-tabs-dropdown-content"> <div class="devsite-tabs-dropdown-column android-dropdown"> <ul class="devsite-tabs-dropdown-section android-dropdown-section-icon android-dropdown-section-icon-layout"> <li class="devsite-nav-title" role="heading" tooltip>UI Design</li> <li class="devsite-nav-description">Design a beautiful user interface using Android best practices.</li> <li class="devsite-nav-item"> <a href="https://developer.android.com/design/ui" track-type="nav" track-metadata-eventdetail="https://developer.android.com/design/ui" track-metadata-position="nav - design &amp; plan" track-metadata-module="tertiary nav" track-metadata-module_headline="ui design" tooltip > <div class="devsite-nav-item-title"> Design for Android </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/design/ui/mobile" track-type="nav" track-metadata-eventdetail="https://developer.android.com/design/ui/mobile" track-metadata-position="nav - design &amp; plan" track-metadata-module="tertiary nav" track-metadata-module_headline="ui design" tooltip > <div class="devsite-nav-item-title"> Mobile </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/design/ui/large-screens" track-type="nav" track-metadata-eventdetail="https://developer.android.com/design/ui/large-screens" track-metadata-position="nav - design &amp; plan" track-metadata-module="tertiary nav" track-metadata-module_headline="ui design" tooltip > <div class="devsite-nav-item-title"> Large screens (e.g., tablets) </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/design/ui/widget" track-type="nav" track-metadata-eventdetail="https://developer.android.com/design/ui/widget" track-metadata-position="nav - design &amp; plan" track-metadata-module="tertiary nav" track-metadata-module_headline="ui design" tooltip > <div class="devsite-nav-item-title"> Widgets </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/design/ui/wear" track-type="nav" track-metadata-eventdetail="https://developer.android.com/design/ui/wear" track-metadata-position="nav - design &amp; plan" track-metadata-module="tertiary nav" track-metadata-module_headline="ui design" tooltip > <div class="devsite-nav-item-title"> Wear OS </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/design/ui/tv" track-type="nav" track-metadata-eventdetail="https://developer.android.com/design/ui/tv" track-metadata-position="nav - design &amp; plan" track-metadata-module="tertiary nav" track-metadata-module_headline="ui design" tooltip > <div class="devsite-nav-item-title"> Android TV </div> </a> </li> </ul> </div> <div class="devsite-tabs-dropdown-column android-dropdown"> <ul class="devsite-tabs-dropdown-section android-dropdown-section-icon android-dropdown-section-icon-design"> <li class="devsite-nav-title" role="heading" tooltip>Architecture</li> <li class="devsite-nav-description">Design robust, testable, and maintainable app logic and services.</li> <li class="devsite-nav-item"> <a href="https://developer.android.com/topic/architecture/intro" track-type="nav" track-metadata-eventdetail="https://developer.android.com/topic/architecture/intro" track-metadata-position="nav - design &amp; plan" track-metadata-module="tertiary nav" track-metadata-module_headline="architecture" tooltip > <div class="devsite-nav-item-title"> Introduction </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/topic/libraries/view-binding" track-type="nav" track-metadata-eventdetail="https://developer.android.com/topic/libraries/view-binding" track-metadata-position="nav - design &amp; plan" track-metadata-module="tertiary nav" track-metadata-module_headline="architecture" tooltip > <div class="devsite-nav-item-title"> Libraries </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/guide/navigation/navigation-principles" track-type="nav" track-metadata-eventdetail="https://developer.android.com/guide/navigation/navigation-principles" track-metadata-position="nav - design &amp; plan" track-metadata-module="tertiary nav" track-metadata-module_headline="architecture" tooltip > <div class="devsite-nav-item-title"> Navigation </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/topic/modularization" track-type="nav" track-metadata-eventdetail="https://developer.android.com/topic/modularization" track-metadata-position="nav - design &amp; plan" track-metadata-module="tertiary nav" track-metadata-module_headline="architecture" tooltip > <div class="devsite-nav-item-title"> Modularization </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/training/testing/fundamentals" track-type="nav" track-metadata-eventdetail="https://developer.android.com/training/testing/fundamentals" track-metadata-position="nav - design &amp; plan" track-metadata-module="tertiary nav" track-metadata-module_headline="architecture" tooltip > <div class="devsite-nav-item-title"> Testing </div> </a> </li> </ul> </div> <div class="devsite-tabs-dropdown-column android-dropdown"> <ul class="devsite-tabs-dropdown-section android-dropdown-section-icon android-dropdown-section-icon-vitals"> <li class="devsite-nav-title" role="heading" tooltip>Quality</li> <li class="devsite-nav-description">Plan for app quality and align with Play store guidelines.</li> <li class="devsite-nav-item"> <a href="https://developer.android.com/quality" track-type="nav" track-metadata-eventdetail="https://developer.android.com/quality" track-metadata-position="nav - design &amp; plan" track-metadata-module="tertiary nav" track-metadata-module_headline="quality" tooltip > <div class="devsite-nav-item-title"> Overview </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/quality/core-value" track-type="nav" track-metadata-eventdetail="https://developer.android.com/quality/core-value" track-metadata-position="nav - design &amp; plan" track-metadata-module="tertiary nav" track-metadata-module_headline="quality" tooltip > <div class="devsite-nav-item-title"> Core value </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/quality/user-experience" track-type="nav" track-metadata-eventdetail="https://developer.android.com/quality/user-experience" track-metadata-position="nav - design &amp; plan" track-metadata-module="tertiary nav" track-metadata-module_headline="quality" tooltip > <div class="devsite-nav-item-title"> User experience </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/quality/technical" track-type="nav" track-metadata-eventdetail="https://developer.android.com/quality/technical" track-metadata-position="nav - design &amp; plan" track-metadata-module="tertiary nav" track-metadata-module_headline="quality" tooltip > <div class="devsite-nav-item-title"> Technical quality </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/quality/privacy-and-security" track-type="nav" track-metadata-eventdetail="https://developer.android.com/quality/privacy-and-security" track-metadata-position="nav - design &amp; plan" track-metadata-module="tertiary nav" track-metadata-module_headline="quality" tooltip > <div class="devsite-nav-item-title"> Security </div> </a> </li> </ul> </div> <div class="devsite-tabs-dropdown-column android-dropdown"> <ul class="devsite-tabs-dropdown-section android-dropdown-section-icon android-dropdown-section-icon-security-2"> <li class="devsite-nav-title" role="heading" tooltip>Security</li> <li class="devsite-nav-description">Safeguard users against threats and ensure a secure Android experience.</li> <li class="devsite-nav-item"> <a href="https://developer.android.com/security" track-type="nav" track-metadata-eventdetail="https://developer.android.com/security" track-metadata-position="nav - design &amp; plan" track-metadata-module="tertiary nav" track-metadata-module_headline="security" tooltip > <div class="devsite-nav-item-title"> Overview </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/privacy-and-security/about" track-type="nav" track-metadata-eventdetail="https://developer.android.com/privacy-and-security/about" track-metadata-position="nav - design &amp; plan" track-metadata-module="tertiary nav" track-metadata-module_headline="security" tooltip > <div class="devsite-nav-item-title"> Privacy </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/identity" track-type="nav" track-metadata-eventdetail="https://developer.android.com/identity" track-metadata-position="nav - design &amp; plan" track-metadata-module="tertiary nav" track-metadata-module_headline="security" tooltip > <div class="devsite-nav-item-title"> Identity </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/security/fraud-prevention" track-type="nav" track-metadata-eventdetail="https://developer.android.com/security/fraud-prevention" track-metadata-position="nav - design &amp; plan" track-metadata-module="tertiary nav" track-metadata-module_headline="security" tooltip > <div class="devsite-nav-item-title"> Fraud prevention </div> </a> </li> </ul> </div> <div class="devsite-tabs-dropdown-column android-dropdown"> <ul class="devsite-tabs-dropdown-section android-dropdown-section-icon android-dropdown-section-icon-earth"> <li class="devsite-nav-title" role="heading" tooltip>Build for Billions</li> <li class="devsite-nav-description">Create the best experience for entry-level devices</li> <li class="devsite-nav-item"> <a href="https://developer.android.com/build-for-billions" track-type="nav" track-metadata-eventdetail="https://developer.android.com/build-for-billions" track-metadata-position="nav - design &amp; plan" track-metadata-module="tertiary nav" track-metadata-module_headline="build for billions" tooltip > <div class="devsite-nav-item-title"> Overview </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/docs/quality-guidelines/build-for-billions" track-type="nav" track-metadata-eventdetail="https://developer.android.com/docs/quality-guidelines/build-for-billions" track-metadata-position="nav - design &amp; plan" track-metadata-module="tertiary nav" track-metadata-module_headline="build for billions" tooltip > <div class="devsite-nav-item-title"> About new markets </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/guide/topics/androidgo" track-type="nav" track-metadata-eventdetail="https://developer.android.com/guide/topics/androidgo" track-metadata-position="nav - design &amp; plan" track-metadata-module="tertiary nav" track-metadata-module_headline="build for billions" tooltip > <div class="devsite-nav-item-title"> Android (Go edition) </div> </a> </li> </ul> </div> </div> </div> </tab> <tab class="devsite-dropdown devsite-dropdown-full "> <a href="https://developer.android.com/develop" track-metadata-eventdetail="https://developer.android.com/develop" class="devsite-tabs-content gc-analytics-event android-dropdown-tab" track-type="nav" track-metadata-position="nav - develop" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: Develop" track-name="develop" > Develop </a> <a href="#" role="button" aria-haspopup="true" aria-expanded="false" aria-label="Dropdown menu for Develop" track-type="nav" track-metadata-eventdetail="https://developer.android.com/develop" track-metadata-position="nav - develop" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: Develop" track-name="develop" class="devsite-tabs-dropdown-toggle devsite-icon devsite-icon-arrow-drop-down"></a> <div class="devsite-tabs-dropdown" aria-label="submenu" hidden> <div class="devsite-tabs-dropdown-content"> <div class="devsite-tabs-dropdown-column android-dropdown android-dropdown-primary android-dropdown-ai"> <ul class="devsite-tabs-dropdown-section "> <li class="devsite-nav-title" role="heading" tooltip>Build AI experiences</li> <li class="devsite-nav-description">Build AI-powered Android apps with Gemini APIs and more. </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/ai" track-type="nav" track-metadata-eventdetail="https://developer.android.com/ai" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="build ai experiences" tooltip class="button button-primary" > <div class="devsite-nav-item-title"> Get started </div> </a> </li> </ul> </div> <div class="devsite-tabs-dropdown-column android-dropdown"> <ul class="devsite-tabs-dropdown-section android-dropdown-section-icon android-dropdown-section-icon-flag"> <li class="devsite-nav-title" role="heading" tooltip>Core areas</li> <li class="devsite-nav-description">Get the samples and docs for the features you need.</li> <li class="devsite-nav-item"> <a href="https://developer.android.com/samples" track-type="nav" track-metadata-eventdetail="https://developer.android.com/samples" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="core areas" tooltip > <div class="devsite-nav-item-title"> Samples </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/quick-guides" track-type="nav" track-metadata-eventdetail="https://developer.android.com/quick-guides" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="core areas" tooltip > <div class="devsite-nav-item-title"> Try Quick Guidesᵇᵉᵗᵃ </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/develop/ui" track-type="nav" track-metadata-eventdetail="https://developer.android.com/develop/ui" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="core areas" tooltip > <div class="devsite-nav-item-title"> User interfaces </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/guide/topics/permissions/overview" track-type="nav" track-metadata-eventdetail="https://developer.android.com/guide/topics/permissions/overview" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="core areas" tooltip > <div class="devsite-nav-item-title"> Permissions </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/develop/background-work" track-type="nav" track-metadata-eventdetail="https://developer.android.com/develop/background-work" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="core areas" tooltip > <div class="devsite-nav-item-title"> Background work </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/guide/topics/data" track-type="nav" track-metadata-eventdetail="https://developer.android.com/guide/topics/data" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="core areas" tooltip > <div class="devsite-nav-item-title"> Data and files </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/develop#core-areas" track-type="nav" track-metadata-eventdetail="https://developer.android.com/develop#core-areas" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="core areas" tooltip > <div class="devsite-nav-item-title"> All core areas ⤵️ </div> </a> </li> </ul> </div> <div class="devsite-tabs-dropdown-column android-dropdown"> <ul class="devsite-tabs-dropdown-section android-dropdown-section-icon android-dropdown-section-icon-tools-2"> <li class="devsite-nav-title" role="heading" tooltip>Tools and workflow</li> <li class="devsite-nav-description">Use the IDE to write and build your app, or create your own pipeline.</li> <li class="devsite-nav-item"> <a href="https://developer.android.com/studio/write" track-type="nav" track-metadata-eventdetail="https://developer.android.com/studio/write" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="tools and workflow" tooltip > <div class="devsite-nav-item-title"> Write and debug code </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/build/gradle-build-overview" track-type="nav" track-metadata-eventdetail="https://developer.android.com/build/gradle-build-overview" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="tools and workflow" tooltip > <div class="devsite-nav-item-title"> Build projects </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/training/testing" track-type="nav" track-metadata-eventdetail="https://developer.android.com/training/testing" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="tools and workflow" tooltip > <div class="devsite-nav-item-title"> Test your app </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/topic/performance/overview" track-type="nav" track-metadata-eventdetail="https://developer.android.com/topic/performance/overview" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="tools and workflow" tooltip > <div class="devsite-nav-item-title"> Performance </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/tools" track-type="nav" track-metadata-eventdetail="https://developer.android.com/tools" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="tools and workflow" tooltip > <div class="devsite-nav-item-title"> Command-line tools </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/reference/tools/gradle-api" track-type="nav" track-metadata-eventdetail="https://developer.android.com/reference/tools/gradle-api" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="tools and workflow" tooltip > <div class="devsite-nav-item-title"> Gradle plugin API </div> </a> </li> </ul> </div> <div class="devsite-tabs-dropdown-column android-dropdown"> <ul class="devsite-tabs-dropdown-section android-dropdown-section-icon android-dropdown-section-icon-multiple-screens"> <li class="devsite-nav-title" role="heading" tooltip>Device tech</li> <li class="devsite-nav-description">Write code for form factors. Connect devices and share data.</li> <li class="devsite-nav-item"> <a href="https://developer.android.com/guide/topics/large-screens/get-started-with-large-screens" track-type="nav" track-metadata-eventdetail="https://developer.android.com/guide/topics/large-screens/get-started-with-large-screens" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="device tech" tooltip > <div class="devsite-nav-item-title"> Large screens (e.g., tablets) </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/training/wearables" track-type="nav" track-metadata-eventdetail="https://developer.android.com/training/wearables" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="device tech" tooltip > <div class="devsite-nav-item-title"> Wear OS </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/health-and-fitness/guides" track-type="nav" track-metadata-eventdetail="https://developer.android.com/health-and-fitness/guides" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="device tech" tooltip > <div class="devsite-nav-item-title"> Android Health </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/guide/topics/connectivity/cross-device-sdk/overview" track-type="nav" track-metadata-eventdetail="https://developer.android.com/guide/topics/connectivity/cross-device-sdk/overview" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="device tech" tooltip > <div class="devsite-nav-item-title"> Cross-device SDK </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/training/cars" track-type="nav" track-metadata-eventdetail="https://developer.android.com/training/cars" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="device tech" tooltip > <div class="devsite-nav-item-title"> Android for Cars </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/training/tv" track-type="nav" track-metadata-eventdetail="https://developer.android.com/training/tv" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="device tech" tooltip > <div class="devsite-nav-item-title"> Android TV </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/chrome-os/intro" track-type="nav" track-metadata-eventdetail="https://developer.android.com/chrome-os/intro" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="device tech" tooltip > <div class="devsite-nav-item-title"> ChromeOS </div> </a> </li> </ul> </div> <div class="devsite-tabs-dropdown-column android-dropdown"> <ul class="devsite-tabs-dropdown-section android-dropdown-section-icon android-dropdown-section-icon-core-library"> <li class="devsite-nav-title" role="heading" tooltip>Libraries</li> <li class="devsite-nav-description">Browse API reference documentation with all the details.</li> <li class="devsite-nav-item"> <a href="https://developer.android.com/reference/packages" track-type="nav" track-metadata-eventdetail="https://developer.android.com/reference/packages" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="libraries" tooltip > <div class="devsite-nav-item-title"> Android platform </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/jetpack/androidx/explorer" track-type="nav" track-metadata-eventdetail="https://developer.android.com/jetpack/androidx/explorer" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="libraries" tooltip > <div class="devsite-nav-item-title"> Jetpack libraries </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developer.android.com/jetpack/androidx/releases/compose" track-type="nav" track-metadata-eventdetail="https://developer.android.com/jetpack/androidx/releases/compose" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="libraries" tooltip > <div class="devsite-nav-item-title"> Compose libraries </div> </a> </li> <li class="devsite-nav-item"> <a href="https://developers.google.com/android/reference/packages" track-type="nav" track-metadata-eventdetail="https://developers.google.com/android/reference/packages" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="libraries" tooltip > <div class="devsite-nav-item-title"> Google Play services ↗️ </div> </a> </li> <li class="devsite-nav-item"> <a href="https://play.google.com/sdks" track-type="nav" track-metadata-eventdetail="https://play.google.com/sdks" track-metadata-position="nav - develop" track-metadata-module="tertiary nav" track-metadata-module_headline="libraries" tooltip > <div class="devsite-nav-item-title"> Google Play SDK index ↗️ </div> </a> </li> </ul> </div> </div> </div> </tab> <tab > <a href="https://developer.android.com/distribute" track-metadata-eventdetail="https://developer.android.com/distribute" class="devsite-tabs-content gc-analytics-event " track-type="nav" track-metadata-position="nav - google play" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: Google Play" track-name="google play" > Google Play </a> </tab> <tab > <a href="https://developer.android.com/community" track-metadata-eventdetail="https://developer.android.com/community" class="devsite-tabs-content gc-analytics-event " track-type="nav" track-metadata-position="nav - community" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: Community" track-name="community" > Community </a> </tab> </nav> </devsite-tabs> </div> <devsite-search enable-signin enable-search enable-suggestions enable-query-completion project-name="Jetpack" tenant-name="Android Developers" > <form class="devsite-search-form" action="https://developer.android.com/s/results" method="GET"> <div class="devsite-search-container"> <button type="button" search-open class="devsite-search-button devsite-header-icon-button button-flat material-icons" aria-label="Open search"></button> <div class="devsite-searchbox"> <input aria-activedescendant="" aria-autocomplete="list" aria-label="Search" aria-expanded="false" aria-haspopup="listbox" autocomplete="off" class="devsite-search-field devsite-search-query" name="q" placeholder="Search" role="combobox" type="text" value="" > <div class="devsite-search-image material-icons" aria-hidden="true"> </div> <div class="devsite-search-shortcut-icon-container" aria-hidden="true"> <kbd class="devsite-search-shortcut-icon">/</kbd> </div> </div> </div> </form> <button type="button" search-close class="devsite-search-button devsite-header-icon-button button-flat material-icons" aria-label="Close search"></button> </devsite-search> </div> <devsite-appearance-selector></devsite-appearance-selector> <devsite-language-selector> <ul role="presentation"> <li role="presentation"> <a role="menuitem" lang="en" >English</a> </li> <li role="presentation"> <a role="menuitem" lang="de" >Deutsch</a> </li> <li role="presentation"> <a role="menuitem" lang="es_419" >Español – América Latina</a> </li> <li role="presentation"> <a role="menuitem" lang="fr" >Français</a> </li> <li role="presentation"> <a role="menuitem" lang="id" >Indonesia</a> </li> <li role="presentation"> <a role="menuitem" lang="it" >Italiano</a> </li> <li role="presentation"> <a role="menuitem" lang="pl" >Polski</a> </li> <li role="presentation"> <a role="menuitem" lang="pt_br" >Português – Brasil</a> </li> <li role="presentation"> <a role="menuitem" lang="vi" >Tiếng Việt</a> </li> <li role="presentation"> <a role="menuitem" lang="tr" >Türkçe</a> </li> <li role="presentation"> <a role="menuitem" lang="ru" >Русский</a> </li> <li role="presentation"> <a role="menuitem" lang="he" >עברית</a> </li> <li role="presentation"> <a role="menuitem" lang="ar" >العربيّة</a> </li> <li role="presentation"> <a role="menuitem" lang="fa" >فارسی</a> </li> <li role="presentation"> <a role="menuitem" lang="hi" >हिंदी</a> </li> <li role="presentation"> <a role="menuitem" lang="bn" >বাংলা</a> </li> <li role="presentation"> <a role="menuitem" lang="th" >ภาษาไทย</a> </li> <li role="presentation"> <a role="menuitem" lang="zh_cn" >中文 – 简体</a> </li> <li role="presentation"> <a role="menuitem" lang="zh_tw" >中文 – 繁體</a> </li> <li role="presentation"> <a role="menuitem" lang="ja" >日本語</a> </li> <li role="presentation"> <a role="menuitem" lang="ko" >한국어</a> </li> </ul> </devsite-language-selector> <a class="devsite-header-link devsite-top-button button gc-analytics-event" href="https://developer.android.com/studio" data-category="Site-Wide Custom Events" data-label="Site header link" > Android Studio </a> <devsite-user enable-profiles id="devsite-user"> <span class="button devsite-top-button" aria-hidden="true" visually-hidden>Sign in</span> </devsite-user> </div> </div> </div> <div class="devsite-collapsible-section "> <div class="devsite-header-background"> <div class="devsite-product-id-row" > <div class="devsite-product-description-row"> <ul class="devsite-breadcrumb-list" aria-label="Lower header breadcrumb"> <li class="devsite-breadcrumb-item "> <a href="https://developer.android.com/get-started/overview" class="devsite-breadcrumb-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Lower Header" data-value="1" track-type="globalNav" track-name="breadcrumb" track-metadata-position="1" track-metadata-eventdetail="Get started" > Get started </a> </li> <li class="devsite-breadcrumb-item "> <div class="devsite-breadcrumb-guillemet material-icons" aria-hidden="true"></div> <a href="https://developer.android.com/jetpack" class="devsite-breadcrumb-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Lower Header" data-value="2" track-type="globalNav" track-name="breadcrumb" track-metadata-position="2" track-metadata-eventdetail="Jetpack" > Jetpack </a> </li> </ul> </div> </div> <div class="devsite-doc-set-nav-row"> <devsite-tabs class="lower-tabs"> <nav class="devsite-tabs-wrapper" aria-label="Lower tabs"> <tab > <a href="https://developer.android.com/jetpack" track-metadata-eventdetail="https://developer.android.com/jetpack" class="devsite-tabs-content gc-analytics-event " track-type="nav" track-metadata-position="nav - overview" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: Overview" track-name="overview" > Overview </a> </tab> <tab > <a href="https://developer.android.com/jetpack/getting-started" track-metadata-eventdetail="https://developer.android.com/jetpack/getting-started" class="devsite-tabs-content gc-analytics-event " track-type="nav" track-metadata-position="nav - guides" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: Guides" track-name="guides" > Guides </a> </tab> <tab > <a href="https://developer.android.com/jetpack/samples" track-metadata-eventdetail="https://developer.android.com/jetpack/samples" class="devsite-tabs-content gc-analytics-event " track-type="nav" track-metadata-position="nav - samples" track-metadata-module="primary nav" data-category="Site-Wide Custom Events" data-label="Tab: Samples" track-name="samples" > Samples </a> </tab> <tab class="devsite-active"> <a href="https://developer.android.com/jetpack/androidx/explorer" track-metadata-eventdetail="https://developer.android.com/jetpack/androidx/explorer" class="devsite-tabs-content gc-analytics-event " track-type="nav" track-metadata-position="nav - libraries" track-metadata-module="primary nav" aria-label="Libraries, selected" data-category="Site-Wide Custom Events" data-label="Tab: Libraries" track-name="libraries" > Libraries </a> </tab> </nav> </devsite-tabs> </div> </div> </div> </div> </devsite-header> <devsite-book-nav scrollbars > <div class="devsite-book-nav-filter" > <span class="filter-list-icon material-icons" aria-hidden="true"></span> <input type="text" placeholder="Filter" aria-label="Type to filter" role="searchbox"> <span class="filter-clear-button hidden" data-title="Clear filter" aria-label="Clear filter" role="button" tabindex="0"></span> </div> <nav class="devsite-book-nav devsite-nav nocontent" aria-label="Side menu"> <div class="devsite-mobile-header"> <button type="button" id="devsite-close-nav" class="devsite-header-icon-button button-flat material-icons gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Close navigation" aria-label="Close navigation"> </button> <div class="devsite-product-name-wrapper"> <a href="/" class="devsite-site-logo-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Site logo" track-type="globalNav" track-name="androidDevelopers" track-metadata-position="nav" track-metadata-eventDetail="nav"> <picture> <source srcset="https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/android/images/lockup-dark-theme.svg" media="(prefers-color-scheme: dark)" class="devsite-dark-theme" alt="Android Developers"> <img src="https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/android/images/lockup.svg" class="devsite-site-logo" alt="Android Developers"> </picture> </a> <span class="devsite-product-name"> <ul class="devsite-breadcrumb-list" > <li class="devsite-breadcrumb-item "> </li> </ul> </span> </div> </div> <div class="devsite-book-nav-wrapper"> <div class="devsite-mobile-nav-top"> <ul class="devsite-nav-list"> <li class="devsite-nav-item"> <a href="/jetpack" class="devsite-nav-title gc-analytics-event devsite-nav-active" data-category="Site-Wide Custom Events" data-label="Tab: Essentials" track-name="essentials" data-category="Site-Wide Custom Events" data-label="Responsive Tab: Essentials" track-type="globalNav" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Essentials </span> </a> <ul class="devsite-nav-responsive-tabs devsite-nav-has-menu "> <li class="devsite-nav-item"> <span class="devsite-nav-title" tooltip data-category="Site-Wide Custom Events" data-label="Tab: Essentials" track-name="essentials" > <span class="devsite-nav-text" tooltip menu="Essentials"> More </span> <span class="devsite-nav-icon material-icons" data-icon="forward" menu="Essentials"> </span> </span> </li> </ul> <ul class="devsite-nav-responsive-tabs"> <li class="devsite-nav-item"> <a href="/jetpack" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Tab: Overview" track-name="overview" data-category="Site-Wide Custom Events" data-label="Responsive Tab: Overview" track-type="globalNav" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Overview </span> </a> </li> <li class="devsite-nav-item"> <a href="/jetpack/getting-started" class="devsite-nav-title gc-analytics-event devsite-nav-has-children " data-category="Site-Wide Custom Events" data-label="Tab: Guides" track-name="guides" data-category="Site-Wide Custom Events" data-label="Responsive Tab: Guides" track-type="globalNav" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Guides </span> <span class="devsite-nav-icon material-icons" data-icon="forward" > </span> </a> </li> <li class="devsite-nav-item"> <a href="/jetpack/samples" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Tab: Samples" track-name="samples" data-category="Site-Wide Custom Events" data-label="Responsive Tab: Samples" track-type="globalNav" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Samples </span> </a> </li> <li class="devsite-nav-item"> <a href="/jetpack/androidx/explorer" class="devsite-nav-title gc-analytics-event devsite-nav-has-children devsite-nav-active" data-category="Site-Wide Custom Events" data-label="Tab: Libraries" track-name="libraries" data-category="Site-Wide Custom Events" data-label="Responsive Tab: Libraries" track-type="globalNav" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip menu="_book"> Libraries </span> <span class="devsite-nav-icon material-icons" data-icon="forward" menu="_book"> </span> </a> </li> </ul> </li> <li class="devsite-nav-item"> <a href="/design" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Tab: Design &amp; Plan" track-name="design &amp; plan" data-category="Site-Wide Custom Events" data-label="Responsive Tab: Design &amp; Plan" track-type="globalNav" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Design &amp; Plan </span> </a> <ul class="devsite-nav-responsive-tabs devsite-nav-has-menu "> <li class="devsite-nav-item"> <span class="devsite-nav-title" tooltip data-category="Site-Wide Custom Events" data-label="Tab: Design &amp; Plan" track-name="design &amp; plan" > <span class="devsite-nav-text" tooltip menu="Design &amp; Plan"> More </span> <span class="devsite-nav-icon material-icons" data-icon="forward" menu="Design &amp; Plan"> </span> </span> </li> </ul> </li> <li class="devsite-nav-item"> <a href="/develop" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Tab: Develop" track-name="develop" data-category="Site-Wide Custom Events" data-label="Responsive Tab: Develop" track-type="globalNav" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Develop </span> </a> <ul class="devsite-nav-responsive-tabs devsite-nav-has-menu "> <li class="devsite-nav-item"> <span class="devsite-nav-title" tooltip data-category="Site-Wide Custom Events" data-label="Tab: Develop" track-name="develop" > <span class="devsite-nav-text" tooltip menu="Develop"> More </span> <span class="devsite-nav-icon material-icons" data-icon="forward" menu="Develop"> </span> </span> </li> </ul> </li> <li class="devsite-nav-item"> <a href="/distribute" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Tab: Google Play" track-name="google play" data-category="Site-Wide Custom Events" data-label="Responsive Tab: Google Play" track-type="globalNav" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Google Play </span> </a> </li> <li class="devsite-nav-item"> <a href="/community" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Tab: Community" track-name="community" data-category="Site-Wide Custom Events" data-label="Responsive Tab: Community" track-type="globalNav" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Community </span> </a> </li> <li class="devsite-nav-item"> <a href="/studio" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Android Studio" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Android Studio </span> </a> </li> </ul> </div> <div class="devsite-mobile-nav-bottom"> <ul class="devsite-nav-list" menu="_book"> <li class="devsite-nav-item"><a href="/jetpack/androidx/explorer" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/explorer" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/explorer" ><span class="devsite-nav-text" tooltip>Explore the libraries</span></a></li> <li class="devsite-nav-item devsite-nav-expandable"><div class="devsite-expandable-nav"> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"> <span class="devsite-nav-text" tooltip>Library Releases</span> </div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/jetpack/androidx/versions" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/versions" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/versions" ><span class="devsite-nav-text" tooltip>Overview</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/versions/all-channel" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/versions/all-channel" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/versions/all-channel" ><span class="devsite-nav-text" tooltip>All Channels</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/versions/stable-channel" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/versions/stable-channel" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/versions/stable-channel" ><span class="devsite-nav-text" tooltip>Stable Channel</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/versions/rc-channel" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/versions/rc-channel" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/versions/rc-channel" ><span class="devsite-nav-text" tooltip>RC Channel</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/versions/beta-channel" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/versions/beta-channel" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/versions/beta-channel" ><span class="devsite-nav-text" tooltip>Beta Channel</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/versions/alpha-channel" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/versions/alpha-channel" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/versions/alpha-channel" ><span class="devsite-nav-text" tooltip>Alpha Channel</span></a></li></ul></div></li> <li class="devsite-nav-item devsite-nav-expandable"><div class="devsite-expandable-nav"> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"> <span class="devsite-nav-text" tooltip>Release Notes</span> </div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/activity" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/activity" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/activity" ><span class="devsite-nav-text" tooltip>androidx.activity</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/ads" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/ads" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/ads" ><span class="devsite-nav-text" tooltip>androidx.ads</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/annotation" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/annotation" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/annotation" ><span class="devsite-nav-text" tooltip>androidx.annotation</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/appcompat" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/appcompat" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/appcompat" ><span class="devsite-nav-text" tooltip>androidx.appcompat</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/appsearch" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/appsearch" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/appsearch" ><span class="devsite-nav-text" tooltip>androidx.appsearch</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/arch-core" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/arch-core" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/arch-core" ><span class="devsite-nav-text" tooltip>androidx.arch.core</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/asynclayoutinflater" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/asynclayoutinflater" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/asynclayoutinflater" ><span class="devsite-nav-text" tooltip>androidx.asynclayoutinflater</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/autofill" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/autofill" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/autofill" ><span class="devsite-nav-text" tooltip>androidx.autofill</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/benchmark" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/benchmark" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/benchmark" ><span class="devsite-nav-text" tooltip>androidx.benchmark</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/biometric" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/biometric" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/biometric" ><span class="devsite-nav-text" tooltip>androidx.biometric</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/bluetooth" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/bluetooth" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/bluetooth" ><span class="devsite-nav-text" tooltip>androidx.bluetooth</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/browser" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/browser" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/browser" ><span class="devsite-nav-text" tooltip>androidx.browser</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/camera" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/camera" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/camera" ><span class="devsite-nav-text" tooltip>androidx.camera</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/camera-viewfinder" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/camera-viewfinder" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/camera-viewfinder" ><span class="devsite-nav-text" tooltip>androidx.camera.viewfinder</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/car" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/car" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/car" ><span class="devsite-nav-text" tooltip>androidx.car</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/car-app" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/car-app" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/car-app" ><span class="devsite-nav-text" tooltip>androidx.car.app</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/cardview" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/cardview" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/cardview" ><span class="devsite-nav-text" tooltip>androidx.cardview</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/collection" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/collection" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/collection" ><span class="devsite-nav-text" tooltip>androidx.collection</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/compose" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/compose" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/compose" ><span class="devsite-nav-text" tooltip>androidx.compose</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/compose-animation" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/compose-animation" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/compose-animation" ><span class="devsite-nav-text" tooltip>androidx.compose.animation</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/compose-compiler" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/compose-compiler" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/compose-compiler" ><span class="devsite-nav-text" tooltip>androidx.compose.compiler</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/compose-foundation" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/compose-foundation" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/compose-foundation" ><span class="devsite-nav-text" tooltip>androidx.compose.foundation</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/compose-material" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/compose-material" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/compose-material" ><span class="devsite-nav-text" tooltip>androidx.compose.material</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/compose-material3" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/compose-material3" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/compose-material3" ><span class="devsite-nav-text" tooltip>androidx.compose.material3</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/compose-material3-adaptive" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/compose-material3-adaptive" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/compose-material3-adaptive" ><span class="devsite-nav-text" tooltip>androidx.compose.material3.adaptive</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/compose-runtime" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/compose-runtime" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/compose-runtime" ><span class="devsite-nav-text" tooltip>androidx.compose.runtime</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/compose-ui" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/compose-ui" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/compose-ui" ><span class="devsite-nav-text" tooltip>androidx.compose.ui</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/concurrent" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/concurrent" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/concurrent" ><span class="devsite-nav-text" tooltip>androidx.concurrent</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/constraintlayout" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/constraintlayout" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/constraintlayout" ><span class="devsite-nav-text" tooltip>androidx.constraintlayout</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/contentpager" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/contentpager" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/contentpager" ><span class="devsite-nav-text" tooltip>androidx.contentpager</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/coordinatorlayout" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/coordinatorlayout" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/coordinatorlayout" ><span class="devsite-nav-text" tooltip>androidx.coordinatorlayout</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/core" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/core" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/core" ><span class="devsite-nav-text" tooltip>androidx.core</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/core-uwb" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/core-uwb" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/core-uwb" ><span class="devsite-nav-text" tooltip>androidx.core.uwb</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/credentials" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/credentials" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/credentials" ><span class="devsite-nav-text" tooltip>androidx.credentials</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/credentials/registry" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/credentials/registry" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/credentials/registry" ><span class="devsite-nav-text" tooltip>androidx.credentials.registry</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/cursoradapter" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/cursoradapter" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/cursoradapter" ><span class="devsite-nav-text" tooltip>androidx.cursoradapter</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/customview" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/customview" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/customview" ><span class="devsite-nav-text" tooltip>androidx.customview</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/databinding" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/databinding" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/databinding" ><span class="devsite-nav-text" tooltip>androidx.databinding</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/datastore" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/datastore" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/datastore" ><span class="devsite-nav-text" tooltip>androidx.datastore</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/documentfile" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/documentfile" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/documentfile" ><span class="devsite-nav-text" tooltip>androidx.documentfile</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/draganddrop" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/draganddrop" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/draganddrop" ><span class="devsite-nav-text" tooltip>androidx.draganddrop</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/drawerlayout" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/drawerlayout" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/drawerlayout" ><span class="devsite-nav-text" tooltip>androidx.drawerlayout</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/dynamicanimation" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/dynamicanimation" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/dynamicanimation" ><span class="devsite-nav-text" tooltip>androidx.dynamicanimation</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/emoji" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/emoji" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/emoji" ><span class="devsite-nav-text" tooltip>androidx.emoji</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/emoji2" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/emoji2" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/emoji2" ><span class="devsite-nav-text" tooltip>androidx.emoji2</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/enterprise" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/enterprise" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/enterprise" ><span class="devsite-nav-text" tooltip>androidx.enterprise</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/exifinterface" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/exifinterface" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/exifinterface" ><span class="devsite-nav-text" tooltip>androidx.exifinterface</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/fragment" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/fragment" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/fragment" ><span class="devsite-nav-text" tooltip>androidx.fragment</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/games" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/games" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/games" ><span class="devsite-nav-text" tooltip>androidx.games</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/glance" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/glance" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/glance" ><span class="devsite-nav-text" tooltip>androidx.glance</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/graphics" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/graphics" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/graphics" ><span class="devsite-nav-text" tooltip>androidx.graphics</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/gridlayout" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/gridlayout" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/gridlayout" ><span class="devsite-nav-text" tooltip>androidx.gridlayout</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/health" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/health" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/health" ><span class="devsite-nav-text" tooltip>androidx.health</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/health-connect" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/health-connect" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/health-connect" ><span class="devsite-nav-text" tooltip>androidx.health.connect</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/heifwriter" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/heifwriter" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/heifwriter" ><span class="devsite-nav-text" tooltip>androidx.heifwriter</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/hilt" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/hilt" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/hilt" ><span class="devsite-nav-text" tooltip>androidx.hilt</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/ink" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/ink" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/ink" ><span class="devsite-nav-text" tooltip>androidx.ink</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/input" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/input" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/input" ><span class="devsite-nav-text" tooltip>androidx.input</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/interpolator" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/interpolator" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/interpolator" ><span class="devsite-nav-text" tooltip>androidx.interpolator</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/javascriptengine" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/javascriptengine" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/javascriptengine" ><span class="devsite-nav-text" tooltip>androidx.javascriptengine</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/leanback" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/leanback" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/leanback" ><span class="devsite-nav-text" tooltip>androidx.leanback</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/legacy" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/legacy" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/legacy" ><span class="devsite-nav-text" tooltip>androidx.legacy</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/lifecycle" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/lifecycle" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/lifecycle" ><span class="devsite-nav-text" tooltip>androidx.lifecycle</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/lint" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/lint" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/lint" ><span class="devsite-nav-text" tooltip>androidx.lint</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/loader" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/loader" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/loader" ><span class="devsite-nav-text" tooltip>androidx.loader</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/localbroadcastmanager" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/localbroadcastmanager" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/localbroadcastmanager" ><span class="devsite-nav-text" tooltip>androidx.localbroadcastmanager</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/media" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/media" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/media" ><span class="devsite-nav-text" tooltip>androidx.media</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/media2" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/media2" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/media2" ><span class="devsite-nav-text" tooltip>androidx.media2</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/media3" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/media3" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/media3" ><span class="devsite-nav-text" tooltip>androidx.media3</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/mediarouter" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/mediarouter" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/mediarouter" ><span class="devsite-nav-text" tooltip>androidx.mediarouter</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/multidex" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/multidex" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/multidex" ><span class="devsite-nav-text" tooltip>androidx.multidex</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/metrics" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/metrics" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/metrics" ><span class="devsite-nav-text" tooltip>androidx.metrics</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/navigation" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/navigation" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/navigation" ><span class="devsite-nav-text" tooltip>androidx.navigation</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/paging" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/paging" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/paging" ><span class="devsite-nav-text" tooltip>androidx.paging</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/palette" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/palette" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/palette" ><span class="devsite-nav-text" tooltip>androidx.palette</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/pdf" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/pdf" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/pdf" ><span class="devsite-nav-text" tooltip>androidx.pdf</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/percentlayout" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/percentlayout" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/percentlayout" ><span class="devsite-nav-text" tooltip>androidx.percentlayout</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/preference" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/preference" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/preference" ><span class="devsite-nav-text" tooltip>androidx.preference</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/print" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/print" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/print" ><span class="devsite-nav-text" tooltip>androidx.print</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/privacysandbox-activity" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/privacysandbox-activity" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/privacysandbox-activity" ><span class="devsite-nav-text" tooltip>androidx.privacysandbox.activity</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/privacysandbox-ads" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/privacysandbox-ads" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/privacysandbox-ads" ><span class="devsite-nav-text" tooltip>androidx.privacysandbox.ads</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/privacysandbox-plugins" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/privacysandbox-plugins" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/privacysandbox-plugins" ><span class="devsite-nav-text" tooltip>androidx.privacysandbox.plugins</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/privacysandbox-sdkruntime" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/privacysandbox-sdkruntime" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/privacysandbox-sdkruntime" ><span class="devsite-nav-text" tooltip>androidx.privacysandbox.sdkruntime</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/privacysandbox-tools" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/privacysandbox-tools" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/privacysandbox-tools" ><span class="devsite-nav-text" tooltip>androidx.privacysandbox.tools</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/privacysandbox-ui" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/privacysandbox-ui" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/privacysandbox-ui" ><span class="devsite-nav-text" tooltip>androidx.privacysandbox.ui</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/profileinstaller" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/profileinstaller" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/profileinstaller" ><span class="devsite-nav-text" tooltip>androidx.profileinstaller</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/recommendation" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/recommendation" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/recommendation" ><span class="devsite-nav-text" tooltip>androidx.recommendation</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/recyclerview" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/recyclerview" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/recyclerview" ><span class="devsite-nav-text" tooltip>androidx.recyclerview</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/remotecallback" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/remotecallback" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/remotecallback" ><span class="devsite-nav-text" tooltip>androidx.remotecallback</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/resourceinspection" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/resourceinspection" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/resourceinspection" ><span class="devsite-nav-text" tooltip>androidx.resourceinspection</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/room" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/room" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/room" ><span class="devsite-nav-text" tooltip>androidx.room</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/savedstate" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/savedstate" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/savedstate" ><span class="devsite-nav-text" tooltip>androidx.savedstate</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/security" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/security" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/security" ><span class="devsite-nav-text" tooltip>androidx.security</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/sharetarget" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/sharetarget" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/sharetarget" ><span class="devsite-nav-text" tooltip>androidx.sharetarget</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/slice" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/slice" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/slice" ><span class="devsite-nav-text" tooltip>androidx.slice</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/slidingpanelayout" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/slidingpanelayout" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/slidingpanelayout" ><span class="devsite-nav-text" tooltip>androidx.slidingpanelayout</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/sqlite" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/sqlite" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/sqlite" ><span class="devsite-nav-text" tooltip>androidx.sqlite</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/startup" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/startup" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/startup" ><span class="devsite-nav-text" tooltip>androidx.startup</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/swiperefreshlayout" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/swiperefreshlayout" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/swiperefreshlayout" ><span class="devsite-nav-text" tooltip>androidx.swiperefreshlayout</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/test" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/test" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/test" ><span class="devsite-nav-text" tooltip>androidx.test</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/test-uiautomator" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/test-uiautomator" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/test-uiautomator" ><span class="devsite-nav-text" tooltip>androidx.test.uiautomator</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/textclassifier" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/textclassifier" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/textclassifier" ><span class="devsite-nav-text" tooltip>androidx.textclassifier</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/tracing" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/tracing" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/tracing" ><span class="devsite-nav-text" tooltip>androidx.tracing</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/transition" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/transition" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/transition" ><span class="devsite-nav-text" tooltip>androidx.transition</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/tv" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/tv" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/tv" ><span class="devsite-nav-text" tooltip>androidx.tv</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/tvprovider" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/tvprovider" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/tvprovider" ><span class="devsite-nav-text" tooltip>androidx.tvprovider</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/vectordrawable" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/vectordrawable" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/vectordrawable" ><span class="devsite-nav-text" tooltip>androidx.vectordrawable</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/versionedparcelable" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/versionedparcelable" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/versionedparcelable" ><span class="devsite-nav-text" tooltip>androidx.versionedparcelable</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/viewpager" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/viewpager" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/viewpager" ><span class="devsite-nav-text" tooltip>androidx.viewpager</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/viewpager2" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/viewpager2" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/viewpager2" ><span class="devsite-nav-text" tooltip>androidx.viewpager2</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/wear" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/wear" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/wear" ><span class="devsite-nav-text" tooltip>androidx.wear</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/wear-compose" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/wear-compose" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/wear-compose" ><span class="devsite-nav-text" tooltip>androidx.wear.compose</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/wear-protolayout" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/wear-protolayout" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/wear-protolayout" ><span class="devsite-nav-text" tooltip>androidx.wear.protolayout</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/wear-tiles" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/wear-tiles" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/wear-tiles" ><span class="devsite-nav-text" tooltip>androidx.wear.tiles</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/wear-watchface" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/wear-watchface" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/wear-watchface" ><span class="devsite-nav-text" tooltip>androidx.wear.watchface</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/webkit" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/webkit" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/webkit" ><span class="devsite-nav-text" tooltip>androidx.webkit</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/window" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/window" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/window" ><span class="devsite-nav-text" tooltip>androidx.window</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/window-extensions-core" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/window-extensions-core" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/window-extensions-core" ><span class="devsite-nav-text" tooltip>androidx.window.extensions.core</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/work" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/work" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/work" ><span class="devsite-nav-text" tooltip>androidx.work</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/jetifier" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/jetifier" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/jetifier" ><span class="devsite-nav-text" tooltip>tools.build.jetifier</span></a></li></ul></div></li> <li class="devsite-nav-item devsite-nav-expandable"><div class="devsite-expandable-nav"> <a class="devsite-nav-toggle" aria-hidden="true"></a><div class="devsite-nav-title devsite-nav-title-no-path" tabindex="0" role="button"> <span class="devsite-nav-text" tooltip>Release Note Archive</span> </div><ul class="devsite-nav-section"><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/archive" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/archive" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/archive" ><span class="devsite-nav-text" tooltip>Overview</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/archive/test" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/archive/test" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/archive/test" ><span class="devsite-nav-text" tooltip>Test</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/archive/arch" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/archive/arch" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/archive/arch" ><span class="devsite-nav-text" tooltip>Architecture Components</span></a></li><li class="devsite-nav-item"><a href="/jetpack/androidx/releases/archive/androidx" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/archive/androidx" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/archive/androidx" ><span class="devsite-nav-text" tooltip>AndroidX</span></a></li></ul></div></li> <li class="devsite-nav-item"><a href="/jetpack/androidx/compose-roadmap" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/compose-roadmap" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/compose-roadmap" ><span class="devsite-nav-text" tooltip>Jetpack Compose Roadmap</span></a></li> <li class="devsite-nav-item"><a href="/jetpack/androidx/releases/compose-kotlin" class="devsite-nav-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Book nav link, pathname: /jetpack/androidx/releases/compose-kotlin" track-type="bookNav" track-name="click" track-metadata-eventdetail="/jetpack/androidx/releases/compose-kotlin" ><span class="devsite-nav-text" tooltip>Jetpack Compose Kotlin Compatibility</span></a></li> </ul> <ul class="devsite-nav-list" menu="Essentials" aria-label="Side menu" hidden> <li class="devsite-nav-item devsite-nav-heading"> <span class="devsite-nav-title" tooltip > <span class="devsite-nav-text" tooltip > Gemini in Android Studio </span> </span> </li> <li class="devsite-nav-item"> <a href="/gemini-in-android" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Learn more" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Learn more </span> </a> </li> <li class="devsite-nav-item"> <a href="/studio" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Get Android Studio" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Get Android Studio </span> </a> </li> <li class="devsite-nav-item devsite-nav-heading"> <span class="devsite-nav-title" tooltip > <span class="devsite-nav-text" tooltip > Get started </span> </span> </li> <li class="devsite-nav-item"> <a href="/get-started/overview" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Hello world" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Hello world </span> </a> </li> <li class="devsite-nav-item"> <a href="/courses" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Training courses" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Training courses </span> </a> </li> <li class="devsite-nav-item"> <a href="/get-started/codelabs" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Tutorials" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Tutorials </span> </a> </li> <li class="devsite-nav-item"> <a href="/kotlin" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Kotlin for Android" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Kotlin for Android </span> </a> </li> <li class="devsite-nav-item"> <a href="https://play.google.com/console/about/guides/monetize/" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Monetization with Play ↗️" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Monetization with Play ↗️ </span> </a> </li> <li class="devsite-nav-item devsite-nav-heading"> <span class="devsite-nav-title" tooltip > <span class="devsite-nav-text" tooltip > Extend by device </span> </span> </li> <li class="devsite-nav-item"> <a href="/adaptive-apps" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Adaptive apps" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Adaptive apps </span> </a> </li> <li class="devsite-nav-item"> <a href="/wear" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Wear OS" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Wear OS </span> </a> </li> <li class="devsite-nav-item"> <a href="/cars" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Android for Cars" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Android for Cars </span> </a> </li> <li class="devsite-nav-item"> <a href="/tv" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Android TV" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Android TV </span> </a> </li> <li class="devsite-nav-item"> <a href="/chrome-os" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: ChromeOS" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > ChromeOS </span> </a> </li> <li class="devsite-nav-item"> <a href="/multi-device-development" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Cross-device SDK" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Cross-device SDK </span> </a> </li> <li class="devsite-nav-item devsite-nav-heading"> <span class="devsite-nav-title" tooltip > <span class="devsite-nav-text" tooltip > Build by category </span> </span> </li> <li class="devsite-nav-item"> <a href="/games" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Games" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Games </span> </a> </li> <li class="devsite-nav-item"> <a href="/media" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Camera &amp; Media" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Camera &amp; Media </span> </a> </li> <li class="devsite-nav-item"> <a href="/social-and-messaging" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Social &amp; messaging" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Social &amp; messaging </span> </a> </li> <li class="devsite-nav-item"> <a href="/health-and-fitness" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Health &amp; Fitness" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Health &amp; Fitness </span> </a> </li> <li class="devsite-nav-item"> <a href="/productivity" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Productivity" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Productivity </span> </a> </li> <li class="devsite-nav-item"> <a href="/work/overview" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Enterprise apps" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Enterprise apps </span> </a> </li> <li class="devsite-nav-item devsite-nav-heading"> <span class="devsite-nav-title" tooltip > <span class="devsite-nav-text" tooltip > Get the latest </span> </span> </li> <li class="devsite-nav-item"> <a href="/latest-updates" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Latest updates" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Latest updates </span> </a> </li> <li class="devsite-nav-item"> <a href="/latest-updates/experimental" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Experimental updates" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Experimental updates </span> </a> </li> <li class="devsite-nav-item"> <a href="/studio/preview" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Android Studio preview" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Android Studio preview </span> </a> </li> <li class="devsite-nav-item"> <a href="/jetpack/androidx/versions" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Jetpack &amp; Compose libraries" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Jetpack &amp; Compose libraries </span> </a> </li> <li class="devsite-nav-item"> <a href="/training/wearables/versions/4" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Wear OS preview" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Wear OS preview </span> </a> </li> <li class="devsite-nav-item"> <a href="/design-for-safety/privacy-sandbox" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Privacy Sandbox" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Privacy Sandbox </span> </a> </li> </ul> <ul class="devsite-nav-list" menu="Design &amp; Plan" aria-label="Side menu" hidden> <li class="devsite-nav-item devsite-nav-heading"> <span class="devsite-nav-title" tooltip > <span class="devsite-nav-text" tooltip > UI Design </span> </span> </li> <li class="devsite-nav-item"> <a href="/design/ui" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Design for Android" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Design for Android </span> </a> </li> <li class="devsite-nav-item"> <a href="/design/ui/mobile" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Mobile" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Mobile </span> </a> </li> <li class="devsite-nav-item"> <a href="/design/ui/large-screens" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Large screens (e.g., tablets)" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Large screens (e.g., tablets) </span> </a> </li> <li class="devsite-nav-item"> <a href="/design/ui/widget" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Widgets" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Widgets </span> </a> </li> <li class="devsite-nav-item"> <a href="/design/ui/wear" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Wear OS" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Wear OS </span> </a> </li> <li class="devsite-nav-item"> <a href="/design/ui/tv" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Android TV" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Android TV </span> </a> </li> <li class="devsite-nav-item devsite-nav-heading"> <span class="devsite-nav-title" tooltip > <span class="devsite-nav-text" tooltip > Architecture </span> </span> </li> <li class="devsite-nav-item"> <a href="/topic/architecture/intro" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Introduction" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Introduction </span> </a> </li> <li class="devsite-nav-item"> <a href="/topic/libraries/view-binding" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Libraries" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Libraries </span> </a> </li> <li class="devsite-nav-item"> <a href="/guide/navigation/navigation-principles" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Navigation" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Navigation </span> </a> </li> <li class="devsite-nav-item"> <a href="/topic/modularization" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Modularization" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Modularization </span> </a> </li> <li class="devsite-nav-item"> <a href="/training/testing/fundamentals" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Testing" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Testing </span> </a> </li> <li class="devsite-nav-item devsite-nav-heading"> <span class="devsite-nav-title" tooltip > <span class="devsite-nav-text" tooltip > Quality </span> </span> </li> <li class="devsite-nav-item"> <a href="/quality" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Overview" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Overview </span> </a> </li> <li class="devsite-nav-item"> <a href="/quality/core-value" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Core value" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Core value </span> </a> </li> <li class="devsite-nav-item"> <a href="/quality/user-experience" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: User experience" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > User experience </span> </a> </li> <li class="devsite-nav-item"> <a href="/quality/technical" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Technical quality" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Technical quality </span> </a> </li> <li class="devsite-nav-item"> <a href="/quality/privacy-and-security" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Security" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Security </span> </a> </li> <li class="devsite-nav-item devsite-nav-heading"> <span class="devsite-nav-title" tooltip > <span class="devsite-nav-text" tooltip > Security </span> </span> </li> <li class="devsite-nav-item"> <a href="/security" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Overview" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Overview </span> </a> </li> <li class="devsite-nav-item"> <a href="/privacy-and-security/about" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Privacy" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Privacy </span> </a> </li> <li class="devsite-nav-item"> <a href="/identity" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Identity" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Identity </span> </a> </li> <li class="devsite-nav-item"> <a href="/security/fraud-prevention" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Fraud prevention" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Fraud prevention </span> </a> </li> <li class="devsite-nav-item devsite-nav-heading"> <span class="devsite-nav-title" tooltip > <span class="devsite-nav-text" tooltip > Build for Billions </span> </span> </li> <li class="devsite-nav-item"> <a href="/build-for-billions" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Overview" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Overview </span> </a> </li> <li class="devsite-nav-item"> <a href="/docs/quality-guidelines/build-for-billions" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: About new markets" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > About new markets </span> </a> </li> <li class="devsite-nav-item"> <a href="/guide/topics/androidgo" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Android (Go edition)" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Android (Go edition) </span> </a> </li> </ul> <ul class="devsite-nav-list" menu="Develop" aria-label="Side menu" hidden> <li class="devsite-nav-item devsite-nav-heading"> <span class="devsite-nav-title" tooltip > <span class="devsite-nav-text" tooltip > Build AI experiences </span> </span> </li> <li class="devsite-nav-item"> <a href="/ai" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Get started" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Get started </span> </a> </li> <li class="devsite-nav-item devsite-nav-heading"> <span class="devsite-nav-title" tooltip > <span class="devsite-nav-text" tooltip > Core areas </span> </span> </li> <li class="devsite-nav-item"> <a href="/samples" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Samples" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Samples </span> </a> </li> <li class="devsite-nav-item"> <a href="/quick-guides" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Try Quick Guidesᵇᵉᵗᵃ" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Try Quick Guidesᵇᵉᵗᵃ </span> </a> </li> <li class="devsite-nav-item"> <a href="/develop/ui" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: User interfaces" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > User interfaces </span> </a> </li> <li class="devsite-nav-item"> <a href="/guide/topics/permissions/overview" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Permissions" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Permissions </span> </a> </li> <li class="devsite-nav-item"> <a href="/develop/background-work" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Background work" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Background work </span> </a> </li> <li class="devsite-nav-item"> <a href="/guide/topics/data" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Data and files" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Data and files </span> </a> </li> <li class="devsite-nav-item"> <a href="/develop#core-areas" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: All core areas ⤵️" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > All core areas ⤵️ </span> </a> </li> <li class="devsite-nav-item devsite-nav-heading"> <span class="devsite-nav-title" tooltip > <span class="devsite-nav-text" tooltip > Tools and workflow </span> </span> </li> <li class="devsite-nav-item"> <a href="/studio/write" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Write and debug code" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Write and debug code </span> </a> </li> <li class="devsite-nav-item"> <a href="/build/gradle-build-overview" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Build projects" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Build projects </span> </a> </li> <li class="devsite-nav-item"> <a href="/training/testing" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Test your app" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Test your app </span> </a> </li> <li class="devsite-nav-item"> <a href="/topic/performance/overview" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Performance" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Performance </span> </a> </li> <li class="devsite-nav-item"> <a href="/tools" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Command-line tools" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Command-line tools </span> </a> </li> <li class="devsite-nav-item"> <a href="/reference/tools/gradle-api" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Gradle plugin API" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Gradle plugin API </span> </a> </li> <li class="devsite-nav-item devsite-nav-heading"> <span class="devsite-nav-title" tooltip > <span class="devsite-nav-text" tooltip > Device tech </span> </span> </li> <li class="devsite-nav-item"> <a href="/guide/topics/large-screens/get-started-with-large-screens" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Large screens (e.g., tablets)" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Large screens (e.g., tablets) </span> </a> </li> <li class="devsite-nav-item"> <a href="/training/wearables" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Wear OS" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Wear OS </span> </a> </li> <li class="devsite-nav-item"> <a href="/health-and-fitness/guides" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Android Health" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Android Health </span> </a> </li> <li class="devsite-nav-item"> <a href="/guide/topics/connectivity/cross-device-sdk/overview" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Cross-device SDK" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Cross-device SDK </span> </a> </li> <li class="devsite-nav-item"> <a href="/training/cars" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Android for Cars" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Android for Cars </span> </a> </li> <li class="devsite-nav-item"> <a href="/training/tv" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Android TV" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Android TV </span> </a> </li> <li class="devsite-nav-item"> <a href="/chrome-os/intro" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: ChromeOS" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > ChromeOS </span> </a> </li> <li class="devsite-nav-item devsite-nav-heading"> <span class="devsite-nav-title" tooltip > <span class="devsite-nav-text" tooltip > Libraries </span> </span> </li> <li class="devsite-nav-item"> <a href="/reference/packages" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Android platform" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Android platform </span> </a> </li> <li class="devsite-nav-item"> <a href="/jetpack/androidx/explorer" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Jetpack libraries" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Jetpack libraries </span> </a> </li> <li class="devsite-nav-item"> <a href="/jetpack/androidx/releases/compose" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Compose libraries" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Compose libraries </span> </a> </li> <li class="devsite-nav-item"> <a href="https://developers.google.com/android/reference/packages" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Google Play services ↗️" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Google Play services ↗️ </span> </a> </li> <li class="devsite-nav-item"> <a href="https://play.google.com/sdks" class="devsite-nav-title gc-analytics-event " data-category="Site-Wide Custom Events" data-label="Responsive Tab: Google Play SDK index ↗️" track-type="navMenu" track-metadata-eventDetail="globalMenu" track-metadata-position="nav"> <span class="devsite-nav-text" tooltip > Google Play SDK index ↗️ </span> </a> </li> </ul> </div> </div> </nav> </devsite-book-nav> <section id="gc-wrapper"> <main role="main" class="devsite-main-content" has-book-nav has-sidebar > <div class="devsite-sidebar"> <div class="devsite-sidebar-content"> <devsite-toc class="devsite-nav" role="navigation" aria-label="On this page" depth="2" scrollbars ></devsite-toc> <devsite-recommendations-sidebar class="nocontent devsite-nav"> </devsite-recommendations-sidebar> </div> </div> <devsite-content> <article class="devsite-article"> <div class="devsite-article-meta nocontent" role="navigation"> <ul class="devsite-breadcrumb-list" aria-label="Breadcrumb"> <li class="devsite-breadcrumb-item "> <a href="https://developer.android.com/" class="devsite-breadcrumb-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Breadcrumbs" data-value="1" track-type="globalNav" track-name="breadcrumb" track-metadata-position="1" track-metadata-eventdetail="Android Developers" > Android Developers </a> </li> <li class="devsite-breadcrumb-item "> <div class="devsite-breadcrumb-guillemet material-icons" aria-hidden="true"></div> <a href="https://developer.android.com/get-started/overview" class="devsite-breadcrumb-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Breadcrumbs" data-value="2" track-type="globalNav" track-name="breadcrumb" track-metadata-position="2" track-metadata-eventdetail="Get started" > Get started </a> </li> <li class="devsite-breadcrumb-item "> <div class="devsite-breadcrumb-guillemet material-icons" aria-hidden="true"></div> <a href="https://developer.android.com/jetpack" class="devsite-breadcrumb-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Breadcrumbs" data-value="3" track-type="globalNav" track-name="breadcrumb" track-metadata-position="3" track-metadata-eventdetail="Jetpack" > Jetpack </a> </li> <li class="devsite-breadcrumb-item "> <div class="devsite-breadcrumb-guillemet material-icons" aria-hidden="true"></div> <a href="https://developer.android.com/jetpack/androidx/explorer" class="devsite-breadcrumb-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Breadcrumbs" data-value="4" track-type="globalNav" track-name="breadcrumb" track-metadata-position="4" track-metadata-eventdetail="" > Libraries </a> </li> </ul> <devsite-thumb-rating position="header"> </devsite-thumb-rating> </div> <devsite-feature-tooltip ack-key="AckCollectionsBookmarkTooltipDismiss" analytics-category="Site-Wide Custom Events" analytics-action-show="Callout Profile displayed" analytics-action-close="Callout Profile dismissed" analytics-label="Create Collection Callout" class="devsite-page-bookmark-tooltip nocontent" dismiss-button="true" id="devsite-collections-dropdown" dismiss-button-text="Dismiss" close-button-text="Got it"> <devsite-bookmark></devsite-bookmark> <span slot="popout-heading"> Stay organized with collections </span> <span slot="popout-contents"> Save and categorize content based on your preferences. </span> </devsite-feature-tooltip> <devsite-toc class="devsite-nav" depth="2" devsite-toc-embedded > </devsite-toc> <devsite-recommendations-dropdown class="nocontent"></devsite-recommendations-dropdown> <div class="devsite-article-body clearfix devsite-no-page-title"> <h1 class="devsite-page-title" style="width:50%" id="navigation" data-text="Navigation" tabindex="-1">Navigation</h1> <div style="align:right; text-align:right; padding-bottom:21px; margin-top:-45px; border-bottom:1px solid black;"> <a href="/guide/navigation">User Guide</a>&nbsp;&nbsp;<a href="https://github.com/android/architecture-components-samples">Code Sample</a>&nbsp;&nbsp;<a href="https://codelabs.developers.google.com/codelabs/android-navigation">Codelab</a> </div> <div style="float:left; font-size:medium; margin-bottom:5px; margin-top:10px" class="nocontent"> <div style="text-align:left; font-size:90%; padding-right:30px; margin-right:10px; margin-bottom:10px;"> API Reference<br> <a href="/reference/kotlin/androidx/navigation/package-summary">androidx.navigation</a><br> <a href="/reference/kotlin/androidx/navigation/fragment/package-summary">androidx.navigation.fragment</a><br> <a href="/reference/kotlin/androidx/navigation/ui/package-summary">androidx.navigation.ui</a><br> </div> </div> <div style="text-align:left; padding-left:10px; margin-left:10px; margin-top:15px; margin-bottom:10px;"> Navigation is a framework for navigating between &#39;destinations&#39; within an Android application that provides a consistent API whether destinations are implemented as Fragments, Activities, or other components. </div> <div style="clear:both"></div> <table style="width:100%"> <tr> <th style="width:15%">Latest Update</th> <th style="width:15%">Stable Release</th> <th style="width:15%">Release Candidate</th> <th style="width:15%">Beta Release</th> <th style="width:15%">Alpha Release</th></tr> <tr> <td>November 13, 2024</td> <td><a href="/jetpack/androidx/releases/navigation#2.8.4">2.8.4</a></td> <td>-</td> <td>-</td> <td><a href="/jetpack/androidx/releases/navigation#2.9.0-alpha03">2.9.0-alpha03</a></td> </tr> </table> <h2 id="declaring_dependencies" data-text="Declaring dependencies" tabindex="-1">Declaring dependencies</h2> <p>To add a dependency on Navigation, you must add the Google Maven repository to your project. Read <a href="/studio/build/dependencies#google-maven">Google&#39;s Maven repository</a> for more information.</p> <p>Add the dependencies for the artifacts you need in the <code translate="no" dir="ltr">build.gradle</code> file for your app or module:</p> <div> <div class="ds-selector-tabs"><section><h3 id="groovy" data-text="Groovy" tabindex="-1">Groovy</h3> <div></div><devsite-code><pre class="devsite-click-to-copy" translate="no" dir="ltr" is-upgraded syntax="Groovy"><span class="devsite-syntax-n">dependencies</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-o">{</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-kt">def</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-n">nav_version</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-o">=</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-s2">"2.8.4"</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-c1">// Jetpack Compose Integration</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-n">implementation</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-s2">"androidx.navigation:navigation-compose:$nav_version"</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-c1">// Views/Fragments Integration</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-n">implementation</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-s2">"androidx.navigation:navigation-fragment:$nav_version"</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-n">implementation</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-s2">"androidx.navigation:navigation-ui:$nav_version"</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-c1">// Feature module support for Fragments</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-n">implementation</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-s2">"androidx.navigation:navigation-dynamic-features-fragment:$nav_version"</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-c1">// Testing Navigation</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-n">androidTestImplementation</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-s2">"androidx.navigation:navigation-testing:$nav_version"</span> <span class="devsite-syntax-o">}</span></pre></devsite-code> </section><section><h3 id="kts" data-text="Kotlin" tabindex="-1">Kotlin</h3> <div></div><devsite-code><pre class="devsite-click-to-copy" translate="no" dir="ltr" is-upgraded syntax="Kotlin"><span class="devsite-syntax-n">dependencies</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">{</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-kd">val</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-nv">nav_version</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-o">=</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-s">"2.8.4"</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-c1">// Jetpack Compose integration</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-n">implementation</span><span class="devsite-syntax-p">(</span><span class="devsite-syntax-s">"androidx.navigation:navigation-compose:</span><span class="devsite-syntax-si">$</span><span class="devsite-syntax-n">nav_version</span><span class="devsite-syntax-s">"</span><span class="devsite-syntax-p">)</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-c1">// Views/Fragments integration</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-n">implementation</span><span class="devsite-syntax-p">(</span><span class="devsite-syntax-s">"androidx.navigation:navigation-fragment:</span><span class="devsite-syntax-si">$</span><span class="devsite-syntax-n">nav_version</span><span class="devsite-syntax-s">"</span><span class="devsite-syntax-p">)</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-n">implementation</span><span class="devsite-syntax-p">(</span><span class="devsite-syntax-s">"androidx.navigation:navigation-ui:</span><span class="devsite-syntax-si">$</span><span class="devsite-syntax-n">nav_version</span><span class="devsite-syntax-s">"</span><span class="devsite-syntax-p">)</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-c1">// Feature module support for Fragments</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-n">implementation</span><span class="devsite-syntax-p">(</span><span class="devsite-syntax-s">"androidx.navigation:navigation-dynamic-features-fragment:</span><span class="devsite-syntax-si">$</span><span class="devsite-syntax-n">nav_version</span><span class="devsite-syntax-s">"</span><span class="devsite-syntax-p">)</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-c1">// Testing Navigation</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-n">androidTestImplementation</span><span class="devsite-syntax-p">(</span><span class="devsite-syntax-s">"androidx.navigation:navigation-testing:</span><span class="devsite-syntax-si">$</span><span class="devsite-syntax-n">nav_version</span><span class="devsite-syntax-s">"</span><span class="devsite-syntax-p">)</span> <span class="devsite-syntax-p">}</span></pre></devsite-code> </section></div> </div> <h3 id="safe_args" data-text="Safe Args" tabindex="-1">Safe Args</h3> <p>To add <a href="/topic/libraries/architecture/navigation/navigation-pass-data#Safe-args">Safe Args</a> to your project, include the following <code translate="no" dir="ltr">classpath</code> in your top level <code translate="no" dir="ltr">build.gradle</code> file:</p> <div> <div class="ds-selector-tabs"><section><h3 id="groovy" data-text="Groovy" tabindex="-1">Groovy</h3> <div></div><devsite-code><pre class="devsite-click-to-copy" translate="no" dir="ltr" is-upgraded syntax="Groovy"><span class="devsite-syntax-n">buildscript</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-o">{</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-n">repositories</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-o">{</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-n">google</span><span class="devsite-syntax-o">()</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-o">}</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-n">dependencies</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-o">{</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-kt">def</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-n">nav_version</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-o">=</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-s2">"2.8.4"</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-n">classpath</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-s2">"androidx.navigation:navigation-safe-args-gradle-plugin:$nav_version"</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-o">}</span> <span class="devsite-syntax-o">}</span></pre></devsite-code> </section><section><h3 id="kts" data-text="Kotlin" tabindex="-1">Kotlin</h3> <div></div><devsite-code><pre class="devsite-click-to-copy" translate="no" dir="ltr" is-upgraded syntax="Kotlin"><span class="devsite-syntax-n">buildscript</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">{</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-n">repositories</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">{</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-n">google</span><span class="devsite-syntax-p">()</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">}</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-n">dependencies</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">{</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-kd">val</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-nv">nav_version</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-o">=</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-s">"2.8.4"</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-n">classpath</span><span class="devsite-syntax-p">(</span><span class="devsite-syntax-s">"androidx.navigation:navigation-safe-args-gradle-plugin:</span><span class="devsite-syntax-si">$</span><span class="devsite-syntax-n">nav_version</span><span class="devsite-syntax-s">"</span><span class="devsite-syntax-p">)</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">}</span> <span class="devsite-syntax-p">}</span></pre></devsite-code> </section></div> </div> <p>You must also apply one of two available plugins.</p> <p>To generate Java language code suitable for Java or mixed Java and Kotlin modules, add this line to <b>your app or module's</b> <code translate="no" dir="ltr">build.gradle</code> file:</p> <div> <div class="ds-selector-tabs"><section><h3 id="groovy" data-text="Groovy" tabindex="-1">Groovy</h3> <div></div><devsite-code><pre class="devsite-click-to-copy" translate="no" dir="ltr" is-upgraded syntax="Groovy"><span class="devsite-syntax-n">plugins</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-o">{</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-n">id</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-s1">'androidx.navigation.safeargs'</span> <span class="devsite-syntax-o">}</span></pre></devsite-code> </section><section><h3 id="kts" data-text="Kotlin" tabindex="-1">Kotlin</h3> <div></div><devsite-code><pre class="devsite-click-to-copy" translate="no" dir="ltr" is-upgraded syntax="Kotlin"><span class="devsite-syntax-n">plugins</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">{</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-n">id</span><span class="devsite-syntax-p">(</span><span class="devsite-syntax-s">"androidx.navigation.safeargs"</span><span class="devsite-syntax-p">)</span> <span class="devsite-syntax-p">}</span></pre></devsite-code> </section></div> </div> <p>Alternatively, to generate Kotlin code suitable for Kotlin-only modules add:</p> <div> <div class="ds-selector-tabs"><section><h3 id="groovy" data-text="Groovy" tabindex="-1">Groovy</h3> <div></div><devsite-code><pre class="devsite-click-to-copy" translate="no" dir="ltr" is-upgraded syntax="Groovy"><span class="devsite-syntax-n">plugins</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-o">{</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-n">id</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-s1">'androidx.navigation.safeargs.kotlin'</span> <span class="devsite-syntax-o">}</span></pre></devsite-code> </section><section><h3 id="kts" data-text="Kotlin" tabindex="-1">Kotlin</h3> <div></div><devsite-code><pre class="devsite-click-to-copy" translate="no" dir="ltr" is-upgraded syntax="Kotlin"><span class="devsite-syntax-n">plugins</span><span class="devsite-syntax-w"> </span><span class="devsite-syntax-p">{</span> <span class="devsite-syntax-w"> </span><span class="devsite-syntax-n">id</span><span class="devsite-syntax-p">(</span><span class="devsite-syntax-s">"androidx.navigation.safeargs.kotlin"</span><span class="devsite-syntax-p">)</span> <span class="devsite-syntax-p">}</span></pre></devsite-code> </section></div> </div> <p>You must have <code translate="no" dir="ltr">android.useAndroidX=true</code> in your <a href="/studio/build#properties-files"><code translate="no" dir="ltr">gradle.properties</code> file</a> as per <a href="/jetpack/androidx/migrate#migrate)">Migrating to AndroidX</a>.</p> <p>For information on using Kotlin extensions, see the <a href="/kotlin/ktx">ktx documentation</a>.</p> <p>For more information about dependencies, see <a href="/studio/build/dependencies">Add Build Dependencies</a>.</p> <h2 id="feedback" data-text="Feedback" tabindex="-1">Feedback</h2> <p>Your feedback helps make Jetpack better. Let us know if you discover new issues or have ideas for improving this library. Please take a look at the <a href="https://issuetracker.google.com/issues?q=componentid:409828%20status:open">existing issues</a> in this library before you create a new one. You can add your vote to an existing issue by clicking the star button.</p> <p><a href="https://issuetracker.google.com/issues/new?component=409828&template=1093757" class="button dac-button dac-outline-button">Create a new issue</a></p> <p>See the <a href="https://developers.google.com/issue-tracker">Issue Tracker documentation</a> for more information.</p> <h2 id="version_29_2" data-text="Version 2.9" tabindex="-1">Version 2.9</h2> <h3 id="2.9.0-alpha03" data-text="Version 2.9.0-alpha03" tabindex="-1">Version 2.9.0-alpha03</h3> <p>November 13, 2024</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.9.0-alpha03</code> is released. Version 2.9.0-alpha03 contains <a href="https://android.googlesource.com/platform/frameworks/support/+log/ccd90a76bd7c4acf4f4f01eca76350e383bc441e..6f09cf2ae979e48fdb19485f757a033e4a34bb82/navigation">these commits</a>.</p> <p><strong>New Features</strong></p> <ul> <li>Navigation type safety now supports value classes as a route or as the argument type of a route. (<a href="https://android-review.googlesource.com/#/q/I9344a33fe10d53701e53635af93176654957afb2">I9344a</a>, <a href="https://issuetracker.google.com/issues/374347483">b/374347483</a>)</li> </ul> <p><strong>Bug Fixes</strong></p> <ul> <li>Fixed a <code translate="no" dir="ltr">ConcurrentModificationException</code> that could occur when a <code translate="no" dir="ltr">LifecycleObserver</code> attached to a <code translate="no" dir="ltr">NavBackStackEntry</code> triggers a change to the back stack when the host <code translate="no" dir="ltr">LifecycleOwner</code> such as the containing Activity or Fragment changes its lifecycle state. (<a href="https://android-review.googlesource.com/#/q/Ia9494e9967aa45a7613c49d7530f524f5400d1ca">Ia9494</a>)</li> </ul> <h3 id="2.9.0-alpha02" data-text="Version 2.9.0-alpha02" tabindex="-1">Version 2.9.0-alpha02</h3> <p>October 30, 2024</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.9.0-alpha02</code> is released. Version 2.9.0-alpha02 contains <a href="https://android.googlesource.com/platform/frameworks/support/+log/b8a68b0896897fa158508d73a31998a26161d9a7..ccd90a76bd7c4acf4f4f01eca76350e383bc441e/navigation">these commits</a>.</p> <p><strong>External Contribution</strong></p> <ul> <li>New common <code translate="no" dir="ltr">NavController.handleDeepLink(request: NavDeepLinkRequest)</code> method. Thanks Konstantin Tskhovrebov! (<a href="https://android-review.googlesource.com/#/q/I3e22808b36e691658494191797056b7e3c4b4419">I3e228</a>)</li> </ul> <h3 id="2.9.0-alpha01" data-text="Version 2.9.0-alpha01" tabindex="-1">Version 2.9.0-alpha01</h3> <p>October 16, 2024</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.9.0-alpha01</code> is released. Version 2.9.0-alpha01 contains <a href="https://android.googlesource.com/platform/frameworks/support/+log/56650b920c78899081a1a16fdb81dab72753b5ef..b8a68b0896897fa158508d73a31998a26161d9a7/navigation">these commits</a>.</p> <p><strong>New Features</strong></p> <ul> <li>Custom Navigators can now mark their destinations as implementing the <code translate="no" dir="ltr">SupportingPane</code> interface which indicates to the <code translate="no" dir="ltr">NavController</code> that these destinations will be shown alongside other destinations. By using this interface, multiple destinations can be <code translate="no" dir="ltr">RESUMED</code> at the same time, for instance. (<a href="https://android-review.googlesource.com/#/q/Id5559bdaf3e31fb6d6fb66be0b451627c075d342">Id5559</a>)</li> <li>From <a href="/jetpack/androidx/releases/navigation#2.8.3">Navigation <code translate="no" dir="ltr">2.8.3</code></a>: Added new lint checks for the <code translate="no" dir="ltr">navigation-common</code>, <code translate="no" dir="ltr">navigation-runtime</code>, and <code translate="no" dir="ltr">navigation-compose</code> modules to help identify any type-safe routes that are not correctly annotated with <code translate="no" dir="ltr">@Serializable</code>. This check is applied to all <code translate="no" dir="ltr">NavGraphBuilder</code> and <code translate="no" dir="ltr">NavDeepLinkBuilder</code> extension functions. (<a href="https://android-review.googlesource.com/#/q/I4a259b5544e4e4655c4bdee812d64f3b2a1947bd">I4a259</a>, <a href="https://android-review.googlesource.com/#/q/I954023cd0cb4a5ee7d08647cf9a8139b0c8ae9d9">I95402</a>, <a href="https://android-review.googlesource.com/#/q/Ie601a15449b1561154bd3ae5d990e006a371c7c6">Ie601a</a>, <a href="https://android-review.googlesource.com/#/q/Id8c6ef1ee0839a43864afac58a5437ad1379e25f">Id8c6e</a>, <a href="https://android-review.googlesource.com/#/q/I28bda5541ec144f17668302d56ecaef4011becb3">I28bda</a>, <a href="https://issuetracker.google.com/issues/362725816">b/362725816</a>)</li> <li>From <a href="/jetpack/androidx/releases/navigation#2.8.3">Navigation <code translate="no" dir="ltr">2.8.3</code></a>: Added new lint checks for the <code translate="no" dir="ltr">navigation-common</code>, <code translate="no" dir="ltr">navigation-runtime</code>, and <code translate="no" dir="ltr">navigation-compose</code> modules to help identify any type-safe routes with Enum arguments that are not correctly annotated with <code translate="no" dir="ltr">@Keep</code>. This check is applied to all <code translate="no" dir="ltr">NavGraphBuilder</code> and <code translate="no" dir="ltr">NavDeepLinkBuilder</code> extension functions. (<a href="https://android-review.googlesource.com/#/q/I4a259b5544e4e4655c4bdee812d64f3b2a1947bd">I4a259</a>, <a href="https://android-review.googlesource.com/#/q/I954023cd0cb4a5ee7d08647cf9a8139b0c8ae9d9">I95402</a>, <a href="https://android-review.googlesource.com/#/q/Ie601a15449b1561154bd3ae5d990e006a371c7c6">Ie601a</a>, <a href="https://android-review.googlesource.com/#/q/Id8c6ef1ee0839a43864afac58a5437ad1379e25f">Id8c6e</a>, <a href="https://android-review.googlesource.com/#/q/I2b46fbc3b5be6251d89e902e315f50f20c46ce19">I2b46f</a>, <a href="https://issuetracker.google.com/issues/358687142">b/358687142</a>)</li> </ul> <p><strong>Behavior Changes</strong></p> <ul> <li>Attempting to use a <code translate="no" dir="ltr">NavController</code> that has been previously <code translate="no" dir="ltr">DESTROYED</code> will now cause an <code translate="no" dir="ltr">IllegalStateException</code>. (<a href="https://android-review.googlesource.com/#/q/I520da520adf9f99d887e63c0255afe97ecefdab5">I520da</a>, <a href="https://issuetracker.google.com/issues/369616172">b/369616172</a>)</li> </ul> <p><strong>Bug Fixes</strong></p> <ul> <li>Update Enum class not found exception to suggest using <code translate="no" dir="ltr">@Keep</code> annotation in case the Enum class gets erased in minified builds. (<a href="https://android-review.googlesource.com/#/q/I90e79cc476c21ab0ad3b172af65c436817665ef7">I90e79</a>, <a href="https://issuetracker.google.com/issues/358137294">b/358137294</a>)</li> </ul> <p><strong>Known Issues</strong></p> <ul> <li>There is an issue with the new lint rules that were added in <code translate="no" dir="ltr">Navigation 2.8.*</code> that cause an <code translate="no" dir="ltr">Obsolete custom lint check</code> error when attempting to run lint with Android Gradle Plugin 8.4+. (<a href="https://issuetracker.google.com/issues/368070326">b/368070326</a>, <a href="https://issuetracker.google.com/issues/371463741">b/371463741</a>)</li> </ul> <h2 id="version_28_2" data-text="Version 2.8" tabindex="-1">Version 2.8</h2> <h3 id="2.8.4" data-text="Version 2.8.4" tabindex="-1">Version 2.8.4</h3> <p>November 13, 2024</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.8.4</code> is released. Version 2.8.4 contains <a href="https://android.googlesource.com/platform/frameworks/support/+log/2822fa81f0a1cf4c14abd0e8ad3a56799ad79eee..6754f1118fa8ad573c67255da26c0eecf2531589/navigation">these commits</a>.</p> <p><strong>New Features</strong></p> <ul> <li>From <a href="#2.9.0-alpha03">Navigation <code translate="no" dir="ltr">2.9.0-alpha03</code></a>: Navigation type safety now supports value class as route or as the argument type of a route (<a href="https://android-review.googlesource.com/#/q/I9344a33fe10d53701e53635af93176654957afb2">I9344a</a>, <a href="https://issuetracker.google.com/issues/374347483">b/374347483</a>)</li> </ul> <p><strong>Bug Fixes</strong></p> <ul> <li>From <a href="#2.9.0-alpha01">Navigation <code translate="no" dir="ltr">2.9.0-alpha01</code></a>: Attempting to use a <code translate="no" dir="ltr">NavController</code> that has been previously <code translate="no" dir="ltr">DESTROYED</code> will now cause an <code translate="no" dir="ltr">IllegalStateException</code>. (<a href="https://android-review.googlesource.com/#/q/I520da520adf9f99d887e63c0255afe97ecefdab5">I520da</a>, <a href="https://issuetracker.google.com/issues/369616172">b/369616172</a>)</li> </ul> <h3 id="2.8.3" data-text="Version 2.8.3" tabindex="-1">Version 2.8.3</h3> <p>October 16, 2024</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.8.3</code> is released. Version 2.8.3 contains <a href="https://android.googlesource.com/platform/frameworks/support/+log/56650b920c78899081a1a16fdb81dab72753b5ef..2822fa81f0a1cf4c14abd0e8ad3a56799ad79eee/navigation">these commits</a>.</p> <p><strong>New Features</strong></p> <ul> <li>Added new lint checks for the <code translate="no" dir="ltr">navigation-common</code>, <code translate="no" dir="ltr">navigation-runtime</code>, and <code translate="no" dir="ltr">navigation-compose</code> modules to help identify any type-safe routes that are not correctly annotated with <code translate="no" dir="ltr">@Serializable</code>. This check is applied to all <code translate="no" dir="ltr">NavGraphBuilder</code> and <code translate="no" dir="ltr">NavDeepLinkBuilder</code> extension functions. (<a href="https://android-review.googlesource.com/#/q/I4a259b5544e4e4655c4bdee812d64f3b2a1947bd">I4a259</a>, <a href="https://android-review.googlesource.com/#/q/I954023cd0cb4a5ee7d08647cf9a8139b0c8ae9d9">I95402</a>, <a href="https://android-review.googlesource.com/#/q/Ie601a15449b1561154bd3ae5d990e006a371c7c6">Ie601a</a>, <a href="https://android-review.googlesource.com/#/q/Id8c6ef1ee0839a43864afac58a5437ad1379e25f">Id8c6e</a>, <a href="https://android-review.googlesource.com/#/q/I28bda5541ec144f17668302d56ecaef4011becb3">I28bda</a>, <a href="https://issuetracker.google.com/issues/362725816">b/362725816</a>)</li> <li>Added new lint checks for the <code translate="no" dir="ltr">navigation-common</code>, <code translate="no" dir="ltr">navigation-runtime</code>, and <code translate="no" dir="ltr">navigation-compose</code> modules to help identify any type-safe routes with Enum arguments that are not correctly annotated with <code translate="no" dir="ltr">@Keep</code>. This check is applied to all <code translate="no" dir="ltr">NavGraphBuilder</code> and <code translate="no" dir="ltr">NavDeepLinkBuilder</code> extension functions. (<a href="https://android-review.googlesource.com/#/q/I4a259b5544e4e4655c4bdee812d64f3b2a1947bd">I4a259</a>, <a href="https://android-review.googlesource.com/#/q/I954023cd0cb4a5ee7d08647cf9a8139b0c8ae9d9">I95402</a>, <a href="https://android-review.googlesource.com/#/q/Ie601a15449b1561154bd3ae5d990e006a371c7c6">Ie601a</a>, <a href="https://android-review.googlesource.com/#/q/Id8c6ef1ee0839a43864afac58a5437ad1379e25f">Id8c6e</a>, <a href="https://android-review.googlesource.com/#/q/I2b46fbc3b5be6251d89e902e315f50f20c46ce19">I2b46f</a>, <a href="https://issuetracker.google.com/issues/358687142">b/358687142</a>)</li> </ul> <p><strong>Bug Fixes</strong></p> <ul> <li>Fixed an issue where the new lint rules that were added in <code translate="no" dir="ltr">Navigation 2.8.*</code> would cause an <code translate="no" dir="ltr">Obsolete custom lint check</code> error when attempting to run lint with Android Gradle Plugin 8.4+. (<a href="https://android-review.googlesource.com/#/q/I1be3d7dc113f799e17314008efc5d914c6cb8ee7">I1be3d</a>, <a href="https://issuetracker.google.com/issues/368070326">b/368070326</a>, <a href="https://issuetracker.google.com/issues/371463741">b/371463741</a>)</li> </ul> <p><strong>Known Issues</strong></p> <ul> <li>Navigation lint will throw an Obsolete custom lint check error when attempting to run lint with Lint 16 (AGP 8.7) or higher. (<a href="https://issuetracker.google.com/issues/371926651">b/371926651</a>)</li> </ul> <h3 id="2.8.2" data-text="Version 2.8.2" tabindex="-1">Version 2.8.2</h3> <p>October 2, 2024</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.8.2</code> is released. Version 2.8.2 contains <a href="https://android.googlesource.com/platform/frameworks/support/+log/e5c636f0655470cfa3dac640d9454331d1197d80..56650b920c78899081a1a16fdb81dab72753b5ef/navigation">these commits</a>.</p> <p><strong>New Features</strong></p> <ul> <li>Navigation Type Safety now supports Serializable classes that include a <code translate="no" dir="ltr">Double</code>, <code translate="no" dir="ltr">Double?</code>, <code translate="no" dir="ltr">DoubleArray</code>, <code translate="no" dir="ltr">DoubleArray?</code>, <code translate="no" dir="ltr">List&lt;Double&gt;</code>, and <code translate="no" dir="ltr">List&lt;Double&gt;?</code> without requiring any custom <code translate="no" dir="ltr">NavType</code>. (<a href="https://android-review.googlesource.com/#/q/I570ebef5242e1bc3e8ee3f5d58b4aa2d677abaee">I570eb</a>, <a href="https://android-review.googlesource.com/#/q/Ibc4c02fa77e416c1c007209fb358a0d1c34389db">Ibc4c0</a>, <a href="https://android-review.googlesource.com/#/q/I374616d825fff71394721b51e01be5257899663c">I37461</a>, <a href="https://android-review.googlesource.com/#/q/I5bed4745773efa2e8a57fcdacc77cc16b1845067">I5bed4</a>, <a href="https://issuetracker.google.com/issues/359245753">b/359245753</a>)</li> </ul> <p><strong>Bug Fixes</strong></p> <ul> <li>Improved the error message for when Navigation fails to map a route&#39;s argument to a <code translate="no" dir="ltr">NavType</code>, the new error message will contain the argument name, argument fully qualified name, and the route&#39;s fully qualified name. (<a href="https://android-review.googlesource.com/#/q/Id84161f47630fe76d85af01bb06c7f3a13d372bb">Id8416</a>, <a href="https://issuetracker.google.com/issues/346264232">b/346264232</a>)</li> </ul> <h3 id="2.8.1" data-text="Version 2.8.1" tabindex="-1">Version 2.8.1</h3> <p>September 18, 2024</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.8.1</code> is released. Version 2.8.1 contains <a href="https://android.googlesource.com/platform/frameworks/support/+log/89b0ab6acbda86348e82091c6e1909c6ad69cea3..e5c636f0655470cfa3dac640d9454331d1197d80/navigation">these commits</a>.</p> <p><strong>New Features</strong></p> <ul> <li>Added a new lint rule to ensure the use of the <code translate="no" dir="ltr">popBackStack</code> function that takes a reified class type when attempting to <code translate="no" dir="ltr">popBackStack</code> using type-safe APIs. (<a href="https://android-review.googlesource.com/#/q/Ief1614a3ff15937b173536a43ba3f0de3c4d8b8a">Ief161</a>, <a href="https://issuetracker.google.com/issues/358095343">b/358095343</a>)</li> </ul> <p><strong>Bug Fixes</strong></p> <ul> <li>Navigation now requires that the route passed to a <code translate="no" dir="ltr">NavGraph</code>&#39;s <code translate="no" dir="ltr">startDestination</code> contains the values for all required arguments, which includes arguments that are non-nullable and have no default value. (<a href="https://android-review.googlesource.com/#/q/I18e7401ac7a4d322db2add9b0f2781196d4d3257">I18e74</a>, <a href="https://issuetracker.google.com/issues/362594265">b/362594265</a>)</li> <li>Navigation safe args has added support for non-nullable strings such that &quot;null&quot; values will be parsed and stored into the bundle as is. This departs from existing behavior where &quot;null&quot; values are parsed into a null object. This change only applies to non-nullable String types. Nullable strings remain unchanged. (<a href="https://android-review.googlesource.com/#/q/I08b4a9ce5e295a1bddb7baaf9b09af6367a2faa9">I08b4a</a>, <a href="https://issuetracker.google.com/issues/348936238">b/348936238</a>)</li> <li>A <code translate="no" dir="ltr">NavDestination</code> can no longer be deeplinked into except through a deep link that was explicitly added to the destination. This also means that you can only navigate to a destination&#39;s route with the navigate function overload that takes a string route. This fixes a vulnerability that made it possible to deep link to a potentially protected destination. (<a href="https://android-review.googlesource.com/#/q/Ie30e6c782fc511f1868dfab0d5ab11eab2bf8c4f">Ie30e6</a>)</li> </ul> <p><strong>Dependency Update</strong></p> <ul> <li>Navigation Safe Args now depends on Kotlin 1.9.24, rather than Kotlin 2.X, ensuring that developers are not forced to update. (<a href="https://android.googlesource.com/platform/frameworks/support/+/a4129ad752cb16484a021f26d63126381ffa5392">a4129a</a>)</li> <li>Navigation Compose now depends on <a href="/jetpack/androidx/releases/compose-animation#1.7.2">Compose <code translate="no" dir="ltr">1.7.2</code></a>.</li> </ul> <h3 id="2.8.0" data-text="Version 2.8.0" tabindex="-1">Version 2.8.0</h3> <p>September 4, 2024</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.8.0</code> is released. Version 2.8.0 contains <a href="https://android.googlesource.com/platform/frameworks/support/+log/c19eabc8b1f7d6b3b33ce697447d6c98a4f336dd..89b0ab6acbda86348e82091c6e1909c6ad69cea3/navigation">these commits</a>.</p> <p><strong>Important changes since 2.7.0</strong></p> <p><strong>Navigation Kotlin DSL Type-Safety</strong></p> <ul> <li>Navigation now provides type-safety for the Kotlin DSL (used by Navigation Compose) using Kotlin Serialization to allow you to define destinations in your navigation graph via type safe objects and data classes:</li> </ul> <pre class="prettyprint" translate="no" dir="ltr"><code translate="no" dir="ltr"> // Define a home destination that doesn&#39;t take any arguments @Serializable object Home // Define a profile destination that takes an ID @Serializable data class Profile(val id: String) // Now define your NavHost using type safe objects NavHost(navController, startDestination = Home) { composable&lt;Home&gt; { HomeScreen(onNavigateToProfile = { id -&gt; navController.navigate(Profile(id)) }) } composable&lt;Profile&gt; { backStackEntry -&gt; val profile: Profile = backStackEntry.toRoute() ProfileScreen(profile) } } </code></pre> <p>See the <a href="https://medium.com/androiddevelopers/navigation-compose-meet-type-safety-e081fb3cf2f8">Navigation Compose meet Type Safety blog post</a> for more information.</p> <p><strong>Navigation Compose Predictive Back</strong></p> <ul> <li>Navigation Compose now provides support for Predictive in-app back via the new <code translate="no" dir="ltr">SeekableTransitionState</code> APIs from compose-animation. This allows you to use the back gesture to see the previous destination with your custom Transition before deciding to either commit the transaction via the completed gesture or cancel.</li> </ul> <p><strong>Navigation Fragment Composable</strong></p> <ul> <li>Added a new <code translate="no" dir="ltr">navigation-fragment-compose</code> artifact that includes a <code translate="no" dir="ltr">ComposableNavHostFragment</code> alternative to <code translate="no" dir="ltr">NavHostFragment</code> that allows you to add composable destinations to your Navigation XML files. Each <code translate="no" dir="ltr">composable</code> destination must be expressed as a top-level, no argument <code translate="no" dir="ltr">@Composable</code> method whose fully qualified name is used as the <code translate="no" dir="ltr">android:name</code> attribute on each destination. When navigating to one of these destinations, a containing fragment is created to display the composable content.</li> </ul> <pre class="prettyprint" translate="no" dir="ltr"><code translate="no" dir="ltr"> // In HomeScreen.kt @Composable fun HomeScreen() { // Your Composable content here } // In your navigation.xml &lt;composable android:id=&#34;@+id/home_screen&#34; android:name=&#34;com.example.HomeScreenKt\$HomeScreen&#34; /&gt; </code></pre> <p><strong>Other Changes</strong></p> <ul> <li>Navigation Compose now depends on Compose 1.7.0.</li> <li>Navigation now provides a new <code translate="no" dir="ltr">CollectionNavType&lt;T&gt;</code> class, a subclass of <code translate="no" dir="ltr">NavType&lt;T&gt;</code> for collection-based arguments such as list, arrays, maps. All of the default <code translate="no" dir="ltr">NavType</code> arrays (<code translate="no" dir="ltr">IntArrayType</code>, <code translate="no" dir="ltr">LongArrayType</code>, <code translate="no" dir="ltr">FloatArrayType</code>, <code translate="no" dir="ltr">BoolArrayType</code>, and <code translate="no" dir="ltr">StringArrayType</code>) now inherit from this new class.</li> <li><code translate="no" dir="ltr">NavType</code> now has built-in support for Lists of Int, String, Boolean, Float, and Long.</li> </ul> <h3 id="2.8.0-rc01" data-text="Version 2.8.0-rc01" tabindex="-1">Version 2.8.0-rc01</h3> <p>August 21, 2024</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.8.0-rc01</code> is released. Version 2.8.0-rc01 contains <a href="https://android.googlesource.com/platform/frameworks/support/+log/9130b719318a69f2f3eaf82c32b131232fd721cb..c19eabc8b1f7d6b3b33ce697447d6c98a4f336dd/navigation">these commits</a>.</p> <p><strong>Bug Fixes</strong></p> <ul> <li>Fix navigation crash when passing in top level Enum classes as type safe arguments. (<a href="https://android-review.googlesource.com/#/q/I0ba7670109e378668548a47dd6981a5b1a2f5aba">I0ba76</a>, <a href="https://issuetracker.google.com/issues/358137294">b/358137294</a>)</li> <li>Navigation 2.8 now correctly works with SDK 34 and will not swap over to SDK 35 until the 2.9 release along with the rest of the AndroidX libraries. (<a href="https://issuetracker.google.com/issues/358798728">b/358798728</a>)</li> </ul> <h3 id="2.8.0-beta07" data-text="Version 2.8.0-beta07" tabindex="-1">Version 2.8.0-beta07</h3> <p>August 7, 2024</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.8.0-beta07</code> is released. Version 2.8.0-beta07 contains <a href="https://android.googlesource.com/platform/frameworks/support/+log/8b5ab34869fa8731b13a77763ea92989ce4ef70d..9130b719318a69f2f3eaf82c32b131232fd721cb/navigation">these commits</a>.</p> <p><strong>Known Issues</strong></p> <ul> <li>Due to <a href="https://issuetracker.google.com/issues/358137294">b/358137294</a>, only Enums nested in another class are supported out of the box. Top level Enums will be supported in the next release.</li> </ul> <p><strong>Bug Fixes</strong></p> <ul> <li>When navigating to duplicate or shared destinations, navigation will prioritize going to the closest matching destination from the current location in the graph. (<a href="https://android-review.googlesource.com/#/q/Ic89a41d2a54f36fca6c41f2f7ea948f8c13b2bd5">Ic89a4</a>, <a href="https://issuetracker.google.com/issues/352006850">b/352006850</a>)</li> <li>Navigation in safe args now has added a new <code translate="no" dir="ltr">NavType.EnumType</code>. This means <code translate="no" dir="ltr">Enum</code> types no longer require custom <code translate="no" dir="ltr">NavType</code>s. Note that the <code translate="no" dir="ltr">Enum</code>’s <code translate="no" dir="ltr">SerialName</code> must be the default fully qualified name. (<a href="https://android-review.googlesource.com/#/q/I66d22e2004a9c996688f082f1732b7f4c4e8ca24">I66d22</a>, <a href="https://issuetracker.google.com/issues/346475493">b/346475493</a>)</li> <li>Navigation in safe args has added built-in support for nullable argument types including <code translate="no" dir="ltr">Int?</code>,<code translate="no" dir="ltr">Long?</code>, <code translate="no" dir="ltr">Float?</code>, <code translate="no" dir="ltr">Boolean?</code>, and <code translate="no" dir="ltr">Enum&lt;*&gt;?</code>. (<a href="https://android-review.googlesource.com/#/q/I32d131926d08b01151c22d35f7a2d3389d5a1f56">I32d13</a>,<a href="https://android-review.googlesource.com/#/q/I1c580e271cab940b11378f85bd0a5175c503e2f5">I1c580</a>,<a href="https://android-review.googlesource.com/#/q/Ifba6679f9214b477802567403d8ae97203a30303">Ifba66</a>,<a href="https://android-review.googlesource.com/#/q/I978b0c52b9847518f77d5f238ef8461da9dc485b">I978b0</a>,<a href="https://android-review.googlesource.com/#/q/Ide076fd4f77daf8373d71e093f833920aba9b911">Ide076</a> , <a href="https://issuetracker.google.com/issues/351994237">b/351994237</a>)</li> <li>The <code translate="no" dir="ltr">NavGraph</code>’s <code translate="no" dir="ltr">startDestination</code> will now use the default argument values if the <code translate="no" dir="ltr">startDestination</code> route passed to the <code translate="no" dir="ltr">NavGraph</code> is exactly equal to the <code translate="no" dir="ltr">startDestination.route</code>. (<a href="https://android-review.googlesource.com/#/q/I137626c99c62ec57db4a44448dd7cdf61209f264">I13762</a>, <a href="https://issuetracker.google.com/issues/354046047">b/354046047</a>)</li> </ul> <h3 id="2.8.0-beta06" data-text="Version 2.8.0-beta06" tabindex="-1">Version 2.8.0-beta06</h3> <p>July 24, 2024</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.8.0-beta06</code> is released. Version 2.8.0-beta06 contains <a href="https://android.googlesource.com/platform/frameworks/support/+log/56579bc30499ce39f0d7a6713a065b00c6194206..8b5ab34869fa8731b13a77763ea92989ce4ef70d/navigation">these commits</a>.</p> <p><strong>Bug Fixes</strong></p> <ul> <li>Fixed an issue where the <code translate="no" dir="ltr">WrongStartDestinationType</code> lint checks did not check for Companion objects on the passed in class type, causing lint to fail to detect the error. (<a href="https://android-review.googlesource.com/#/q/I92b095af135ce0cffd5cd251de65a3ee70d813c8">I92b09</a>)</li> </ul> <h3 id="2.8.0-beta05" data-text="Version 2.8.0-beta05" tabindex="-1">Version 2.8.0-beta05</h3> <p>July 10, 2024</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.8.0-beta05</code> is released. Version 2.8.0-beta05 contains <a href="https://android.googlesource.com/platform/frameworks/support/+log/5299742c3cf8497f1690c2399056af490673d29e..56579bc30499ce39f0d7a6713a065b00c6194206/navigation">these commits</a>.</p> <p><strong>Bug Fixes</strong></p> <ul> <li>Fix <code translate="no" dir="ltr">singleTop</code> navigation crash when nested <code translate="no" dir="ltr">NavGraphs</code> share the same <code translate="no" dir="ltr">startDestination</code> route. (<a href="https://android-review.googlesource.com/#/q/I17b9466ce3411e0113d1f9a56faa8706577abc72">I17b94</a>, <a href="https://issuetracker.google.com/issues/294408596">b/294408596</a>)</li> </ul> <h3 id="2.8.0-beta04" data-text="Version 2.8.0-beta04" tabindex="-1">Version 2.8.0-beta04</h3> <p>June 26, 2024</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.8.0-beta04</code> is released. Version 2.8.0-beta04 contains <a href="https://android.googlesource.com/platform/frameworks/support/+log/9de5bf61f1fad1fd6da2b64fe350d3aa39dc5de1..5299742c3cf8497f1690c2399056af490673d29e/navigation">these commits</a>.</p> <p><strong>Bug Fixes</strong></p> <ul> <li>Navigation now supports navigating with empty strings in path arguments. (<a href="https://android-review.googlesource.com/#/q/Ic5dbdd3b4786f62f4544a70b6786a269da8a37cc">Ic5dbd</a>, <a href="https://issuetracker.google.com/issues/339481310">b/339481310</a>)</li> <li>Improve error message for custom serializers declared directly on class fields via <code translate="no" dir="ltr">@Serializable(with =...)</code> to clarify that this is currently an unsupported feature. (<a href="https://android-review.googlesource.com/#/q/I052b0e6a34c7e38520723e7c00a920dc7abe4eb7">I052b0</a>, <a href="https://issuetracker.google.com/issues/341319151">b/341319151</a>)</li> <li><code translate="no" dir="ltr">SavedStateHandleFactory</code> test api can now be used in non-android tests but will require Robolectric to support argument parsing with Bundles. (<a href="https://android-review.googlesource.com/#/q/I76cdc4b40474680dbdb58e6b8a6451f0e228f9b1">I76cdc</a>, <a href="https://issuetracker.google.com/issues/340966212">b/340966212</a>)</li> <li>Fixed crash from restoring state when resuming the app after process death with using Type-Safe Navigation in Compose. (<a href="https://android-review.googlesource.com/#/q/Ia8f38fc59b8e4dac1910c5a593e1ec0585e59456">Ia8f38</a>, <a href="https://issuetracker.google.com/issues/341801005">b/341801005</a>)</li> <li>Fixed an issue in Navigation Compose where after canceling the Predictive Back Gesture, the <code translate="no" dir="ltr">NavBackStackEntry</code> that the user returns to never returns back to the <code translate="no" dir="ltr">RESUMED</code> Lifecycle State. This also ensures the returning destination correctly animates back in instead of snapping into place after a fling. (<a href="https://android-review.googlesource.com/#/q/I97a0c5fe7fe661a2fadfbb01346676482d426028">I97a0c</a>, <a href="https://issuetracker.google.com/issues/346608857">b/346608857</a>)</li> <li>When using Predictive back with Navigation Compose, the destination being popped will now have the proper z-order, correctly animating on top of the incoming destination. (<a href="https://android-review.googlesource.com/#/q/I2077b399fc9bc9a846da6ed17d63d002c8e8122f">I2077b</a>, <a href="https://issuetracker.google.com/issues/345993681">b/345993681</a>)</li> </ul> <h3 id="2.8.0-beta03" data-text="Version 2.8.0-beta03" tabindex="-1">Version 2.8.0-beta03</h3> <p>June 12, 2024</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.8.0-beta03</code> is released. Version 2.8.0-beta03 contains <a href="https://android.googlesource.com/platform/frameworks/support/+log/473554f275109d78164adca6b6cea539aed8b68b..9de5bf61f1fad1fd6da2b64fe350d3aa39dc5de1/navigation">these commits</a>.</p> <p><strong>API Changes</strong></p> <ul> <li><code translate="no" dir="ltr">CollectionNavType</code> has a new abstract <code translate="no" dir="ltr">emptyCollection()</code> method. Override this to handle an empty collection passed in as an argument. (<a href="https://android-review.googlesource.com/#/q/Ie4d8464050a7164176c2aee55518b03a5db704ad">Ie4d84</a>, <a href="https://issuetracker.google.com/issues/341723133">b/341723133</a>)</li> </ul> <p><strong>Bug Fixes</strong></p> <ul> <li>Added documentation on <code translate="no" dir="ltr">NavType.serializeAsValue</code> and <code translate="no" dir="ltr">serializeAsValues</code> to highlight that the final outputs should be Uri encoded. (<a href="https://android-review.googlesource.com/#/q/Ida6bd848fb1e3d8e26277eff0f214e1d40907063">Ida6bd</a>, <a href="https://issuetracker.google.com/issues/344943214">b/344943214</a>)</li> <li>Fixed crash when calling <code translate="no" dir="ltr">toRoute&lt;T&gt;</code> with a null <code translate="no" dir="ltr">CollectionNavType</code> argument. When navigating with a null <code translate="no" dir="ltr">CollectionNavType</code>, the output argument will be the default value declared on your Serializable class, or the return value of <code translate="no" dir="ltr">emptyCollection()</code> if there is no default value. (<a href="https://android-review.googlesource.com/#/q/I84158320503bc04052de8f80022f83d86e23cc15">I84158</a>, <a href="https://android-review.googlesource.com/#/q/Id630fb148782fbb34d3c236f5d8bb363fba7ef91">Id630f</a>, <a href="https://issuetracker.google.com/issues/342672856">b/342672856</a>)</li> </ul> <h3 id="2.8.0-beta02" data-text="Version 2.8.0-beta02" tabindex="-1">Version 2.8.0-beta02</h3> <p>May 29, 2024</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.8.0-beta02</code> is released. Version 2.8.0-beta02 contains <a href="https://android.googlesource.com/platform/frameworks/support/+log/6a69101fd0edc8d02aa316df1f43e0552fd2d7c4..473554f275109d78164adca6b6cea539aed8b68b/navigation">these commits</a>.</p> <p><strong>Bug Fixes</strong></p> <ul> <li>Fixed <code translate="no" dir="ltr">ClassCastException</code> crash when using <code translate="no" dir="ltr">NavBackStackEntry.toRoute</code> with a nullable custom <code translate="no" dir="ltr">NavType</code>. (<a href="https://android-review.googlesource.com/#/q/I1c29be47a230c2c991aa24924c57b6a3f97ecd5d">I1c29b</a>, <a href="https://issuetracker.google.com/issues/342239473">b/342239473</a>)</li> <li>Fixed Navigation back stack state restoration issues caused when attempting to restore a back stack entry that is not reachable via id from the current destination. Since routes are backed by ids, destinations built with routes were also affected. This also fixes a crash caused by calling <code translate="no" dir="ltr">clearBackStack()</code> that had the same underlying issue. (<a href="https://android-review.googlesource.com/#/q/I423c3f6d8ee27be46450dcb53c28272fe0a1e085">I423c3</a>, <a href="https://issuetracker.google.com/issues/339908057">b/339908057</a>)</li> </ul> <h3 id="2.8.0-beta01" data-text="Version 2.8.0-beta01" tabindex="-1">Version 2.8.0-beta01</h3> <p>May 14, 2024</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.8.0-beta01</code> is released. Version 2.8.0-beta01 contains <a href="https://android.googlesource.com/platform/frameworks/support/+log/fbd1ac175922f44c69a13545d194066ee428b342..6a69101fd0edc8d02aa316df1f43e0552fd2d7c4/navigation">these commits</a>.</p> <p><strong>API Changes</strong></p> <ul> <li><code translate="no" dir="ltr">SavedStateHandle.toRoute()</code> now takes in a <code translate="no" dir="ltr">typeMap</code> parameter for custom argument types. (<a href="https://android-review.googlesource.com/#/q/Ie39fb2afad346928a34bc309513fa17f16cefa8c">Ie39fb</a>, <a href="https://issuetracker.google.com/issues/339026523">b/339026523</a>)</li> <li>Added a test API to <code translate="no" dir="ltr">navigation-testing</code> to to create a <code translate="no" dir="ltr">SavedStateHandle</code> from a Kotlin Serializable object. (<a href="https://android-review.googlesource.com/#/q/Id48671016d00799beb416338e2f0ac1c702f338e">Id4867</a>, <a href="https://issuetracker.google.com/issues/339080702">b/339080702</a>)</li> </ul> <p><strong>Bug Fixes</strong></p> <ul> <li>Missing parameter docs for Navigation Kotlin DSL functions have been added. (<a href="https://android-review.googlesource.com/#/q/I26a36a85ab4b2d2b68c5e2ba58d3aeff6c1d54ca">I26a36</a>)</li> </ul> <h3 id="2.8.0-alpha08" data-text="Version 2.8.0-alpha08" tabindex="-1">Version 2.8.0-alpha08</h3> <p>May 1, 2024</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.8.0-alpha08</code> is released. Version 2.8.0-alpha08 contains <a href="https://android.googlesource.com/platform/frameworks/support/+log/a0c81b50a8c175a7992821bb8eff152cc37e7a3c..fbd1ac175922f44c69a13545d194066ee428b342/navigation">these commits</a>.</p> <p><strong>Safe Args in Navigation Compose</strong></p> <ul> <li>The work to support compile time type safety for <a href="/develop/ui/compose/navigation">Navigation Compose</a> and users of the <a href="/guide/navigation/design/kotlin-dsl">Navigation Kotlin DSL</a> based on Kotlin Serialization has completed and previously experimental APIs are now stable. (<a href="https://android-review.googlesource.com/#/q/Iea94de164795b79e99b8f1c2661e06ca6639b2bc">Iea94d</a>, <a href="https://android-review.googlesource.com/#/q/I0eb0db9fe1dc51c25545d5ef2e915e181d3a9dae">I0eb0d</a>, <a href="https://android-review.googlesource.com/#/q/I873b7d2beee8a589858e84f8e6f95f295c51e6b9">I873b7</a>, <a href="https://android-review.googlesource.com/#/q/I3a64b21c11307c1cb409e2bb47e292021d55c0b7">I3a64b</a>, <a href="https://android-review.googlesource.com/#/q/I6c3a2109d99a3c40102b8a81d7a8bc17746c6a93">I6c3a2</a>, <a href="https://android-review.googlesource.com/#/q/I11f0bb08a3f2f220f3ba8ba2d72890cd16e56ef3">I11f0b</a>, <a href="https://android-review.googlesource.com/#/q/Ic30322fdcc6ab6abd383758d996d4007e1bf6375">Ic3032</a>, <a href="https://android-review.googlesource.com/#/q/I8d3948948e68b65f05c5bb943daba3deda64db2e">I8d394</a>, <a href="https://android-review.googlesource.com/#/q/I95710b70ebbfa839f1809df21049d5c50ab74c4c">I95710</a>, <a href="https://android-review.googlesource.com/#/q/Ice0608f7b128f367760d4617d6b7f770d46618c7">Ice060</a>, <a href="https://android-review.googlesource.com/#/q/Id0e55c3e938d28c034aa2b6f2a23e815b0d8bfb9">Id0e55</a>, <a href="https://android-review.googlesource.com/#/q/I45f8b649fc3f5e9d738c432c4a53f23db7ab931e">I45f8b</a>, <a href="https://android-review.googlesource.com/#/q/Idcdaf353295d64d8162a8e2f792ccd2cdaccee4a">Idcdaf</a>, <a href="https://android-review.googlesource.com/#/q/If5380f1943f2a3dc1ff733ed3cfab5f1328c618a">If5380</a>, <a href="https://android-review.googlesource.com/#/q/I08b231168eaedeabcd4add210daa96a99dc5807e">I08b23</a>, <a href="https://android-review.googlesource.com/#/q/Ia5c59da2d7d4e40db08e4fe29167ecc543df8a95">Ia5c59</a>, <a href="https://issuetracker.google.com/issues/188693139">b/188693139</a>)</li> </ul> <p>This functionality uses <a href="https://kotlinlang.org/docs/serialization.html">Kotlin Serialization</a> to allow you to define destinations in your navigation graph via type safe objects and data classes:</p> <pre class="prettyprint lang-kotlin" translate="no" dir="ltr"><code translate="no" dir="ltr"> // Define a home destination that doesn&#39;t take any arguments @Serializable object Home // Define a profile destination that takes an ID @Serializable data class Profile(val id: String) // Now define your NavHost using type safe objects NavHost(navController, startDestination = Home) { composable&lt;Home&gt; { HomeScreen(onNavigateToProfile = { id -&gt; navController.navigate(Profile(id)) }) } composable&lt;Profile&gt; { backStackEntry -&gt; val profile: Profile = backStackEntry.toRoute() ProfileScreen(profile) } } </code></pre> <p>See the <a href="https://medium.com/androiddevelopers/navigation-compose-meet-type-safety-e081fb3cf2f8">Navigation Compose meet Type Safety blog post</a> for more information.</p> <p><strong>New Features</strong></p> <ul> <li>The <code translate="no" dir="ltr">navigation-fragment-compose</code> artifact now provides a <code translate="no" dir="ltr">LocalFragment</code> composition local to composable methods within a <code translate="no" dir="ltr">ComposableFragment</code>. (<a href="https://android-review.googlesource.com/#/q/If35e5405bbd94fd5f45c1cc0dfe3d74278d64a09">If35e5</a>)</li> <li><code translate="no" dir="ltr">NavType</code> now has built-in support for Lists of Int, String, Boolean, Float, and Long. (<a href="https://android-review.googlesource.com/#/q/I4b6dd5ee05083c9b920eb886354384a9f55dc4aa">I4b6dd</a>, <a href="https://android-review.googlesource.com/#/q/Ia914c3739d9c3659909826b9eeaed7f74da39345">Ia914c</a>, <a href="https://issuetracker.google.com/issues/188693139">b/188693139</a>)</li> </ul> <h3 id="2.8.0-alpha07" data-text="Version 2.8.0-alpha07" tabindex="-1">Version 2.8.0-alpha07</h3> <p>April 17, 2024</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.8.0-alpha07</code> is released. Version 2.8.0-alpha07 contains <a href="https://android.googlesource.com/platform/frameworks/support/+log/02b55f664eba38e42e362e1af3913be1df552d55..a0c81b50a8c175a7992821bb8eff152cc37e7a3c/navigation">these commits</a>.</p> <p><strong>New Features</strong></p> <ul> <li><p>Adds a new <code translate="no" dir="ltr">navigation-fragment-compose</code> artifact that includes a <code translate="no" dir="ltr">ComposableNavHostFragment</code> alternative to <code translate="no" dir="ltr">NavHostFragment</code> that allows you to add <code translate="no" dir="ltr">composable</code> destinations to your Navigation XML files. Each <code translate="no" dir="ltr">composable</code> destination must be expressed as a top-level, no argument <code translate="no" dir="ltr">@Composable</code> method whose fully qualified name is used as the <code translate="no" dir="ltr">android:name</code> attribute on each destination. When navigating to one of these destinations, a containing fragment is created to display the composable content. (<a href="https://android-review.googlesource.com/#/q/I0ef2e5897128d18d1b374f3617c7095022ca7c0e">I0ef2e</a>, <a href="https://issuetracker.google.com/issues/265480755">b/265480755</a>)</p> <pre class="prettyprint lang-kotlin" translate="no" dir="ltr"><code translate="no" dir="ltr">// In HomeScreen.kt @Composable fun HomeScreen() { // Your Composable content here } </code></pre><pre class="prettyprint lang-xml" translate="no" dir="ltr"><code translate="no" dir="ltr">// In your navigation.xml &lt;composable android:id=&#34;@+id/home_screen&#34; android:name=&#34;com.example.HomeScreenKt\$HomeScreen&#34; /&gt; </code></pre></li> </ul> <p><strong>API Changes</strong></p> <ul> <li>Support for Safe Args in Navigation Compose using an approach based on Kotlin Serialization continued. These APIs are <em>not finished</em> and are marked with the <code translate="no" dir="ltr">ExperimentalSafeArgsApi</code> annotation. This annotation will be removed when the entire API surface is complete in a future release. (<a href="https://android-review.googlesource.com/#/q/Iefd951a986bd24057701fa2be24298fe691e0929">Iefd95</a>, <a href="https://android-review.googlesource.com/#/q/I409c87eea0b64195a49980c115a3581a52d3e975">I409c8</a>, <a href="https://android-review.googlesource.com/#/q/I5b5ac494f3d444d6d11f17d7c60168c6c094390e">I5b5ac</a>, <a href="https://android-review.googlesource.com/#/q/I7e753bebb4576fc9ddb2872b8b11cd97e1b4efe3">I7e753</a>, <a href="https://android-review.googlesource.com/#/q/I960f8941527db5a4f6a527b303bbd22f56d368bc">I960f8</a>, <a href="https://android-review.googlesource.com/#/q/I3eabd8a83cb2153c3d3bc03a58cd02d7d8e7293d">I3eabd</a>, <a href="https://android-review.googlesource.com/#/q/I8ed5a1d9e9d7aeac6ea3f3993777425a47f597ef">I8ed5a</a>, <a href="https://android-review.googlesource.com/#/q/Ied2c9c8208cd7adc5c2e848b2e166d857afc8165">Ied2c9</a>, <a href="https://android-review.googlesource.com/#/q/I9b73c5cafcb80ea92d6ecb03677a5128fb7fb944">I9b73c</a>, <a href="https://android-review.googlesource.com/#/q/I554db9e95f298f0c0ca51d4b7dc76087c20f9272">I554db</a>, <a href="https://android-review.googlesource.com/#/q/Ib3aba24336deb730aabd222f37eaefefca8006cf">Ib3aba</a>, <a href="https://android-review.googlesource.com/#/q/Ia668dffcae8b255bf5db75b6c149983d973d2b06">Ia668d</a>, <a href="https://issuetracker.google.com/issues/188693139">b/188693139</a>)</li> </ul> <h3 id="2.8.0-alpha06" data-text="Version 2.8.0-alpha06" tabindex="-1">Version 2.8.0-alpha06</h3> <p>April 3, 2024</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.8.0-alpha06</code> is released. Version 2.8.0-alpha06 contains <a href="https://android.googlesource.com/platform/frameworks/support/+log/a57d7d17753695012b58c9ce7ad55a8d39157e62..02b55f664eba38e42e362e1af3913be1df552d55/navigation">these commits</a>.</p> <p><strong>API Changes</strong></p> <ul> <li>Support for Safe Args in Navigation Compose using an approach based on Kotlin Serialization has begun. These APIs are <strong>not finished</strong> and are marked with the <code translate="no" dir="ltr">ExperimentalSafeArgsApi</code> annotation. This annotation will be removed when the entire API surface is complete in a future release. (<a href="https://android-review.googlesource.com/#/q/I644e72c129b4daca1a46fa428c31ab47c1b85a31">I644e7</a>, <a href="https://android-review.googlesource.com/#/q/I988961680ed82f45623dba5bb162abb4b139b7c3">I98896</a>, <a href="https://android-review.googlesource.com/#/q/I2a1c5774acd0df889dd1962aa04dd3bb3a48404d">I2a1c5</a>, <a href="https://android-review.googlesource.com/#/q/I43a5123b9efd91a36b9fbaf4e27eef874884f9e7">I43a51</a>, <a href="https://android-review.googlesource.com/#/q/I836a1559471fca7594653ea9e4e6a53b0d1b7ff0">I836a1</a>, <a href="https://android-review.googlesource.com/#/q/Ic5eec01d3e3ac195db2b9a717bcc58bdc55af652">Ic5eec</a>, <a href="https://android-review.googlesource.com/#/q/I394079e5daad4d7d2beb427fc42e2a211cb89222">I39407</a>, <a href="https://android-review.googlesource.com/#/q/I24e4116e5accdcb6ef432f6e4bb808b803c48b01">I24e41</a>, <a href="https://android-review.googlesource.com/#/q/If9e14e8c4d04bbb57f873a305a7314d235ab8af9">If9e14</a>, <a href="https://android-review.googlesource.com/#/q/Ibb13e8d564e505bb082a173d1d2a2525193968a6">Ibb13e</a>, <a href="https://android-review.googlesource.com/#/q/If44d34757c454d628e2e73794047a5a23c37308a">If44d3</a>, <a href="https://android-review.googlesource.com/#/q/Icb70f85a4fdfd7b8c472bd4a282e446e86ae8dde">Icb70f</a>, <a href="https://android-review.googlesource.com/#/q/I8972f003efa07fd275d397bf31237d6b3f3e38d1">I8972f</a>, <a href="https://android-review.googlesource.com/#/q/I1d4328c2ff048d4e1d889f973e2ec0dc3979cadb">I1d432</a>, <a href="https://android-review.googlesource.com/#/q/Icf32b1b03afd4c11031cc3ca8316c7a9c10c131a">Icf32b</a>, <a href="https://android-review.googlesource.com/#/q/I20a147e037ff80f0cab34276275890e683fa8367">I20a14</a>, <a href="https://android-review.googlesource.com/#/q/I262aa2eeccc792ae6c1c5b70e6b3d82eed3a3049">I262aa</a>, <a href="https://android-review.googlesource.com/#/q/I7de995f0621e397de971a943fcf97b6f3fe9f566">I7de99</a>, <a href="https://android-review.googlesource.com/#/q/I35990712aac099ab47f86ca10af8d8886aca5327">I35990</a>, <a href="https://android-review.googlesource.com/#/q/I1033daaefa341eb1054a9b00b0fce0b5317adca8">I1033d</a>, <a href="https://issuetracker.google.com/issues/188693139">b/188693139</a>)</li> </ul> <p><strong>Bug Fixes</strong></p> <ul> <li><code translate="no" dir="ltr">NavHost</code> now used <code translate="no" dir="ltr">Alignment.TopStart</code> as the default contentAlignment argument. This puts it in line with the default for <code translate="no" dir="ltr">AnimatedContent</code> and fixes some instances of an unexpected scale from center transition. (<a href="https://android-review.googlesource.com/#/q/I09e7260d31cb571039629acd83b58eaf000a2493">I09e72</a>, <a href="https://issuetracker.google.com/issues/330111602">b/330111602</a>)</li> <li>When flicking the predictive back gesture while using Navigation Compose, the <code translate="no" dir="ltr">NavHost</code> will now correctly complete the custom transition instead of immediately finishing. (<a href="https://android-review.googlesource.com/#/q/I990176d94411c24e5ce6f59b1aeb9b6be39cca6f">I99017</a>, <a href="https://issuetracker.google.com/issues/327292110">b/327292110</a>)</li> </ul> <h3 id="2.8.0-alpha05" data-text="Version 2.8.0-alpha05" tabindex="-1">Version 2.8.0-alpha05</h3> <p>March 20, 2024</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.8.0-alpha05</code> is released. Version 2.8.0-alpha05 contains <a href="https://android.googlesource.com/platform/frameworks/support/+log/638a8d3a474af45f6ad5fdc3d6d1836ea42d1778..a57d7d17753695012b58c9ce7ad55a8d39157e62/navigation">these commits</a>.</p> <p><strong>New Features</strong></p> <ul> <li>You can now pass arguments to <code translate="no" dir="ltr">NavGraph</code>&#39;s <code translate="no" dir="ltr">startDestination</code> directly in the <code translate="no" dir="ltr">startDestination</code> route without relying on <code translate="no" dir="ltr">defaultValue</code>. This applies to nested <code translate="no" dir="ltr">NavGraph</code> <code translate="no" dir="ltr">startDestinations</code> as well. (<a href="https://android-review.googlesource.com/#/q/I0e0b5a7c2bf2e77a8d7a46c91974509104e742a9">I0e0b5</a>, <a href="https://issuetracker.google.com/issues/109505019">b/109505019</a>, <a href="https://issuetracker.google.com/issues/188693139">b/188693139</a>)</li> </ul> <p><strong>API Changes</strong></p> <ul> <li>Added new abstract <code translate="no" dir="ltr">CollectionNavType&lt;T&gt;</code> class, a subclass of <code translate="no" dir="ltr">NavType&lt;T&gt;</code> for collection-based arguments such as list, arrays, maps. (<a href="https://android-review.googlesource.com/#/q/Ic6d63bfaf44a35708e63a091265a84f339579e78">Ic6d63</a>, <a href="https://issuetracker.google.com/issues/188693139">b/188693139</a>)</li> <li>All of the default <code translate="no" dir="ltr">NavType</code> arrays (<code translate="no" dir="ltr">IntArrayType</code>, <code translate="no" dir="ltr">LongArrayType</code>, <code translate="no" dir="ltr">FloatArrayType</code>, <code translate="no" dir="ltr">BoolArrayType</code>, and <code translate="no" dir="ltr">StringArrayType</code>) are now of type <code translate="no" dir="ltr">CollectionNavType</code> (<a href="https://android-review.googlesource.com/#/q/Idcf796fd63e0ef2fc17cf40ccee98ac64c3b6641">Idcf79</a>, <a href="https://issuetracker.google.com/issues/188693139">b/188693139</a>)</li> <li><code translate="no" dir="ltr">NavType</code> now provides a new open <code translate="no" dir="ltr">valueEquals</code> API that determines if two values of the same type are equal to one another. (<a href="https://android-review.googlesource.com/#/q/I6cb97c9b4a9992c5358f76c6940c2d9b78149f26">I6cb97</a>, <a href="https://issuetracker.google.com/issues/327229511">b/327229511</a>)</li> </ul> <p><strong>Bug Fixes</strong></p> <ul> <li>Query parameters in deep links now allows values in the form of curly braces around argument name (i.e. <code translate="no" dir="ltr">{argName}</code>) as valid values for string-based <code translate="no" dir="ltr">NavTypes</code>. This fixes an issue where such a value would be considered invalid (or absence of value) for all types. (<a href="https://android-review.googlesource.com/#/q/I183028e2f77d63158a9a567c43da016722397cb8">I18302</a>, <a href="https://issuetracker.google.com/issues/327274038">b/327274038</a>)</li> <li><code translate="no" dir="ltr">NavController</code> functions that support routes such as <code translate="no" dir="ltr">navigate</code> or <code translate="no" dir="ltr">popBackStack</code> can now properly match routes filled with arguments of Array <code translate="no" dir="ltr">NavTypes</code>. (<a href="https://android-review.googlesource.com/#/q/Iea8056fe8293e65a80ed53d0e0522967fdb12af1">Iea805</a>, <a href="https://issuetracker.google.com/issues/327229511">b/327229511</a>)</li> </ul> <h3 id="2.8.0-alpha04" data-text="Version 2.8.0-alpha04" tabindex="-1">Version 2.8.0-alpha04</h3> <p>March 6, 2024</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.8.0-alpha04</code> is released. Version 2.8.0-alpha04 contains <a href="https://android.googlesource.com/platform/frameworks/support/+log/e1b82c49c59d8e976ce558aba5586f6c61bc9054..638a8d3a474af45f6ad5fdc3d6d1836ea42d1778/navigation">these commits</a>.</p> <p><strong>New Features</strong></p> <ul> <li>You can now specify the <code translate="no" dir="ltr">SizeTranform</code> for your transitions in Navigation Compose by defining them as part of the initialization for the <code translate="no" dir="ltr">composable</code> and/or <code translate="no" dir="ltr">navigation</code> functions. (<a href="https://android-review.googlesource.com/#/q/I91062221a47601b40ced80dc1a31f170351e9f5a">I91062</a>, <a href="https://issuetracker.google.com/issues/296912651">b/296912651</a>)</li> </ul> <p><strong>Bug Fixes</strong></p> <ul> <li>Fixed an issue where <code translate="no" dir="ltr">NavHost</code> in Compose Navigation failed to properly show the transition when using System Back without a gesture. (<a href="https://android-review.googlesource.com/#/q/Iceeae260189dd12af8cb3fe690523646a90f57de">Iceeae</a>, <a href="https://issuetracker.google.com/issues/325998468">b/325998468</a>)</li> </ul> <h3 id="2.8.0-alpha03" data-text="Version 2.8.0-alpha03" tabindex="-1">Version 2.8.0-alpha03</h3> <p>February 21, 2024</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.8.0-alpha03</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/ca2a8cf8da3a3502fccc593974f8085653e38261..e1b82c49c59d8e976ce558aba5586f6c61bc9054/navigation">Version 2.8.0-alpha03 contains these commits.</a></p> <p><strong>API Changes</strong></p> <ul> <li><code translate="no" dir="ltr">NavBackStackEntry.savedStateHandle</code> is now marked as <code translate="no" dir="ltr">@MainThread</code> as it uses code that is required to be on the main thread anyway. (<a href="https://android-review.googlesource.com/#/q/Ibb98890fa424cb8193f7be2e98e74fbd124eef88">Ibb988</a>, <a href="https://issuetracker.google.com/issues/299523245">b/299523245</a>)</li> </ul> <p><strong>Bug Fixes</strong></p> <ul> <li>Fixed an issue in Navigation that caused <code translate="no" dir="ltr">NavGraph</code> ViewModels to be <code translate="no" dir="ltr">DESTROYED</code> too soon because the associated entry’s <code translate="no" dir="ltr">ViewModel</code> was not part of the saved state. (<a href="https://android-review.googlesource.com/#/q/Ib6bb7d1d2f1af928a23a2647b1800eb4bb37d39d">Ib6bb7</a>, <a href="https://issuetracker.google.com/317581849">b/317581849</a>)</li> </ul> <p><strong>Dependency Update</strong></p> <ul> <li>Navigation Compose now depends on <a href="/releases/compose-animation#1.7.0-alpha03">Compose 1.7.0-alpha03</a>.</li> </ul> <h3 id="2.8.0-alpha02" data-text="Version 2.8.0-alpha02" tabindex="-1">Version 2.8.0-alpha02</h3> <p>February 7, 2024</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.8.0-alpha02</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/51191bc12f96f233fc08995e1b4e8ff8b88bc7ce..ca2a8cf8da3a3502fccc593974f8085653e38261/navigation">Version 2.8.0-alpha02 contains these commits.</a></p> <p><strong>New Features</strong></p> <ul> <li>Navigation Compose now provides support for Predictive in-app back via the new <code translate="no" dir="ltr">SeekableTransitionState</code> APIs from compose-animation. This allows you to use the back gesture to see the previous destination with your custom Transition before deciding to either commit the transaction via the completed gesture or cancel. (<a href="https://android-review.googlesource.com/#/q/I8b8e96ed158952c8d8b52a3bc90f495c4254552b">I8b8e9</a>)</li> </ul> <h3 id="2.8.0-alpha01" data-text="Version 2.8.0-alpha01" tabindex="-1">Version 2.8.0-alpha01</h3> <p>January 24, 2024</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.8.0-alpha01</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/0d7cf764d03cdb757f2b9eba55d0871a61833fbb..51191bc12f96f233fc08995e1b4e8ff8b88bc7ce/navigation">Version 2.8.0-alpha01 contains these commits.</a></p> <p><strong>Bug Fixes</strong></p> <ul> <li>Fixed <code translate="no" dir="ltr">BackStackState</code> leak where multiple <code translate="no" dir="ltr">saveState</code> calls on a destination would result in multiple states to be saved, but only the first one could be restored. (<a href="https://android-review.googlesource.com/#/q/I598b01c379f61818e96126fb8e3d3ef1f9d084cd">I598b0</a>, <a href="https://issuetracker.google.com/issues/309559751">b/309559751</a>)</li> <li>Fixed an issue where non-String arguments would not be properly displayed when using the <code translate="no" dir="ltr">NavigationUI</code> helpers to populate the title of app bars. (<a href="https://github.com/androidx/androidx/pull/636">#636</a>, <a href="https://issuetracker.google.com/316676794">b/316676794</a>)</li> </ul> <p><strong>Dependency Update</strong></p> <ul> <li>Navigation Compose now depends on <a href="/jetpack/androidx/releases/compose-animation#1.7.0-alpha01">Compose <code translate="no" dir="ltr">1.7.0-alpha01</code></a> fixing an issue that could cause an unexpected scale animation. (<a href="https://issuetracker.google.com/issues/297258205">b/297258205</a>)</li> </ul> <p><strong>External Contribution</strong></p> <ul> <li>Thanks <a href="https://github.com/SimonMarquis">SimonMarquis</a> for fixing the display issue for non-String arguments when using the <code translate="no" dir="ltr">NavigationUI</code> helpers to populate the title of app bars.</li> </ul> <h2 id="version_277_3" data-text="Version 2.7.7" tabindex="-1">Version 2.7.7</h2> <h3 id="2.7.7" data-text="Version 2.7.7" tabindex="-1">Version 2.7.7</h3> <p>February 7, 2024</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.7.7</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/0d7cf764d03cdb757f2b9eba55d0871a61833fbb..ac8c84b6a2138a6755bafc2b2e56dbddbaf45542/navigation">Version 2.7.7 contains these commits.</a></p> <p><strong>Bug Fixes</strong></p> <ul> <li>Backported from <a href="#2.8.0-alpha01">Navigation <code translate="no" dir="ltr">2.8.0-alpha01</code></a>: Fixed <code translate="no" dir="ltr">BackStackState</code> leak where multiple <code translate="no" dir="ltr">saveState()</code> calls on a single <code translate="no" dir="ltr">NavBackStackEntry</code> would result in multiple states being saved, but only the first saved state could be restored. (<a href="https://android-review.googlesource.com/#/q/I598b01c379f61818e96126fb8e3d3ef1f9d084cd">I598b0</a>, <a href="https://issuetracker.google.com/issues/309559751">b/309559751</a>)</li> <li>Backported from <a href="#2.8.0-alpha01">Navigation <code translate="no" dir="ltr">2.8.0-alpha01</code></a>: Fixed an issue where non-String arguments would not be properly displayed when using the <code translate="no" dir="ltr">NavigationUI</code> helpers to populate the title of app bars. (<a href="https://github.com/androidx/androidx/pull/636">#636</a>, <a href="https://issuetracker.google.com/316676794">b/316676794</a>)</li> </ul> <p><strong>External Contribution</strong></p> <ul> <li>Thanks <a href="https://github.com/SimonMarquis">SimonMarquis</a> for fixing the display issue for non-String arguments when using the <code translate="no" dir="ltr">NavigationUI</code> helpers to populate the title of app bars.</li> </ul> <h2 id="version_276_3" data-text="Version 2.7.6" tabindex="-1">Version 2.7.6</h2> <h3 id="2.7.6" data-text="Version 2.7.6" tabindex="-1">Version 2.7.6</h3> <p>December 13, 2023</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.7.6</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/93793630001ce27b6709c8bb6b73711313cc9d5d..0d7cf764d03cdb757f2b9eba55d0871a61833fbb/navigation">Version 2.7.6 contains these commits.</a></p> <p><strong>Bug Fixes</strong></p> <ul> <li>The <code translate="no" dir="ltr">NavGraph</code> <code translate="no" dir="ltr">equals()</code> function now correctly considers the nodes of the other graph instead of just the calling one. This will ensure that graphs that have nodes with different ids will no longer be considered equal (<a href="https://android-review.googlesource.com/#/q/I401cb2f6f71d0bc914afeea6057e0d8c34dfc840">I401cb</a>, <a href="https://issuetracker.google.com/issues/311414915">b/311414915</a>)</li> </ul> <h2 id="version_275_3" data-text="Version 2.7.5" tabindex="-1">Version 2.7.5</h2> <h3 id="2.7.5" data-text="Version 2.7.5" tabindex="-1">Version 2.7.5</h3> <p>November 1, 2023</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.7.5</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/ace3a9ea98b0b126ae715bacad4d4e65853b3a83..93793630001ce27b6709c8bb6b73711313cc9d5d/navigation">Version 2.7.5 contains these commits.</a></p> <p><strong>Performance Improvements</strong></p> <ul> <li>Greatly improved the performance (both in terms of time and number of allocations) of comparing two graphs. This means that calls such as <code translate="no" dir="ltr">setGraph</code> which internally compare the new graph to the existing one are much faster and result in fewer skipped frames. Thank you <a href="https://github.com/mzgreen">Michał Z</a> for the thorough analysis that led to this improvement. (<a href="https://android-review.googlesource.com/#/q/I6ad62bef1fb9bbbe8a91839a6e24e1f85a8982e2">I6ad62</a>)</li> <li><code translate="no" dir="ltr">NavHost</code> will now render the start destination on the first composition pass instead of needing to wait for the second pass to read updated state. (<a href="https://android-review.googlesource.com/#/q/I439a7fe894907b1ebee251134113acb08973083c">I439a7</a>, <a href="https://issuetracker.google.com/issues/304852206">b/304852206</a>)</li> </ul> <p><strong>Bug Fixes</strong></p> <ul> <li>Fixed an issue where your back stack would be popped if you called <code translate="no" dir="ltr">setGraph</code> more than once with the exact same graph only if there was a destination in your graph that contained an action linking two destinations. (<a href="https://android-review.googlesource.com/#/q/Ieaed7edf02f70696cd0a3558cfe8d7960d1cddd4">Ieaed7</a>)</li> <li>Dialogs that were navigated to and dismissed in quick succession will no longer leak into the list of <code translate="no" dir="ltr">NavController.visibleEntries</code>. (<a href="https://android-review.googlesource.com/#/q/I67586735d33659e524ca7b2e4ae44b2df3494f3e">I67586</a>, <a href="https://issuetracker.google.com/issues/287969970">b/287969970</a>)</li> <li>When an entry is popped followed by a configuration change, the entry&#39;s <code translate="no" dir="ltr">ViewModel</code> will now be cleared properly if <code translate="no" dir="ltr">saveState</code> is false. (<a href="https://android-review.googlesource.com/#/q/Idf242239ceeb731c3375ef507a2cc854d85743c7">Idf242</a>, <a href="https://issuetracker.google.com/issues/298164648">b/298164648</a>)</li> <li>Fixed an issue where <code translate="no" dir="ltr">NavController</code> could handle the same deep link more than once if the back stack was entirely empty before a configuration change or call to <code translate="no" dir="ltr">setGraph</code> only when the incoming Intent had the <code translate="no" dir="ltr">FLAG_ACTIVITY_NEW_TASK</code> flag set. (<a href="https://android-review.googlesource.com/#/q/I73c7f78a55eb283ac4b2fa7b10f6ea05a8fd8db7">I73c7f</a>)</li> </ul> <p><strong>Dependency Updates</strong></p> <ul> <li>Navigation with Fragments now depends on <a href="/jetpack/androidx/releases/fragment#1.6.2">Fragment 1.6.2</a>, fixing an issue where the <code translate="no" dir="ltr">ViewModel</code> instances of nested fragments would not be cleared when calling <code translate="no" dir="ltr">clearBackStack</code>.</li> </ul> <h2 id="version_274_3" data-text="Version 2.7.4" tabindex="-1">Version 2.7.4</h2> <h3 id="2.7.4" data-text="Version 2.7.4" tabindex="-1">Version 2.7.4</h3> <p>October 4, 2023</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.7.4</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/9b231e7159d02a45b1489dc2bbe3957077565c18..ace3a9ea98b0b126ae715bacad4d4e65853b3a83/navigation">Version 2.7.4 contains these commits.</a></p> <p><strong>New Features</strong></p> <ul> <li>Added support for <code translate="no" dir="ltr">popUpTo</code> to use routes with arguments to allow popping back to a specific entry that uses those exact arguments, matching the support found in <code translate="no" dir="ltr">popBackStack</code>. (<a href="https://android-review.googlesource.com/#/q/I731f4cf31dff5832e1203265c0420ac7baa10d49">I731f4</a>, <a href="https://issuetracker.google.com/issues/299255572">b/299255572</a>)</li> </ul> <p><strong>Bug Fixes</strong></p> <ul> <li>Fix issue where interrupting a navigate with another navigate with <code translate="no" dir="ltr">popUpTo</code> will cause <code translate="no" dir="ltr">FragmentNavigator</code> to crash. (<a href="https://android-review.googlesource.com/#/q/I3c8483110b22e6e7d4b31cde88f2391784d9007d">I3c848</a>, <a href="https://issuetracker.google.com/issues/301887045">b/301887045</a>)</li> <li>Fixed issue where system back press caused the <code translate="no" dir="ltr">currentDestination</code> to not be updated correctly to match the displayed Fragment. (<a href="https://android-review.googlesource.com/#/q/Id0d6ca28ac2e6c8521784bf0bf569efee7a862dc">Id0d6c</a>, <a href="https://issuetracker.google.com/issues/289877514">b/289877514</a>)</li> <li><code translate="no" dir="ltr">DialogFragment</code> lifecycle will now properly move to <code translate="no" dir="ltr">RESUMED</code> state when the dialog above it is dismissed. (<a href="https://android-review.googlesource.com/#/q/I88f0d4833a14e21a0f3855c7f0346864a1b3fba7">I88f0d</a>, <a href="https://issuetracker.google.com/issues/301811387">b/301811387</a>)</li> </ul> <h2 id="version_273_3" data-text="Version 2.7.3" tabindex="-1">Version 2.7.3</h2> <h3 id="2.7.3" data-text="Version 2.7.3" tabindex="-1">Version 2.7.3</h3> <p>September 20, 2023</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.7.3</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/33b98d60f650a2e97f01fff71ce0eef1c8a3b2d7..9b231e7159d02a45b1489dc2bbe3957077565c18/navigation">Version 2.7.3 contains these commits.</a></p> <p><strong>Bug Fixes</strong></p> <ul> <li>Fixed an issue in Navigation with Fragments that caused the <code translate="no" dir="ltr">visibleEntries</code> list to contain incorrect entries. (<a href="https://android-review.googlesource.com/#/q/I5caa9af1b5bd7084e76d7daf9515f7430bf2489d">I5caa9</a>, <a href="https://issuetracker.google.com/288520638">b/288520638</a>)</li> <li>Fixed an issue that caused Floating Window destination (i.e. <code translate="no" dir="ltr">Dialogs</code>, <code translate="no" dir="ltr">Bottomsheets</code>, etc) to never get a <code translate="no" dir="ltr">RESUMED</code> Lifecycle callback. (<a href="https://android-review.googlesource.com/#/q/I3b866a44291e7bd7af742562ae0619cd83929a1a">I3b866</a>, <a href="https://issuetracker.google.com/287505132">b/287505132</a>)</li> </ul> <h2 id="version_272_3" data-text="Version 2.7.2" tabindex="-1">Version 2.7.2</h2> <h3 id="2.7.2" data-text="Version 2.7.2" tabindex="-1">Version 2.7.2</h3> <p>September 6, 2023</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.7.2</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/fd8660753c8ba907ddedda62ae5a37ba7bceffc0..33b98d60f650a2e97f01fff71ce0eef1c8a3b2d7/navigation">Version 2.7.2 contains these commits.</a></p> <p><strong>Bug Fixes</strong></p> <ul> <li>Navigation now depends on <a href="/jetpack/androidx/releases/lifecycle#2.6.2">Lifecycle <code translate="no" dir="ltr">2.6.2</code></a>, fixing an interaction between <code translate="no" dir="ltr">rememberSaveable</code> and Navigation Compose’s <code translate="no" dir="ltr">NavHost</code> that would cause the <code translate="no" dir="ltr">rememberSaveable</code> state of destinations and any <code translate="no" dir="ltr">ViewModel</code> owned <code translate="no" dir="ltr">SavedStateHandle</code> instances from being properly restored after process death and recreation. (<a href="https://issuetracker.google.com/issues/298059596">b/298059596</a>, <a href="https://issuetracker.google.com/issues/289436035">b/289436035</a>)</li> <li>Fixed an issue when showing multiple dialogs in Navigation Compose simultaneously where the partially obscured dialogs (e.g., not the topmost dialog) would be in the <code translate="no" dir="ltr">CREATED</code> Lifecycle state rather than the <code translate="no" dir="ltr">STARTED</code> state. (<a href="https://android-review.googlesource.com/c/platform/frameworks/support/+/2728520">aosp/2728520</a>, <a href="https://issuetracker.google.com/issues/289257213">b/289257213</a>)</li> <li>Fixed an issue when showing multiple dialogs in Navigation Compose simultaneously where dismissing the topmost dialog would cause the new topmost dialog to be stuck in the <code translate="no" dir="ltr">STARTED</code> Lifecycle state rather than correctly moving to <code translate="no" dir="ltr">RESUMED</code>. (<a href="https://android-review.googlesource.com/c/platform/frameworks/support/+/2629401">aosp/2629401</a>, <a href="https://issuetracker.google.com/issues/286371387">b/286371387</a>)</li> <li>Navigation Safe Args no longer instantiates its task eagerly if it is not actually being executed. (<a href="https://android-review.googlesource.com/#/q/I0e385ae46f667c2b72cad31ca8c8c84aa8965605">I0e385</a>, <a href="https://issuetracker.google.com/issues/260322841">b/260322841</a>)</li> </ul> <p><strong>Dependency Update</strong></p> <ul> <li>Navigation Compose now depends on Compose 1.5.1.</li> </ul> <h2 id="version_271_3" data-text="Version 2.7.1" tabindex="-1">Version 2.7.1</h2> <h3 id="2.7.1" data-text="Version 2.7.1" tabindex="-1">Version 2.7.1</h3> <p>August 23, 2023</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.7.1</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/ac88ab16827b2945b6f026fe517f8e300cfbd0b2..fd8660753c8ba907ddedda62ae5a37ba7bceffc0/navigation">Version 2.7.1 contains these commits.</a></p> <p><strong>Bug Fixes</strong></p> <ul> <li>Fixed an issues in Navigation with Compose where when using a <code translate="no" dir="ltr">Scaffold</code> it was possible to get an error for trying to access a <code translate="no" dir="ltr">Lifecycle.State.DESTROYED</code> <code translate="no" dir="ltr">ViewModel</code>. (<a href="https://android-review.googlesource.com/#/q/I1dc115fc2b454d68c1a23c78e72707d6d4c739a5">I1dc11</a>, <a href="https://issuetracker.google.com/issues/268422136">b/268422136</a>)</li> </ul> <h2 id="version_270_3" data-text="Version 2.7.0" tabindex="-1">Version 2.7.0</h2> <h3 id="2.7.0" data-text="Version 2.7.0" tabindex="-1">Version 2.7.0</h3> <p>August 9, 2023</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.7.0</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/a554ff273c1449c2dc482c764272981cef7496f1..ac88ab16827b2945b6f026fe517f8e300cfbd0b2/navigation">Version 2.7.0 contains these commits.</a></p> <p><strong>Important changes since 2.6.0</strong></p> <p><strong>Animations from Accompanist</strong></p> <p>Now that <code translate="no" dir="ltr">AnimatedContent</code> is stable, we were able to move the code from <a href="https://google.github.io/accompanist/navigation-animation/">Accompanist Navigation Animation</a> back into Navigation Compose itself.</p> <p>This means all of the support for setting custom transitions that existed in <code translate="no" dir="ltr">AnimatedNavHost</code> is directly supported in <code translate="no" dir="ltr">NavHost</code>.</p> <p>No additional changes will be made to Accompanist Navigation Animation and we’ll be formally deprecating it soon, along with guidance on how to migrate back to Navigation Compose itself, but it&#39;ll be the inverse of the <a href="https://google.github.io/accompanist/navigation-animation/#migration">migration guide</a> with no other API changes required if you&#39;re already using the latest Accompanist alpha (<code translate="no" dir="ltr">0.31.2-alpha</code>). (<a href="https://issuetracker.google.com/197140101">b/197140101</a>)</p> <p><strong>Bug Fixes</strong></p> <ul> <li>NavHost in Navigation Compose now correctly intercepts system back calls even after the Activity has been STOPPED and RESUMED. (<a href="https://android-review.googlesource.com/#/q/Icb6deab996d122487243f0d3d775af8c15fc7c25">Icb6de</a>, <a href="https://issuetracker.google.com/279118447">b/279118447</a>)</li> </ul> <p><strong>Dependency Updates</strong></p> <ul> <li>Navigation now depends on Compose <code translate="no" dir="ltr">1.5.0</code> up from <code translate="no" dir="ltr">1.1.0</code>.</li> </ul> <h3 id="2.7.0-rc01" data-text="Version 2.7.0-rc01" tabindex="-1">Version 2.7.0-rc01</h3> <p>July 26, 2023</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.7.0-rc01</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/5ec99c7e5f3bc9f81382e788f9ff4151dcb73bc1..a554ff273c1449c2dc482c764272981cef7496f1/navigation">Version 2.7.0-rc01 contains these commits.</a></p> <p><strong>Bug Fixes</strong></p> <ul> <li>Fixed an issue where the <code translate="no" dir="ltr">EnterTransition</code> and <code translate="no" dir="ltr">ExitTransition</code> lambdas created as part of the <code translate="no" dir="ltr">NavHost</code> could potentially remain in memory even after the <code translate="no" dir="ltr">NavHost</code> is removed from composition. (<a href="https://android-review.googlesource.com/#/q/I893d0a0e36b512afe60a5af892cd84995af02015">I893d0</a>)</li> </ul> <p><strong>Known Issues</strong></p> <ul> <li>There is an issue from Navigation 2.6.x that when navigating with popUpTo it is possible to cause an <code translate="no" dir="ltr">IllegalArgumentException</code>. It is possible that this exception can be avoided by restructuring your graph, similar to the advice suggested <a href="https://issuetracker.google.com/287133013#comment4">here</a>. (<a href="https://issuetracker.google.com/287133013">b/287133013</a>)</li> </ul> <h3 id="2.7.0-beta02" data-text="Version 2.7.0-beta02" tabindex="-1">Version 2.7.0-beta02</h3> <p>June 28, 2023</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.7.0-beta02</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/6e6b38595c10b8edd5d40a9bc9d4e294fc4f8160/navigation">Version 2.7.0-beta02 contains these commits.</a></p> <p><strong>Bug Fixes</strong></p> <ul> <li>Navigation Compose now has the right z-order for custom transitions that use navigate with the <code translate="no" dir="ltr">popUpTo</code> option.(<a href="https://android-review.googlesource.com/#/q/Ib1c3a329755b2cbec3d28568d03d73e5aa9b9128">/Ib1c3a</a>, <a href="https://issuetracker.google.com/285153947">b/285153947</a>)</li> </ul> <h3 id="2.7.0-beta01" data-text="Version 2.7.0-beta01" tabindex="-1">Version 2.7.0-beta01</h3> <p>June 7, 2023</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.7.0-beta01</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/8414543ac278cf2f64d4c73dc7d336cb0af05fb8..73f902dee011bfe400d8a0330bfd8d4bb632065f/navigation">Version 2.7.0-beta01 contains these commits.</a></p> <p><strong>Bug Fixes</strong></p> <ul> <li><code translate="no" dir="ltr">NavHost</code> in Navigation Compose now correctly intercepts system back calls even after the <code translate="no" dir="ltr">Activity</code> has been <code translate="no" dir="ltr">STOPPED</code> and <code translate="no" dir="ltr">RESUMED</code>. (<a href="https://android-review.googlesource.com/#/q/Icb6deab996d122487243f0d3d775af8c15fc7c25">Icb6de</a>, <a href="https://issuetracker.google.com/issues/279118447">b/279118447</a>)</li> </ul> <h3 id="2.7.0-alpha01" data-text="Version 2.7.0-alpha01" tabindex="-1">Version 2.7.0-alpha01</h3> <p>May 24, 2023</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.7.0-alpha01</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/9b9f336027bb825e6916e31ac2d761c53751420d..8414543ac278cf2f64d4c73dc7d336cb0af05fb8/navigation">Version 2.7.0-alpha01 contains these commits.</a></p> <p><strong>Animations from Accompanist</strong></p> <p>Now that <code translate="no" dir="ltr">AnimatedContent</code> is stable, we were able to move the code from <a href="https://google.github.io/accompanist/navigation-animation/">Accompanist Navigation Animation</a> back into Navigation Compose itself.</p> <p>This means all of the support for setting custom transitions that existed in <code translate="no" dir="ltr">AnimatedNavHost</code> is directly supported in <code translate="no" dir="ltr">NavHost</code>.</p> <p>No additional changes will be made to Accompanist Navigation Animation and we’ll be formally deprecating it soon, along with guidance on how to migrate back to Navigation Compose itself, but it&#39;ll be the inverse of the <a href="https://google.github.io/accompanist/navigation-animation/#migration">migration guide</a> with no other API changes required if you&#39;re already using the latest Accompanist alpha (<code translate="no" dir="ltr">0.31.2-alpha</code>). (<a href="https://issuetracker.google.com/issues/197140101">b/197140101</a>)</p> <p><strong>Bug Fixes</strong></p> <ul> <li>From <a href="#2.6.0-rc02">Navigation <code translate="no" dir="ltr">2.6.0-rc02</code></a>: Fixed an issue with Navigation in Fragments where navigating with <code translate="no" dir="ltr">popUpTo</code> and popping a fragment off the back stack without recreating its view would cause system back to stop working. (<a href="https://android-review.googlesource.com/#/q/Ieb8d4e6a18f8c223ff3193ea4348fb6065e9de94">Ieb8d4</a>, <a href="https://issuetracker.google.com/issues/281726455">b/281726455</a>)</li> </ul> <p><strong>Dependency Updates</strong></p> <ul> <li>Navigation now depends on Compose <code translate="no" dir="ltr">1.5.0-beta01</code>.</li> </ul> <h2 id="version_260_3" data-text="Version 2.6.0" tabindex="-1">Version 2.6.0</h2> <h3 id="2.6.0" data-text="Version 2.6.0" tabindex="-1">Version 2.6.0</h3> <p>June 7, 2023</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.6.0</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/40ef6498a60cb43bab0aaed607cbff5d4d6156cb..e6702c06ff2c1c7fa8c3aee245f93921d2b50af7/navigation">Version 2.6.0 contains these commits.</a></p> <p><strong>Important changes to Navigation since 2.5.0</strong></p> <ul> <li><code translate="no" dir="ltr">NavBackStackEntry</code>&#39;s <code translate="no" dir="ltr">arguments</code> and the <code translate="no" dir="ltr">arguments</code> passed to an <code translate="no" dir="ltr">OnDestinationChangedListener</code> are now only a copy of the immutable arguments that were created when you navigated to the destination. This means any changes made to those Bundles will not be reflected in subsequent accesses to the <code translate="no" dir="ltr">arguments</code> or other <code translate="no" dir="ltr">OnDestinationChangedListener</code> instances.</li> <li><code translate="no" dir="ltr">NavDeepLink</code> now supports default values for arrays, which allows support for repeated query params that will map to the argument&#39;s array type. <code translate="no" dir="ltr">NavType</code> also now includes a default method which can be overridden to combine two parsed values.</li> <li>Custom subclasses of <code translate="no" dir="ltr">NavType</code> can now override <code translate="no" dir="ltr">serializeAsValue</code> to serialize a value into a String, allowing both serialization and deserialization (via <code translate="no" dir="ltr">parseValue</code>) to be entirely encapsulated in the <code translate="no" dir="ltr">NavType</code> class. <code translate="no" dir="ltr">StringType</code> now overrides this method to call <code translate="no" dir="ltr">Uri.encode</code> on the given <code translate="no" dir="ltr">String</code>.</li> </ul> <p><strong>Important changes to Navigation Compose since 2.5.0</strong></p> <ul> <li>When previewing a composable with <code translate="no" dir="ltr">NavHost</code>, it will now show the NavGraph&#39;s <code translate="no" dir="ltr">startDestination</code> by default.</li> <li><code translate="no" dir="ltr">NavController.popBackStack(route)</code>, <code translate="no" dir="ltr">NavController.getBackStackEntry(route)</code>, <code translate="no" dir="ltr">NavController.clearBackStack(route)</code> now all support routes with arguments partially or fully filled in. Note that the arguments have to be an exact match with the entry&#39;s arguments.</li> <li>Attempting to create an empty <code translate="no" dir="ltr">NavDeepLink</code> using the <code translate="no" dir="ltr">navDeepLink</code> Kotlin DSL will now result in a lint warning indicating that a deep link needs an uri, action, and/or mimetype to be valid.</li> </ul> <p><strong>Important changes to Navigation with Fragments since 2.5.0</strong></p> <ul> <li><code translate="no" dir="ltr">NavHostFragment</code> no longer intercepts the system back button itself. This allows the underlying <code translate="no" dir="ltr">FragmentManager</code> to handle system back. This allows <a href="/jetpack/androidx/releases/fragment#1.7.0-alpha01">Fragment <code translate="no" dir="ltr">1.7.0-alpha01</code></a> and higher to provide an In-App Predictive Back animation on Android U devices.</li> <li>When using Navigation with Fragments, attempting to manually do a <code translate="no" dir="ltr">FragmentTransaction</code> that adds a fragment to the <code translate="no" dir="ltr">FragmentManager</code>&#39;s back stack will now throw an <code translate="no" dir="ltr">IllegalArgumentException</code>. You should always add fragments via the <code translate="no" dir="ltr">navigate()</code> API.</li> <li>When using the exact string <code translate="no" dir="ltr">${applicationId}</code> as the placeholder in the <code translate="no" dir="ltr">app:data</code> and <code translate="no" dir="ltr">app:dataPattern</code> attributes in the activity element of a navigation XML file, the placeholder will be automatically filled in with the <code translate="no" dir="ltr">packageName</code> of the context upon inflation.</li> <li>The <code translate="no" dir="ltr">FragmentNavigator</code> now uses the transition APIs when navigating and popping <code translate="no" dir="ltr">NavBackStackEntries</code>. This means that the <code translate="no" dir="ltr">NavBackStackEntry</code> <code translate="no" dir="ltr">Lifecycle</code> will now wait for the entering and exiting fragment special effects to complete before moving their final <code translate="no" dir="ltr">Lifecycle.State</code>.</li> <li>The <code translate="no" dir="ltr">DialogFragmentNavigator</code> now uses the transition APIs when navigating and popping <code translate="no" dir="ltr">NavBackStackEntries</code>. This means that the <code translate="no" dir="ltr">NavBackStackEntry</code> <code translate="no" dir="ltr">Lifecycle</code> will now wait for the <code translate="no" dir="ltr">DialogFragment</code> <code translate="no" dir="ltr">Lifecycle</code> to move to <code translate="no" dir="ltr">DESTROYED</code> before moving to <code translate="no" dir="ltr">DESTROYED</code> itself.</li> <li><code translate="no" dir="ltr">NavHostFragment</code> now allows you to retrieve the <code translate="no" dir="ltr">NavController</code> as soon as the <code translate="no" dir="ltr">NavHostFragment</code> is attached to the <code translate="no" dir="ltr">FragmentManager</code>, rather than only after <code translate="no" dir="ltr">onCreate()</code>.</li> <li>Navigation&#39;s support for Dynamic Feature Modules now depend on the granular Play Feature Delivery Library.</li> <li>Navigation Safe Args now depends on Android Gradle Plugin version 7.3.0. This means it is now only compatible with versions 7.3.0+.</li> </ul> <p><strong>Important changes to NavigationUI since 2.5.0</strong></p> <ul> <li>When passing the ID of a navigation graph to <code translate="no" dir="ltr">AppBarConfiguration</code> (such as via a <code translate="no" dir="ltr">Menu</code>), <code translate="no" dir="ltr">NavigationUI</code> now only considers the start destination of that navigation graph as a top level destination, rather than incorrectly marking every destination within the graph as a top level destination. The behavior of passing the ID of an individual destination is unchanged. This same functionality is available to your own code via the new <code translate="no" dir="ltr">isTopLevelDestination</code> function on <code translate="no" dir="ltr">AppBarConfiguration</code>.</li> <li>The <code translate="no" dir="ltr">setupWithNavController</code> integrations in <code translate="no" dir="ltr">NavigationUI</code> for working with the top app bar will now parse <code translate="no" dir="ltr">R.string</code> values for <code translate="no" dir="ltr">ReferenceType</code> arguments found in your <code translate="no" dir="ltr">android:label</code> into their String values instead of outputting the auto-generated resource integer.</li> <li><code translate="no" dir="ltr">NavigationUI</code> now provides logs when it fails to navigate via a selected <code translate="no" dir="ltr">MenuItem</code>.</li> </ul> <h3 id="2.6.0-rc02" data-text="Version 2.6.0-rc02" tabindex="-1">Version 2.6.0-rc02</h3> <p>May 24, 2023</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.6.0-rc02</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/9b9f336027bb825e6916e31ac2d761c53751420d..40ef6498a60cb43bab0aaed607cbff5d4d6156cb/navigation">Version 2.6.0-rc02 contains these commits.</a></p> <p><strong>Bug Fixes</strong></p> <ul> <li>Fixed an issue with Navigation in Fragments where navigating with <code translate="no" dir="ltr">popUpTo</code> and popping a fragment off the back stack without recreating its view would cause system back to stop working. (<a href="https://android-review.googlesource.com/#/q/Ieb8d4e6a18f8c223ff3193ea4348fb6065e9de94">Ieb8d4</a>, <a href="https://issuetracker.google.com/issues/281726455">b/281726455</a>)</li> </ul> <h3 id="2.6.0-rc01" data-text="Version 2.6.0-rc01" tabindex="-1">Version 2.6.0-rc01</h3> <p>May 10, 2023</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.6.0-rc01</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/01bd392d5702480f8bfe61a8f8bbbea64cf362a0..9b9f336027bb825e6916e31ac2d761c53751420d/navigation">Version 2.6.0-rc01 contains these commits.</a></p> <p><strong>Bug Fixes</strong></p> <ul> <li>Fixed an issue in Navigation with fragments where removing a fragment via navigate with <code translate="no" dir="ltr">popUpTo</code> in its <code translate="no" dir="ltr">onResume()</code> lifecycle callback would cause an <code translate="no" dir="ltr">IllegalStateException</code>. (<a href="https://android-review.googlesource.com/#/q/I21884c268cf213caacabe19db38fd49a1ac829fa">I21884</a>, <a href="https://issuetracker.google.com/issues/279644470">b/279644470</a>)</li> </ul> <h3 id="2.6.0-beta01" data-text="Version 2.6.0-beta01" tabindex="-1">Version 2.6.0-beta01</h3> <p>April 19, 2023</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.6.0-beta01</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/1691115db9e0e4fbbaa2d2250992d98c61de9ed6..01bd392d5702480f8bfe61a8f8bbbea64cf362a0/navigation">Version 2.6.0-beta01 contains these commits.</a></p> <p><strong>New Features</strong></p> <ul> <li><code translate="no" dir="ltr">NavBackStackEntry</code> now provides a custom <code translate="no" dir="ltr">toString</code> implementation. (<a href="https://android-review.googlesource.com/#/q/Iff00bfa2c625e9828d5c9cf19c566069fffc6afe">Iff00b</a>)</li> </ul> <p><strong>Bug Fixes</strong></p> <ul> <li>When using Navigation with Fragments, attempting to manually do a <code translate="no" dir="ltr">FragmentTransaction</code> that adds a fragment to the <code translate="no" dir="ltr">FragmentManager</code>&#39;s back stack will now throw an <code translate="no" dir="ltr">IllegalArgumentException</code>. You should always add fragments via the <code translate="no" dir="ltr">navigate()</code> API. (<a href="https://android-review.googlesource.com/#/q/I6d38e3fac4b7552881655d18304d5efec6168d03">I6d38e</a>)</li> <li>When there is a <code translate="no" dir="ltr">navigate</code> that adds an entry and a <code translate="no" dir="ltr">popBackStack</code> that removes it in the same frame, the resulting top entry on the back stack will now consistently make it back to the <code translate="no" dir="ltr">RESUMED</code> <code translate="no" dir="ltr">Lifecycle.State</code>. (<a href="https://android-review.googlesource.com/#/q/Id80678cf8856ca2de55c8adbc19b33fa0f8fbec9">Id8067</a>, <a href="https://issuetracker.google.com/issues/276495952">b/276495952</a>)</li> </ul> <h3 id="2.6.0-alpha09" data-text="Version 2.6.0-alpha09" tabindex="-1">Version 2.6.0-alpha09</h3> <p>April 5, 2023</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.6.0-alpha09</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/f50d0aafadd4964d658f64172cbfc3f78371efc8..a200cb82769634cecdb118ec4f0bfdf0b086e597/navigation">Version 2.6.0-alpha09 contains these commits.</a></p> <p><strong>Bug Fixes</strong></p> <ul> <li>Fixed checks for invalid route such that if a <code translate="no" dir="ltr">NavDestination</code> contains non-nullable <code translate="no" dir="ltr">NavArgument</code>, this destination&#39;s route must contain placeholders for args named the same as the non-nullable <code translate="no" dir="ltr">NavArgument</code>. (<a href="https://android-review.googlesource.com/#/q/Ic62bfa7c99202fa789dd0733bca834743f1ad39c">Ic62bf</a>, <a href="https://issuetracker.google.com/issues/274697949">b/274697949</a>)</li> <li>Deeplink navigations based on <code translate="no" dir="ltr">Action/MimeType</code> will now fail if the navigation operation is missing a non-nullable <code translate="no" dir="ltr">NavArgument</code> required by the <code translate="no" dir="ltr">NavDestination</code> that the <code translate="no" dir="ltr">Action/MimeType</code> matches with. (<a href="https://android-review.googlesource.com/#/q/Ibfa17dd8043e478e330af5cbb4df865b8e494836">Ibfa17</a>, <a href="https://issuetracker.google.com/issues/271777424">b/271777424</a>)</li> <li>When <code translate="no" dir="ltr">NavController</code> sets a graph with the same route and destinations as the previous graph, it now properly replaces its current graph nodes and its back stack destinations with new instances. This fixes a crash when using <code translate="no" dir="ltr">onLaunchSingleTop</code> without saving state in Navigation Compose. This also fixes an error where navigating to destinations associated with the root graph builds and incorrect back stack. (<a href="https://android-review.git.corp.google.com/q/I5bc582e315578ee53383596070ee3ea4a23aed69">I5bc58</a>, <a href="https://issuetracker.google.com/275258161">b/275258161</a>, <a href="https://issuetracker.google.com/275407804">b/275407804</a>)</li> </ul> <h3 id="2.6.0-alpha08" data-text="Version 2.6.0-alpha08" tabindex="-1">Version 2.6.0-alpha08</h3> <p>March 22, 2023</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.6.0-alpha08</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/bf83b7ca1e086138c9ffa3ed2a530db3b038c79a..5e7d256f82fbafb6d059ab7b18fddd87c7531553/navigation">Version 2.6.0-alpha08 contains these commits.</a></p> <p><strong>New Features</strong></p> <ul> <li><code translate="no" dir="ltr">NavHostFragment</code> now allows you to retrieve the <code translate="no" dir="ltr">NavController</code> as soon as the <code translate="no" dir="ltr">NavHostFragment</code> is attached to the <code translate="no" dir="ltr">FragmentManager</code>, rather than only after <code translate="no" dir="ltr">onCreate()</code>. (<a href="https://android-review.googlesource.com/#/q/Ic638294d888c7c2002b6107d248d2d423a5614ee">Ic6382</a>, <a href="https://issuetracker.google.com/issues/220186282">b/220186282</a>)</li> </ul> <p><strong>Bug Fixes</strong></p> <ul> <li>Fixed a <code translate="no" dir="ltr">NullPointerException</code> when popping a nested graph that includes a non-nullable argument. (<a href="https://android.googlesource.com/platform/frameworks/support/+/6b358154b794a0456b089ac8e548bfb830dd6c22">6b3581</a>, <a href="https://issuetracker.google.com/249988437">b/249988437</a>)</li> <li>When using system back after doing a navigate with <code translate="no" dir="ltr">popUpTo</code>, the state of the <code translate="no" dir="ltr">NavController</code> will pop to the correct entry. (<a href="https://android-review.googlesource.com/#/q/I3a8ec072ba6d1655ab054cc081961825909088e6">I3a8ec</a>, <a href="https://issuetracker.google.com/issues/270447657">b/270447657</a>)</li> <li><code translate="no" dir="ltr">FragmentNavigator</code> will now properly pop entries when the back stack is popped via system back or <code translate="no" dir="ltr">popBackStack()</code> and whether or not the transaction uses effects for the fragment. (<a href="https://android-review.googlesource.com/#/q/I81bdf764c4dfb070b74017f00bbd7ba740f831c4">I81bdf</a>)</li> <li>Adding fragments to the <code translate="no" dir="ltr">FragmentNavigator</code>&#39;s <code translate="no" dir="ltr">FragmentManager</code> without using navigation will no longer cause a crash. (<a href="https://android.googlesource.com/platform/frameworks/support/+/b17204359581a71c427d7519a6cfc1825141ed72">b17204</a>, <a href="https://issuetracker.google.com/274167493">b/274167493</a>)</li> </ul> <p><strong>Dependency Updates</strong></p> <ul> <li>Navigation now depends on <a href="/jetpack/androidx/releases/lifecycle#2.6.1">Lifecycle <code translate="no" dir="ltr">2.6.1</code></a>. (<a href="https://android.googlesource.com/platform/frameworks/support/+/586fe7d84e657d9bbc6d3cb3cbb8954f715df557">586fe7</a>)</li> <li>Navigation now depends on <a href="/jetpack/androidx/releases/savedstate#1.2.1">SavedState <code translate="no" dir="ltr">1.2.1</code></a>. (<a href="https://android.googlesource.com/platform/frameworks/support/+/078e4ef4d6b3475ed3a453ea7ba0d03e6bdc02c3">078e4e</a>)</li> <li>Navigation now depends on <a href="/jetpack/androidx/releases/profileinstaller#1.3.0">ProfileInstaller <code translate="no" dir="ltr">1.3.0</code></a>. (<a href="https://android.googlesource.com/platform/frameworks/support/+/512f0c047e135deb054d7764677f981ffdbb1817">512f0c</a>)</li> </ul> <h3 id="2.6.0-alpha07" data-text="Version 2.6.0-alpha07" tabindex="-1">Version 2.6.0-alpha07</h3> <p>March 8, 2023</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.6.0-alpha07</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/87533b4ff06971ed59028936cd9b6da988cd4522..bf83b7ca1e086138c9ffa3ed2a530db3b038c79a/navigation">Version 2.6.0-alpha07 contains these commits.</a></p> <p><strong>Bug Fixes</strong></p> <ul> <li>The <code translate="no" dir="ltr">getBackStackEntry</code>, <code translate="no" dir="ltr">popBackStack</code>, <code translate="no" dir="ltr">clearBackStack</code> API variants that take routes now take route patterns with nullable arguments and nullable query params (<a href="https://android-review.googlesource.com/#/q/I222940d306f94c737600eb0381228c7594808bfa">I22294</a>, <a href="https://issuetracker.google.com/issues/269302500">b/269302500</a>)</li> <li>Fixed an issue where calling <code translate="no" dir="ltr">clearBackStack()</code> from the <code translate="no" dir="ltr">NavController</code> would not clear the saved state in the fragment manager associated with the cleared back stack. (<a href="https://android-review.googlesource.com/#/q/Ic1cce69633d6f954f7a2f2600a7426bbb241713f">Ic1cce</a>, <a href="https://issuetracker.google.com/issues/271190202">b/271190202</a>)</li> <li>Fixed a regression in 2.6.0-alpha06 that caused the wrong <code translate="no" dir="ltr">MenuItem</code> in the <code translate="no" dir="ltr">BottomNavigationView</code> to be highlighted when using System back between tabs. (<a href="https://android-review.googlesource.com/#/q/I634f6047b7016bcb8b690047605a6f66b2dc1438">I634f6</a>, <a href="https://issuetracker.google.com/issues/270447657">b/270447657</a>)</li> <li>Fixed regression in 2.6.0-alpha06 that caused <code translate="no" dir="ltr">NavBackStackEntry</code>s not to be moved to the RESUMED state when using <code translate="no" dir="ltr">Animation</code>s. (<a href="https://android-review.googlesource.com/#/q/Ib35896636c187da5bd11ea06234a3ea815fdeb68">Ib3589</a>, <a href="https://issuetracker.google.com/issues/269646882">b/269646882</a>)</li> </ul> <h3 id="2.6.0-alpha06" data-text="Version 2.6.0-alpha06" tabindex="-1">Version 2.6.0-alpha06</h3> <p>February 22, 2023</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.6.0-alpha06</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/2ea70540638fa56f90e00b5a8b84781a400a49a1..87533b4ff06971ed59028936cd9b6da988cd4522/navigation">Version 2.6.0-alpha06 contains these commits.</a></p> <p><strong>New features</strong></p> <ul> <li>When previewing a composable with <code translate="no" dir="ltr">NavHost</code>, it will now show the NavGraph&#39;s <code translate="no" dir="ltr">startDestination</code> by default. (<a href="https://android-review.googlesource.com/#/q/I2b89f0e3957f9727912b94e20efdfb6b115b97e9">I2b89f</a>)</li> </ul> <p><strong>API Changes</strong></p> <ul> <li>All <code translate="no" dir="ltr">NavController</code> <code translate="no" dir="ltr">navigate</code> overloads are now annotated with <code translate="no" dir="ltr">@MainThread</code> to ensure that they are called on the main thread. (<a href="https://android-review.googlesource.com/#/q/I2c0b03cf115708fd40d0eee6359bae7302141105">I2c0b0</a>, <a href="https://issuetracker.google.com/issues/263427111">b/263427111</a>)</li> </ul> <p><strong>Bug Fixes</strong></p> <ul> <li>Fixed a crash when attempting to navigate while using Dynamic Fragment Navigation. (<a href="https://android-review.googlesource.com/#/q/I3ee29ea33f2cc7f7221b79d4d17399c725a6a4df">I3ee29</a>, <a href="https://issuetracker.google.com/issues/268360479">b/268360479</a>)</li> <li>Fixed bug where navigating to another fragment via system back button does not update bottom bar to the correct selected item (<a href="https://android-review.googlesource.com/#/q/If559faaccdf57f49f637eafe7be8a069d217db81">If559f</a>, <a href="https://issuetracker.google.com/issues/269044426">b/269044426</a>)</li> </ul> <p><strong>Known Issues</strong></p> <ul> <li>When using Navigation with Fragments, the <code translate="no" dir="ltr">NavBackStackEntry</code>&#39;s Lifecycle fails to reach <code translate="no" dir="ltr">RESUMED</code> when using <a href="/reference/android/view/animation/Animation"><code translate="no" dir="ltr">Animation</code></a> APIs. (<a href="https://issuetracker.google.com/269646882">b/269646882</a>)</li> <li>When using Navigation with Fragments, and navigating with <code translate="no" dir="ltr">BottomNavigation</code>, if you attempt to restore a back stack with multiple entries, the <code translate="no" dir="ltr">BottomMenuItem</code> is not correctly updated. (<a href="https://issuetracker.google.com/270447657">b/270447657</a>)</li> <li>When using Navigation with Fragments, after restoring the state the <code translate="no" dir="ltr">NavBackStackEntry</code> <code translate="no" dir="ltr">Lifecycle</code> does not get <code translate="no" dir="ltr">DESTROYED</code> when its fragment is <code translate="no" dir="ltr">DESTROYED</code> . (<a href="https://issuetracker.google.com/270610768">b/270610768</a>)</li> </ul> <h3 id="2.6.0-alpha05" data-text="Version 2.6.0-alpha05" tabindex="-1">Version 2.6.0-alpha05</h3> <p>February 8, 2023</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.6.0-alpha05</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/a1e318590b217ecfce1b2de17eed2f18b6a680bb..2ea70540638fa56f90e00b5a8b84781a400a49a1/navigation">Version 2.6.0-alpha05 contains these commits.</a></p> <p><strong>New Features</strong></p> <ul> <li><code translate="no" dir="ltr">NavController.popBackStack(route)</code>, <code translate="no" dir="ltr">NavController.getBackStackEntry(route)</code>, <code translate="no" dir="ltr">NavController.clearBackStack(route)</code> now all support routes with arguments partially or fully filled in. Note that the arguments have to be an exact match with the entry&#39;s arguments. (<a href="https://android-review.googlesource.com/#/q/Iebd2816e5a0a10b324bc03d51a25b4cf58922864">Iebd28</a>, <a href="https://android-review.googlesource.com/#/q/Ic678cf67db0f47f7b2778b039242773767735f2c">Ic678c</a>, <a href="https://android-review.googlesource.com/#/q/I3b37b5d2dd9423bf095cce5632f5208abfe49d70">I3b37b</a>, <a href="https://issuetracker.google.com/issues/257514373">b/257514373</a>)</li> <li>The <code translate="no" dir="ltr">FragmentNavigator</code> now uses the transition APIs when navigating and popping <code translate="no" dir="ltr">NavBackStackEntries</code>. This means that the <code translate="no" dir="ltr">NavBackStackEntry</code> <code translate="no" dir="ltr">Lifecycle</code> will now wait for the entering and exiting fragment special effects to complete before moving their final <code translate="no" dir="ltr">Lifecycle.State</code>. (<a href="https://android-review.googlesource.com/#/q/I3cb193646619c371ce4024b19d709fbbfada32be">I3cb19</a>, <a href="https://issuetracker.google.com/issues/238686802">b/238686802</a>)</li> <li>The <code translate="no" dir="ltr">DialogFragmentNavigator</code> now uses the transition APIs when navigating and popping <code translate="no" dir="ltr">NavBackStackEntries</code>. This means that the <code translate="no" dir="ltr">NavBackStackEntry</code> <code translate="no" dir="ltr">Lifecycle</code> will now wait for the <code translate="no" dir="ltr">DialogFragment</code> <code translate="no" dir="ltr">Lifecycle</code> to move to <code translate="no" dir="ltr">DESTROYED</code> before moving to <code translate="no" dir="ltr">DESTROYED</code> itself. (<a href="https://android-review.googlesource.com/#/q/I53ee5ff20ea8dd04dfffbce10015504a9bdca135">I53ee5</a>, <a href="https://issuetracker.google.com/issues/261213893">b/261213893</a>)</li> </ul> <p><strong>API Changes</strong></p> <ul> <li><code translate="no" dir="ltr">NavigatorState</code> now provides the <code translate="no" dir="ltr">prepareForTransition</code> API to allow <code translate="no" dir="ltr">Navigator</code>s to move <code translate="no" dir="ltr">NavBackStackEntries</code> to intermediate <code translate="no" dir="ltr">Lifecycle.State</code>s. (<a href="https://android-review.googlesource.com/#/q/I42c214311d1ab67f589f5749a62133ec564044f4">I42c21</a>, <a href="https://issuetracker.google.com/issues/238686802">b/238686802</a>)</li> <li>You can now access the back stack associated with a <code translate="no" dir="ltr">NavGraphNavigator</code> or a <code translate="no" dir="ltr">ComposeNavigator</code> via a <code translate="no" dir="ltr">backstack</code> property. <code translate="no" dir="ltr">ComposeNavigator</code> also now exposes the <code translate="no" dir="ltr">onTransitionComplete()</code> callback to mark a <code translate="no" dir="ltr">NavBackStackEntry</code> that has executed a navigate or <code translate="no" dir="ltr">popBackStack</code> operation as complete. (<a href="https://android-review.googlesource.com/#/q/I02062bf587450aad6d99fd2bbca19dd3c178d4fe">I02062</a>, <a href="https://android-review.googlesource.com/#/q/I718dbcf2549d755b283292002cdfd9df9dc4bf26">I718db</a>, <a href="https://issuetracker.google.com/issues/257519195">b/257519195</a>)</li> </ul> <p><strong>Bug Fixes</strong></p> <ul> <li>Navigator state will now no-op when using the <code translate="no" dir="ltr">push/popWithTransition</code> APIs and the entry is already being handled. (<a href="https://android-review.googlesource.com/#/q/Iadbfaef1a0d6269bcc974058e09aed30de3611a7">Iadbfa</a>, <a href="https://issuetracker.google.com/issues/261213893">b/261213893</a>)</li> <li>When using <code translate="no" dir="ltr">launchSingleTop</code> with a nested <code translate="no" dir="ltr">NavGraph</code> all destinations starting from original destination to its <code translate="no" dir="ltr">startDestination</code> will only be properly added to the top of the backstack. (<a href="https://android-review.googlesource.com/#/q/Id4bea16aff3dd776826fc6d746475e293eb64b0e">Id4bea</a>, <a href="https://issuetracker.google.com/issues/253256629">b/253256629</a>)</li> <li>Navigation will now properly replace the <code translate="no" dir="ltr">DialogFragment</code> instance when navigating to the same destination with the <code translate="no" dir="ltr">launchSingleTop</code> flag set to true. (<a href="https://android-review.googlesource.com/#/q/I45b5a3bd6f538c1b97573f269414ecf6e06e4d81">I45b5a</a>, <a href="https://issuetracker.google.com/issues/149572817">b/149572817</a>)</li> <li>Navigation SafeArgs will no longer cause a compilation error when using arguments that are exactly 19 characters long. (<a href="https://android-review.googlesource.com/#/q/Id60bcbd017753261a97b002d76960e1e2b1d18ed">Id60bc</a>, <a href="https://issuetracker.google.com/issues/257110095">b/257110095</a>)</li> </ul> <h3 id="2.6.0-alpha04" data-text="Version 2.6.0-alpha04" tabindex="-1">Version 2.6.0-alpha04</h3> <p>November 9, 2022</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.6.0-alpha04</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/548c8ac2570ae6cf15798fea1380491f7d93796b..a1e318590b217ecfce1b2de17eed2f18b6a680bb/navigation">Version 2.6.0-alpha04 contains these commits.</a></p> <p><strong>New Features</strong></p> <ul> <li>Custom subclasses of <code translate="no" dir="ltr">NavType</code> can now override <code translate="no" dir="ltr">serializeAsValue</code> to serialize a value into a String, allowing both serialization and deserialization (via <code translate="no" dir="ltr">parseValue</code>) to be entirely encapsulated in the <code translate="no" dir="ltr">NavType</code> class. <code translate="no" dir="ltr">StringType</code> now overrides this method to call <code translate="no" dir="ltr">Uri.encode</code> on the given <code translate="no" dir="ltr">String</code>. (<a href="https://android-review.googlesource.com/#/q/Ie52134e58058b8b33b9b0810fab2b342dffb6ec9">Ie5213</a>, <a href="https://issuetracker.google.com/issues/247637434">b/247637434</a>)</li> <li><code translate="no" dir="ltr">NavigationUI</code> now provides logs when it fails to navigate via a selected <code translate="no" dir="ltr">MenuItem</code>. (<a href="https://android-review.googlesource.com/#/q/I2af5a295550cb72c05b7e1308be8db325234bd22">I2af5a</a>, <a href="https://issuetracker.google.com/issues/247730357">b/247730357</a>)</li> </ul> <p><strong>Bug Fixes</strong></p> <ul> <li>Navigation deep links are now parsed lazily instead of on graph initialization which could improve app performance at start up. (<a href="https://android-review.googlesource.com/#/q/Iab0abc79fcc65dc435327f199df6b469d4bcee86">Iab0ab</a>)</li> <li>Fixed crash caused by navigating up after deep linking to a destination with null default arguments. (<a href="https://android-review.googlesource.com/#/q/I51c240a957f6fb6a9f91c5564551e1ee23af374f">I51c24</a>, <a href="https://issuetracker.google.com/issues/243183636">b/243183636</a>)</li> </ul> <p><strong>Dependency Update</strong></p> <ul> <li>Navigation&#39;s support for Dynamic Feature Modules now depend on the granular Play Feature Delivery Library. (<a href="https://android-review.googlesource.com/#/q/Ib4ddca6bdd26012bffc5426e50869338faa40d22">Ib4ddc</a>)</li> <li>Navigation Safe Args now depends on Android Gradle Plugin version 7.3.0. This means it is now only compatible with versions 7.3.0+. (<a href="https://android-review.googlesource.com/#/q/I47e49a258f82d072eb3559c97ac0937cf3f1b14b">I47e49</a>)</li> </ul> <h3 id="2.6.0-alpha03" data-text="Version 2.6.0-alpha03" tabindex="-1">Version 2.6.0-alpha03</h3> <p>October 24, 2022</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.6.0-alpha03</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/4586cf6e518f0c59410ef2b291e34ff9fdcff4e1..548c8ac2570ae6cf15798fea1380491f7d93796b/navigation">Version 2.6.0-alpha03 contains these commits.</a></p> <p><strong>Bug Fixes</strong></p> <ul> <li>From <a href="#2.5.3">Navigation <code translate="no" dir="ltr">2.5.3</code></a>: <code translate="no" dir="ltr">NavHost</code> will no longer cause a <code translate="no" dir="ltr">NoSuchElementException</code> when there is no destination available for the <code translate="no" dir="ltr">Crossfade</code> to compose. It will now just skip the composition. (<a href="https://android-review.googlesource.com/#/q/Ieb46e8bbcbcde6183a2ab07fba24b18756a4ae2f">Ieb46e</a>, <a href="https://issuetracker.google.com/issues/253299416">b/253299416</a>)</li> <li>From <a href="#2.5.3">Navigation <code translate="no" dir="ltr">2.5.3</code></a>: Fixed an issue where saved Compose state (e.g., usages of <code translate="no" dir="ltr">rememberSaveable</code>) were not being forgotten and removed when a destination was popped off the back stack. (<a href="https://android-review.googlesource.com/#/q/I649492142419b56d9ef5ab768a2cfe7662f026e2">I64949</a>)</li> </ul> <p><strong>Dependency Updates</strong></p> <ul> <li>Navigation now depends on <a href="/jetpack/androidx/releases/fragment#1.5.4">Fragment <code translate="no" dir="ltr">1.5.4</code></a>. (<a href="https://android-review.googlesource.com/#/q/Icd424c6aefb33f1517d47f4a5b9327ef38711b13">Icd424</a>)</li> </ul> <h3 id="2.6.0-alpha02" data-text="Version 2.6.0-alpha02" tabindex="-1">Version 2.6.0-alpha02</h3> <p>October 5, 2022</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.6.0-alpha02</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/cce7b70f6a5ebf955cf748a73c18b63228b22c74..4586cf6e518f0c59410ef2b291e34ff9fdcff4e1/navigation">Version 2.6.0-alpha02 contains these commits.</a></p> <p><strong>Behavior Changes</strong></p> <ul> <li>When passing the ID of a navigation graph to <code translate="no" dir="ltr">AppBarConfiguration</code> (such as via a <code translate="no" dir="ltr">Menu</code>), <code translate="no" dir="ltr">NavigationUI</code> now only considers the start destination of that navigation graph as a top level destination, rather than incorrectly marking every destination within the graph as a top level destination. The behavior of passing the ID of an individual destination is unchanged. This same functionality is available to your own code via the new <code translate="no" dir="ltr">isTopLevelDestination</code> function on <code translate="no" dir="ltr">AppBarConfiguration</code>. (<a href="https://android-review.googlesource.com/#/q/Ie936ece98a80c2a13fbfb77b83a0ba86e926ebd9">Ie936e</a>, <a href="https://issuetracker.google.com/issues/238496771">b/238496771</a>)</li> </ul> <p><strong>Bug Fixes</strong></p> <ul> <li>The <code translate="no" dir="ltr">navigation:navigation-fragment</code> component now depends on Fragment version <code translate="no" dir="ltr">1.5.2</code>. (<a href="https://android-review.googlesource.com/#/q/I00ba4999d13e3330ffd8b260dc856c6e142dd644">I00ba4</a>)</li> <li>The selected menu item will no longer be updated when navigating to a <code translate="no" dir="ltr">FloatingWindow</code> destination such as a dialog. (<a href="https://android-review.googlesource.com/#/q/I4cde820ed7dd61a1a6cb7803f81e704e4b446a0b">I4cde8</a>, <a href="https://issuetracker.google.com/issues/240308330">b/240308330</a>)</li> </ul> <h3 id="2.6.0-alpha01" data-text="Version 2.6.0-alpha01" tabindex="-1">Version 2.6.0-alpha01</h3> <p>September 7, 2022</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.6.0-alpha01</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/ca314fbfe623461cccbca66d6b874e7ceedb1bb8..cce7b70f6a5ebf955cf748a73c18b63228b22c74/navigation">Version 2.6.0-alpha01 contains these commits.</a></p> <p><strong>New Features</strong></p> <ul> <li>The <code translate="no" dir="ltr">setupWithNavController</code> integrations in <code translate="no" dir="ltr">NavigationUI</code> for working with the top app bar will now parse <code translate="no" dir="ltr">R.string</code> values for <code translate="no" dir="ltr">ReferenceType</code> arguments found in your <code translate="no" dir="ltr">android:label</code> into their String values instead of outputting the auto-generated resource integer. (<a href="https://android-review.googlesource.com/#/q/I5f803f69cb9820f7be85cb7642c8fb0f475285f7">I5f803</a>, <a href="https://issuetracker.google.com/issues/167959935">b/167959935</a>)</li> <li><code translate="no" dir="ltr">NavDeepLink</code> now supports default values for arrays, which allows support for repeated query params that will map to the argument&#39;s array type. <code translate="no" dir="ltr">NavType</code> also now includes a default method which can be overridden to combine two parsed values. (<a href="https://android-review.googlesource.com/#/q/Id68c3153e38412add55a8ddef3cd9b1c339677b0">Id68c3</a>, <a href="https://issuetracker.google.com/issues/209977108">b/209977108</a>)</li> <li>When using the exact string <code translate="no" dir="ltr">${applicationId}</code> as the placeholder in the <code translate="no" dir="ltr">app:data</code> and <code translate="no" dir="ltr">app:dataPattern</code> attributes in the activity element of a navigation XML file, the placeholder will be automatically filled in with the <code translate="no" dir="ltr">packageName</code> of the context upon inflation. (<a href="https://android-review.googlesource.com/#/q/Iaabde79a03b4d9b54bf1633d4abf4c297dd30de8">Iaabde</a>, <a href="https://issuetracker.google.com/issues/234223561">b/234223561</a>)</li> <li>Attempting to create an empty <code translate="no" dir="ltr">NavDeepLink</code> using the <code translate="no" dir="ltr">navDeepLink</code> Kotlin DSL will now result in a lint warning indicating that a deep link needs an uri, action, and/or mimetype to be valid. (<a href="https://android-review.googlesource.com/#/q/I08d2feba9b90ee934b8834c5573914fa44d7dc45">I08d2f</a>, <a href="https://issuetracker.google.com/issues/154038883">b/154038883</a>)</li> </ul> <p><strong>API Changes</strong></p> <ul> <li>Added new <code translate="no" dir="ltr">NavDestination</code> extension function to parse dynamic labels with arguments in the form of <code translate="no" dir="ltr">android:label=&quot;{arg}&quot;</code> into String. Supports <code translate="no" dir="ltr">ReferenceType</code> arguments by parsing <code translate="no" dir="ltr">R.string</code> values into their String values. (<a href="https://android-review.googlesource.com/#/q/I07d89975d5126b1da35f9eccb7c257a83749b66d">I07d89</a>, <a href="https://issuetracker.google.com/issues/236269380">b/236269380</a>)</li> </ul> <p><strong>Behavior Changes</strong></p> <ul> <li>NavBackStackEntry&#39;s <code translate="no" dir="ltr">arguments</code> and the <code translate="no" dir="ltr">arguments</code> passed to an <code translate="no" dir="ltr">OnDestinationChangedListener</code> are now only a copy of the immutable arguments that were created when you navigated to the destination. This means any changes made to those Bundles will not be reflected in subsequent accesses to the <code translate="no" dir="ltr">arguments</code> or other <code translate="no" dir="ltr">OnDestinationChangedListener</code> instances. (<a href="https://android-review.googlesource.com/#/q/I676f53df9aa311d51c5da1ae11d57b51bb149b7d">I676f5</a>)</li> </ul> <p><strong>Bug Fixes</strong></p> <ul> <li>From <a href="#2.5.2">Navigation <code translate="no" dir="ltr">2.5.2</code></a>: Dynamic Navigation now properly attempts to install Activity destinations from other modules before navigating to them. (<a href="https://android-review.googlesource.com/#/q/Ia2c1645426d2f6a5958a10379a99f2aade3dd03a">Ia2c16</a>, <a href="https://issuetracker.google.com/issues/240292838">b/240292838</a>)</li> <li>From <a href="#2.5.2">Navigation <code translate="no" dir="ltr">2.5.2</code></a>: Navigation will now properly replace the Fragment instance when navigating to the same destination and setting the <code translate="no" dir="ltr">launchSingleTop</code> flag to true. (<a href="https://android-review.googlesource.com/#/q/I5a2f15e1c2a9a4bc5bae6f5d016a9b06b76aa448">I5a2f1</a>, <a href="https://issuetracker.google.com/issues/237374580">b/237374580</a>)</li> <li>From <a href="#2.5.2">Navigation <code translate="no" dir="ltr">2.5.2</code></a>: Fixed <code translate="no" dir="ltr">IllegalStateException</code> caused by navigating to a double nested graph that shares a parent with a new popped start destination. (<a href="https://android-review.googlesource.com/#/q/I9f7cb2445e6021c6ab4cb81d62612411249c1257">I9f7cb</a>, <a href="https://issuetracker.google.com/issues/243778589">b/243778589</a>)</li> </ul> <h2 id="version_25_2" data-text="Version 2.5" tabindex="-1">Version 2.5</h2> <h3 id="2.5.3" data-text="Version 2.5.3" tabindex="-1">Version 2.5.3</h3> <p>October 24, 2022</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.5.3</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/872530398dbfbbde210f8587ef252ba61ab10a2d..7c18fd081d3256c2eb05cc540447dc8106e923be/navigation">Version 2.5.3 contains these commits.</a></p> <p><strong>Bug Fixes</strong></p> <ul> <li><code translate="no" dir="ltr">NavHost</code> will no longer cause a <code translate="no" dir="ltr">NoSuchElementException</code> when there is no destination available for the <code translate="no" dir="ltr">Crossfade</code> to compose. It will now just skip the composition. (<a href="https://android-review.googlesource.com/#/q/Ieb46e8bbcbcde6183a2ab07fba24b18756a4ae2f">Ieb46e</a>, <a href="https://issuetracker.google.com/issues/253299416">b/253299416</a>)</li> <li>Fixed an issue where saved Compose state (e.g., usages of <code translate="no" dir="ltr">rememberSaveable</code>) were not being forgotten and removed when a destination was popped off the back stack. (<a href="https://android-review.googlesource.com/#/q/I649492142419b56d9ef5ab768a2cfe7662f026e2">I64949</a>)</li> </ul> <h3 id="2.5.2" data-text="Version 2.5.2" tabindex="-1">Version 2.5.2</h3> <p>September 7, 2022</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.5.2</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/ca314fbfe623461cccbca66d6b874e7ceedb1bb8..872530398dbfbbde210f8587ef252ba61ab10a2d/navigation">Version 2.5.2 contains these commits.</a></p> <p><strong>Bug Fixes</strong></p> <ul> <li>Dynamic Navigation now properly attempts to install Activity destinations from other modules before navigating to them. (<a href="https://android-review.googlesource.com/#/q/Ia2c1645426d2f6a5958a10379a99f2aade3dd03a">Ia2c16</a>, <a href="https://issuetracker.google.com/issues/240292838">b/240292838</a>)</li> <li>Navigation will now properly replace the Fragment instance when navigating to the same destination and setting the <code translate="no" dir="ltr">launchSingleTop</code> flag to true. (<a href="https://android-review.googlesource.com/#/q/I5a2f15e1c2a9a4bc5bae6f5d016a9b06b76aa448">I5a2f1</a>, <a href="https://issuetracker.google.com/issues/237374580">b/237374580</a>)</li> <li>Fixed <code translate="no" dir="ltr">IllegalStateException</code> caused by navigating to a double nested graph that shares a parent with a new popped start destination. (<a href="https://android-review.googlesource.com/#/q/I9f7cb2445e6021c6ab4cb81d62612411249c1257">I9f7cb</a>, <a href="https://issuetracker.google.com/issues/243778589">b/243778589</a>)</li> </ul> <p><strong>Dependency Update</strong></p> <ul> <li>Navigation <code translate="no" dir="ltr">2.5.2</code> now depends on <a href="/jetpack/androidx/releases/fragment#1.5.2">Fragment <code translate="no" dir="ltr">1.5.2</code></a>. (<a href="https://android-review.googlesource.com/c/platform/frameworks/support/+/2178734">aosp/2178734</a>)</li> </ul> <h3 id="2.5.1" data-text="Version 2.5.1" tabindex="-1">Version 2.5.1</h3> <p>July 27, 2022</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.5.1</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/56365a25722236a5e107d81e22ce0d3c80861802..ca314fbfe623461cccbca66d6b874e7ceedb1bb8/navigation">Version 2.5.1 contains these commits.</a></p> <p><strong>Bug Fixes</strong></p> <ul> <li><code translate="no" dir="ltr">Navigation Safe Args</code> will no longer cause deprecation warnings in generated classes when using custom argument types that are saved in a <code translate="no" dir="ltr">Bundle</code>. (<a href="https://android-review.googlesource.com/#/q/Id86edf231b90176b5a0f03239bff628171a0284c">Id86ed</a>, <a href="https://issuetracker.google.com/issues/237725966">b/237725966</a>)</li> </ul> <p><strong>Dependency Updates</strong></p> <ul> <li>The Navigation library now depends on <a href="/jetpack/androidx/releases/lifecycle#2.5.1">Lifecycle <code translate="no" dir="ltr">2.5.1</code></a>. (<a href="https://android-review.googlesource.com/#/q/Ib44513cf0c7f96fe996b23ced62ab82da0146f21">Ib4451</a>)</li> <li>The Navigation library now depends on <a href="/jetpack/androidx/releases/activity#1.5.1">Activity <code translate="no" dir="ltr">1.5.1</code></a>. (<a href="https://android-review.googlesource.com/#/q/I3efe89a890713d7c9c8ecb9344c48ba4e4b881b7">I3efe8</a>)</li> <li>The Navigation library now depends on <a href="/jetpack/androidx/releases/fragment#1.5.1">Fragment <code translate="no" dir="ltr">1.5.1</code></a>. (<a href="https://android-review.googlesource.com/#/q/I561770ed155317788b7179540d336c5abf24b71b">I56177</a>)</li> </ul> <h3 id="2.5.0" data-text="Version 2.5.0" tabindex="-1">Version 2.5.0</h3> <p>June 29, 2022</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.5.0</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/d4d9ac459e2261cd015398c13a79548e4d10f5bf..56365a25722236a5e107d81e22ce0d3c80861802/navigation">Version 2.5.0 contains these commits.</a></p> <p><strong>Important changes since 2.4.0</strong></p> <ul> <li><strong>CreationExtras Integration</strong> - <code translate="no" dir="ltr">Navigation</code> now has the ability to provide a stateless <code translate="no" dir="ltr">ViewModelProvider.Factory</code> via <a href="/jetpack/androidx/releases/lifecycle#2.5.0">Lifecycle <code translate="no" dir="ltr">2.5.0</code></a>’s <code translate="no" dir="ltr">CreationExtras</code>.</li> </ul> <p><strong>Navigation SafeArgs</strong></p> <ul> <li><code translate="no" dir="ltr">Navigation Safe Args</code> has upgraded the <code translate="no" dir="ltr">Android Gradle Plugin</code> dependency to rely on <code translate="no" dir="ltr">7.0.4</code>, dropping compatibility for AGP versions before <code translate="no" dir="ltr">7.0</code>.</li> <li>Added support for the namespace build.gradle attribute to be used instead of applicationId.</li> </ul> <p><strong>Other Changes</strong></p> <ul> <li>The <code translate="no" dir="ltr">visibleEntries</code> API is no longer experimental and provides a function to retrieve all of the entries whose destination is currently visible according to the <code translate="no" dir="ltr">NavController</code>.</li> </ul> <h3 id="2.5.0-rc02" data-text="Version 2.5.0-rc02" tabindex="-1">Version 2.5.0-rc02</h3> <p>June 15, 2022</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.5.0-rc02</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/c5a5a93e0561b4cdac8767f117afae230c0a3a8f..d4d9ac459e2261cd015398c13a79548e4d10f5bf/navigation">Version 2.5.0-rc02 contains these commits.</a></p> <p><strong>Bug Fixes</strong></p> <ul> <li>Fixed a crash caused by fast switching between bottom destinations when using the Navigation Compose <code translate="no" dir="ltr">NavHost</code>. (<a href="https://android-review.googlesource.com/#/q/I3979acdda0b6715fcf96bb1948ad6f5e6ba87388">I3979a</a>, <a href="https://issuetracker.google.com/issues/234054916">b/234054916</a>)</li> <li><code translate="no" dir="ltr">Navigation SafeArgs</code> will no longer crash when using an <code translate="no" dir="ltr">applicationIdSuffix</code> and namespace with either no <code translate="no" dir="ltr">applicationId</code> present, or when the <code translate="no" dir="ltr">applicationId</code> and namespace differ. (<a href="https://android-review.googlesource.com/#/q/I754b1fffe44bdb142ae818187cad6cd7fdc9080a">I754b1</a>, <a href="https://issuetracker.google.com/issues/233119646">b/233119646</a>)</li> <li><code translate="no" dir="ltr">NavArgument</code> now has a custom <code translate="no" dir="ltr">toString()</code> function to show the internal values of the argument. (<a href="https://android-review.googlesource.com/#/q/I900a8f28b0c801109522634d00aaab16de057e83">I900a8</a>)</li> </ul> <h3 id="2.5.0-rc01" data-text="Version 2.5.0-rc01" tabindex="-1">Version 2.5.0-rc01</h3> <p>May 11, 2022</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.5.0-rc01</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/c0a89ec374961b3015097ab307ebb8196dbe3888..c5a5a93e0561b4cdac8767f117afae230c0a3a8f/navigation">Version 2.5.0-rc01 contains these commits.</a></p> <p><strong>New Features</strong></p> <ul> <li>Added a new lint rule to warn against placing <code translate="no" dir="ltr">&lt;deeplink&gt;</code> elements inside <code translate="no" dir="ltr">&lt;activity&gt;</code> elements in your <code translate="no" dir="ltr">navigation.xml</code> file.(<a href="https://android-review.googlesource.com/#/q/Ic15a5ec165620b7ef5b3f03538cc83b5576add8d">Ic15a5</a>, <a href="https://issuetracker.google.com/178403185">b/178403185</a>)</li> </ul> <p><strong>Bug Fixes</strong></p> <ul> <li>Composable scopes in <code translate="no" dir="ltr">NavHost</code> and <code translate="no" dir="ltr">DialogHost</code> are now disposed in the expected order, i.e. inner composabled are disposed before outer composables. (<a href="https://android-review.googlesource.com/#/q/I157e609fb0609265eef381f729285bf769b56a7c">I157e6</a>)</li> <li>Navigation SafeArgs now uses <code translate="no" dir="ltr">PathSensitivity.RELATIVE</code> in the <code translate="no" dir="ltr">ArgumentsGenerationTask</code> to allow for cache relocatability. This means the cache entry can now be re-used from a CI build to a local build. (<a href="https://android-review.googlesource.com/#/q/I5f67ced6e860f301678ba9f6e77683f1061ebf59">I5f67c</a>, <a href="https://issuetracker.google.com/issues/173420454">b/173420454</a>)</li> <li>The <code translate="no" dir="ltr">UnrememberedGetBackStackEntryDetector</code> lint rule has been updated to ensure that the <code translate="no" dir="ltr">remember</code> call surrounding the call to <code translate="no" dir="ltr">getBackStackEntry()</code> also passes in a <code translate="no" dir="ltr">NavBackStackEntry</code> object as a key.(<a href="https://android-review.googlesource.com/#/q/Ib708126a32c865f758d5967ea177cc9d2c7692d5">Ib7081</a>, <a href="https://issuetracker.google.com/227382831">b/227382831</a>)</li> </ul> <h3 id="2.5.0-beta01" data-text="Version 2.5.0-beta01" tabindex="-1">Version 2.5.0-beta01</h3> <p>April 20, 2022</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.5.0-beta01</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/7ca43e00a517eaeeedc0a21f482b17f06e3d2181..c0a89ec374961b3015097ab307ebb8196dbe3888/navigation">Version 2.5.0-beta01 contains these commits.</a></p> <p><strong>Bug Fixes</strong></p> <ul> <li><code translate="no" dir="ltr">DialogNavigator</code> now uses <code translate="no" dir="ltr">popWithTransition</code> when executing a <code translate="no" dir="ltr">dismiss()</code> call. This fixes a race condition when using a <code translate="no" dir="ltr">ViewModel</code> within <code translate="no" dir="ltr">dialog</code> destination that would cause an <code translate="no" dir="ltr">IllegalStateException</code> when dismissing the Dialog by either using system back or tapping outside of the dialog to exit. (<a href="https://android-review.googlesource.com/#/q/Id7376c0b8db5be869d8ff53185e15b0603bf8582">Id7376</a>, <a href="https://issuetracker.google.com/issues/226552301">b/226552301</a>)</li> </ul> <p><strong>Dependency Updates</strong></p> <ul> <li>Navigation now depends on <a href="/jetpack/androidx/releases/lifecycle#2.5.0-beta01">Lifecycle <code translate="no" dir="ltr">2.5.0-beta01</code></a>, fixing an <code translate="no" dir="ltr">IllegalStateException</code> when nesting one <code translate="no" dir="ltr">NavHost</code> within another <code translate="no" dir="ltr">NavHost</code> in a non-primary bottom navigation tab when using multiple back stacks.</li> </ul> <h3 id="2.5.0-alpha04" data-text="Version 2.5.0-alpha04" tabindex="-1">Version 2.5.0-alpha04</h3> <p>April 6, 2022</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.5.0-alpha04</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/9b2b3d8efd5f00bd4af903bbaa926f6a712d0bd8..7ca43e00a517eaeeedc0a21f482b17f06e3d2181/navigation">Version 2.5.0-alpha04 contains these commits.</a></p> <p><strong>API Changes</strong></p> <ul> <li><code translate="no" dir="ltr">visibleEntries</code> is no longer experimental. (<a href="https://android-review.googlesource.com/#/q/I4829fb8402901ea9e7ef31262f4b1c7ac3e26818">I4829f</a>, <a href="https://issuetracker.google.com/issues/225394514">b/225394514</a>)</li> </ul> <p><strong>Bug Fixes</strong></p> <ul> <li>NavHost now depend on <code translate="no" dir="ltr">visibleEntries</code> from the <code translate="no" dir="ltr">NavController</code> to determine which entries to compose. This means that when using nested NavHost the inner <code translate="no" dir="ltr">NavHost</code> should now properly animate out. (<a href="https://android-review.googlesource.com/#/q/I4ba2b542821154a76566f9c02cf7a95599a30f14">I4ba2b</a>, <a href="https://issuetracker.google.com/issues/225394514">b/225394514</a>)</li> <li>The <code translate="no" dir="ltr">visibleEntries</code> <code translate="no" dir="ltr">StateFlow</code> provided by <code translate="no" dir="ltr">NavController</code> is now based on the entry max Lifecycle state instead of the current Lifecycle state. This means that even if the host lifecycle of the <code translate="no" dir="ltr">navController</code> goes below STARTED, the list of visible entires will remain the same. (<a href="https://android-review.googlesource.com/#/q/I9e2a810f261e9dc1e61417b168427b3bf597fbd5">I9e2a8</a>, <a href="https://issuetracker.google.com/issues/225394514">b/225394514</a>)</li> <li><code translate="no" dir="ltr">SavedStateViewFactory</code> now supports using <code translate="no" dir="ltr">CreationExtras</code> even when it was initialized with a <code translate="no" dir="ltr">SavedStateRegistryOwner</code>. If extras are provided, the initialized arguments are ignored. (<a href="https://android-review.googlesource.com/#/q/I6c43bfd75888cb4b8bdd610cd07d4962aaba37ea">I6c43b</a>, <a href="https://issuetracker.google.com/issues/224844583">b/224844583</a>)</li> <li><code translate="no" dir="ltr">NavDeepLink</code> can now parse Uris with a single query parameter with no value. (<a href="https://android-review.googlesource.com/#/q/I0efe8852542de7d50677499fcd7d32d905163908">I0efe8</a>, <a href="https://issuetracker.google.com/issues/148905489">b/148905489</a>)</li> <li>Empty string are now considered as valid arguments in deep links. (<a href="https://android-review.googlesource.com/#/q/I70a0d1b47db028d829014f21763f95bb76fa8e3c">I70a0d</a>, <a href="https://issuetracker.google.com/issues/217399862">b/217399862</a>)</li> <li><code translate="no" dir="ltr">Navigation Safe Args</code> will no longer crash when using namespaces and no <code translate="no" dir="ltr">AndroidManifest.xml</code> is present. (<a href="https://android-review.googlesource.com/#/q/I17ccf95b5f4137762d7c3db0503ec394812e89e8">I17ccf</a>, <a href="https://issuetracker.google.com/issues/227229815">b/227229815</a>)</li> </ul> <h3 id="2.5.0-alpha03" data-text="Version 2.5.0-alpha03" tabindex="-1">Version 2.5.0-alpha03</h3> <p>February 23, 2022</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.5.0-alpha03</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/db2ecbef194afcddfaede22e1d884a8959a9277c..9b2b3d8efd5f00bd4af903bbaa926f6a712d0bd8/navigation">Version 2.5.0-alpha03 contains these commits.</a></p> <p><strong>API Changes</strong></p> <ul> <li>You can now pass in <code translate="no" dir="ltr">CreationExtras</code> to <code translate="no" dir="ltr">by navGraphViewModels</code> to create a <code translate="no" dir="ltr">ViewModel</code>. (<a href="https://android-review.googlesource.com/#/q/I2921777b099bc0682008bd44728f1f678ca29dbd">I29217</a>, <a href="https://issuetracker.google.com/issues/217618359">b/217618359</a>)</li> </ul> <p><strong>Bug Fixes</strong></p> <ul> <li><code translate="no" dir="ltr">NavDeepLinks</code> now properly support encoded new line characters embedded in routes/deep link URIs. (<a href="https://android-review.googlesource.com/#/q/I513d1fca7c3921bb3c3b006e3d88853a210bd204">I513d1</a>, <a href="https://issuetracker.google.com/issues/217815060">b/217815060</a>)</li> <li><code translate="no" dir="ltr">CreationExtras</code> will now work correctly when used with <code translate="no" dir="ltr">NavBackStackEntries</code> to create ViewModels. (<a href="https://android-review.googlesource.com/#/q/I6916116b1aa5d88d31e36e101040b1999f98095c">I69161</a>, <a href="https://issuetracker.google.com/issues/217617710">b/217617710</a>)</li> <li>Navigation Safe Args now supports using the namespace defined in the <code translate="no" dir="ltr">build.gradle</code> in place of the package in the AndroidManifest. (<a href="https://android-review.googlesource.com/#/q/I659efc0f5b74619f5fe3ffb882c96ccb360670b7">I659ef</a>, <a href="https://issuetracker.google.com/issues/217414933">b/217414933</a>)</li> </ul> <h3 id="2.5.0-alpha02" data-text="Version 2.5.0-alpha02" tabindex="-1">Version 2.5.0-alpha02</h3> <p>February 9, 2022</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.5.0-alpha02</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/9dceceb54300ed028a7e8fc7a3454f270337ffde..db2ecbef194afcddfaede22e1d884a8959a9277c/navigation">Version 2.5.0-alpha02 contains these commits.</a></p> <p><strong>Bug Fixes</strong></p> <ul> <li>From <a href="#2.4.1">Navigation <code translate="no" dir="ltr">2.4.1</code></a>: The <code translate="no" dir="ltr">NavHostFragment</code> will now properly set the <code translate="no" dir="ltr">OnBackPressedDispatcher</code> when using viewbinding with nested graphs. (<a href="https://android-review.googlesource.com/#/q/Ifbb512720e49b4cd49b1ba337f5aa6bcebd1a303">Ifbb51</a>, <a href="https://issuetracker.google.com/issues/214577959">b/214577959</a>)</li> <li>From <a href="#2.4.1">Navigation <code translate="no" dir="ltr">2.4.1</code></a>: When deep linking through multiple nested <code translate="no" dir="ltr">NavGraph</code>s the back stack will now properly include intermediate start destinations. (<a href="https://android-review.googlesource.com/#/q/I504c04d2cc4381af22405266192ea0f5094f9c16">I504c0</a>, <a href="https://issuetracker.google.com/issues/214383060">b/214383060</a>)</li> </ul> <h3 id="2.5.0-alpha01" data-text="Version 2.5.0-alpha01" tabindex="-1">Version 2.5.0-alpha01</h3> <p>January 26, 2022</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.5.0-alpha01</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/ee27dabb830fecc2bb6899cb460d977a31d90612..9dceceb54300ed028a7e8fc7a3454f270337ffde/navigation">Version 2.5.0-alpha01 contains these commits.</a></p> <p><strong>New Features</strong></p> <ul> <li><code translate="no" dir="ltr">NavBackStackEntry</code> now integrates with ViewModel CreationExtras, introduced as part of <a href="/jetpack/androidx/releases/lifecycle#2.5.0-alpha01">Lifecycle <code translate="no" dir="ltr">2.5.0-alpha01</code></a>. (<a href="https://android-review.googlesource.com/#/q/Ib9fe2eadbad3bb89e1685e3f3409acca92ab5b95">Ib9fe2</a>, <a href="https://issuetracker.google.com/issues/207012490">b/207012490</a>)</li> </ul> <p><strong>Bug Fixes</strong></p> <ul> <li>Fixed an issue where accessing a <code translate="no" dir="ltr">ViewModel</code> created via <code translate="no" dir="ltr">by navGraphViewModels()</code> from a Fragment&#39;s <code translate="no" dir="ltr">onCreate()</code> would fail with an <code translate="no" dir="ltr">IllegalStateException</code>. (<a href="https://android-review.googlesource.com/#/q/I8a14dd596195d4ddfa8199c8023a7aedcd286113">I8a14d</a>)</li> <li><code translate="no" dir="ltr">NavDeepLink</code>s will no longer unnecessarily decode args twice, meaning that the proper args are now passed to your final destination. (<a href="https://android-review.googlesource.com/#/q/I31b0aa2e770650f483a3f75257c57035af298d9f">I31b0a</a>, <a href="https://issuetracker.google.com/issues/210711399">b/210711399</a>)</li> </ul> <p><strong>Safe Args</strong></p> <ul> <li>Safe Args now depends on Android Gradle Plugin version 7.0.4. This means that Navigation Safe Args will no longer be compatible with Android Studio versions prior to 7.0, but is now compatible with Android Gradle Plugin 7.1.0 and higher. (<a href="https://android-review.googlesource.com/#/q/I41c88ee06ad827c61cb1bbdc5ba58b3d56155caf">I41c88</a>, <a href="https://issuetracker.google.com/issues/213086135">b/213086135</a>, <a href="https://issuetracker.google.com/issues/207670704">b/207670704</a>)</li> </ul> <h2 id="version_242_3" data-text="Version 2.4.2" tabindex="-1">Version 2.4.2</h2> <h3 id="2.4.2" data-text="Version 2.4.2" tabindex="-1">Version 2.4.2</h3> <p>April 6, 2022</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.4.2</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/74c6bf00f1309f5066b20ceb18fe9493896f0eac..84af66c94fd924400737747502ac35e96743a941/navigation">Version 2.4.2 contains these commits.</a></p> <p><strong>Bug Fixes</strong></p> <ul> <li>Backported from <a href="#2.5.0-alpha03">Navigation <code translate="no" dir="ltr">2.5.0-alpha03</code></a>: <code translate="no" dir="ltr">NavDeepLinks</code> now properly support encoded new line characters embedded in routes/deep link URIs. (<a href="https://android-review.googlesource.com/#/q/I513d1fca7c3921bb3c3b006e3d88853a210bd204">I513d1</a>, <a href="https://issuetracker.google.com/issues/217815060">b/217815060</a>)</li> <li>Backported from <a href="#2.5.0-alpha03">Navigation <code translate="no" dir="ltr">2.5.0-alpha03</code></a>: Navigation SafeArgs now supports using the namespace defined in the <code translate="no" dir="ltr">build.gradle</code> in place of the package in the AndroidManifest. (<a href="https://android-review.googlesource.com/#/q/I659efc0f5b74619f5fe3ffb882c96ccb360670b7">I659ef</a>, <a href="https://issuetracker.google.com/issues/217414933">b/217414933</a>)</li> <li>Backported from <a href="#2.5.0-alpha04">Navigation <code translate="no" dir="ltr">2.5.0-alpha04</code></a>: <code translate="no" dir="ltr">Navigation Safe Args</code> will no longer crash when using namespaces and no <code translate="no" dir="ltr">AndroidManifest.xml</code> is present. (<a href="https://android-review.googlesource.com/#/q/I17ccf95b5f4137762d7c3db0503ec394812e89e8">I17ccf</a>, <a href="https://issuetracker.google.com/issues/227229815">b/227229815</a>)</li> <li>Backported from <a href="#2.5.0-alpha04">Navigation <code translate="no" dir="ltr">2.5.0-alpha04</code></a>: Empty string are now considered as valid arguments in deep links. (<a href="https://android-review.googlesource.com/#/q/I70a0d1b47db028d829014f21763f95bb76fa8e3c">I70a0d</a>, <a href="https://issuetracker.google.com/issues/217399862">b/217399862</a>)</li> </ul> <h2 id="version_241_3" data-text="Version 2.4.1" tabindex="-1">Version 2.4.1</h2> <h3 id="2.4.1" data-text="Version 2.4.1" tabindex="-1">Version 2.4.1</h3> <p>February 9, 2022</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.4.1</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/06c50aeb46902c0559e3fdaf3bb0ea031f910e78..74c6bf00f1309f5066b20ceb18fe9493896f0eac/navigation">Version 2.4.1 contains these commits.</a></p> <p><strong>Bug Fixes</strong></p> <ul> <li>The <code translate="no" dir="ltr">NavHostFragment</code> will now properly set the <code translate="no" dir="ltr">OnBackPressedDispatcher</code> when using viewbinding with nested graphs. (<a href="https://android-review.googlesource.com/#/q/Ifbb512720e49b4cd49b1ba337f5aa6bcebd1a303">Ifbb51</a>, <a href="https://issuetracker.google.com/issues/214577959">b/214577959</a>)</li> <li>When deep linking through multiple nested <code translate="no" dir="ltr">NavGraph</code>s the back stack will now properly include intermediate start destinations. (<a href="https://android-review.googlesource.com/#/q/I504c04d2cc4381af22405266192ea0f5094f9c16">I504c0</a>, <a href="https://issuetracker.google.com/issues/214383060">b/214383060</a>)</li> <li>Backported from <a href="#2.5.0-alpha01">Navigation <code translate="no" dir="ltr">2.5.0-alpha01</code></a>: Fixed an issue where accessing a ViewModel created via <code translate="no" dir="ltr">by navGraphViewModels()</code> from a Fragment&#39;s <code translate="no" dir="ltr">onCreate()</code> would fail with an <code translate="no" dir="ltr">IllegalStateException</code>. (<a href="https://android-review.googlesource.com/#/q/I8a14dd596195d4ddfa8199c8023a7aedcd286113">I8a14d</a>)</li> <li>Backported from <a href="#2.5.0-alpha01">Navigation <code translate="no" dir="ltr">2.5.0-alpha01</code></a>: <code translate="no" dir="ltr">NavDeepLink</code>s no longer unnecessarily decode args twice, meaning that the properly decoded args are now passed to your final destination. (<a href="https://android-review.googlesource.com/#/q/I31b0aa2e770650f483a3f75257c57035af298d9f">I31b0a</a>, <a href="https://issuetracker.google.com/issues/210711399">b/210711399</a>)</li> <li>Backported from <a href="#2.5.0-alpha01">Navigation <code translate="no" dir="ltr">2.5.0-alpha01</code></a>: Safe Args now depends on Android Gradle Plugin version 7.0.4. This means that Navigation Safe Args will no longer be compatible with Android Studio versions prior to 7.0, but is now compatible with Android Gradle Plugin 7.1.0 and higher. (<a href="https://android-review.googlesource.com/#/q/I41c88ee06ad827c61cb1bbdc5ba58b3d56155caf">I41c88</a>, <a href="https://issuetracker.google.com/issues/213086135">b/213086135</a>, <a href="https://issuetracker.google.com/issues/207670704">b/207670704</a>)</li> </ul> <h2 id="version_240_3" data-text="Version 2.4.0" tabindex="-1">Version 2.4.0</h2> <h3 id="2.4.0" data-text="Version 2.4.0" tabindex="-1">Version 2.4.0</h3> <p>January 26, 2022</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.4.0</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/ee27dabb830fecc2bb6899cb460d977a31d90612..06c50aeb46902c0559e3fdaf3bb0ea031f910e78/navigation">Version 2.4.0 contains these commits.</a></p> <p><strong>Important changes since 2.3.0</strong></p> <ul> <li>All Navigation artifacts have been rewritten in Kotlin. This has improved the nullability of classes using generics (such as <code translate="no" dir="ltr">NavType</code> subclasses). All Kotlin extension functions that used to be part of the <code translate="no" dir="ltr">-ktx</code> artifacts have been moved to their respective main artifacts. The <code translate="no" dir="ltr">-ktx</code> artifacts will continue to be published, but are completely empty.</li> <li>The <code translate="no" dir="ltr">navigation-fragment</code> artifact now contains a prebuilt implementation of a <a href="/guide/topics/ui/layout/twopane">two pane layout</a> via the new <code translate="no" dir="ltr">AbstractListDetailFragment</code>. This fragment uses a <code translate="no" dir="ltr">SlidingPaneLayout</code> to manage a list pane (which your subclass provides) and a detail pane, which uses a <code translate="no" dir="ltr">NavHostFragment</code> as its implementation, as seen in our <a href="https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:navigation/integration-tests/testapp/src/main/java/androidx/navigation/testapp/TwoPaneFragment.kt">example implementation</a>.</li> <li>The <code translate="no" dir="ltr">currentBackStackEntryAsFlow()</code> method on <code translate="no" dir="ltr">NavController</code> provides a <code translate="no" dir="ltr">Flow</code> that emits whenever the current <code translate="no" dir="ltr">NavBackStackEntry</code> changes. This flow can be used as an alternative to manually managing an <code translate="no" dir="ltr">OnDestinationChangedListener</code>.</li> <li>NavController now offers the ability to retrieve a list of all visible <code translate="no" dir="ltr">NavBackStackEntry</code> instances as a <code translate="no" dir="ltr">StateFlow</code> via the experimental <code translate="no" dir="ltr">visibleEntries</code> property.</li> <li>It is now possible to extend the <code translate="no" dir="ltr">NavType</code> class to create custom NavTypes. Custom types are supported only when building your navigation graph programmatically, such as via the <a href="/guide/navigation/navigation-kotlin-dsl">Navigation Graph Kotlin DSL</a>.</li> <li><p>Navigation now provides<code translate="no" dir="ltr">findStartDestination()</code> and <code translate="no" dir="ltr">getHierarchy()</code> APIs that can be used to help implement custom NavigationUI. <code translate="no" dir="ltr">findStartDestination()</code> is an extension function on <code translate="no" dir="ltr">NavGraph</code> that will locate the actual start destination that will be displayed when you navigate to the graph, even if the <code translate="no" dir="ltr">startDestination</code> is itself a nested <code translate="no" dir="ltr">NavGraph</code>. <code translate="no" dir="ltr">getHierarchy()</code> is a function on <code translate="no" dir="ltr">NavDestination</code> that can be used to verify if a given destination is within the hierarchy of another.</p> <pre class="prettyprint lang-Kotlin" translate="no" dir="ltr"><code translate="no" dir="ltr">val matchingRoute: Boolean = destination.hierarchy.any { it.route == routeToFind } </code></pre></li> <li><p><code translate="no" dir="ltr">NavigationUI</code> methods that took a <code translate="no" dir="ltr">BottomNavigationView</code> have been updated to instead take its superclass introduced in Material <code translate="no" dir="ltr">1.4.0</code>, <code translate="no" dir="ltr">NavigationBarView</code>. This allows these methods to be used with the <code translate="no" dir="ltr">NavigationRailView</code>.</p></li> <li><p>When inflating an <code translate="no" dir="ltr">&lt;action&gt;</code> element via XML, animation attributes can use attributes pulled from your theme using the <code translate="no" dir="ltr">app:enterAnim=&quot;?attr/transitionEnter&quot;</code> syntax.</p></li> <li><p>Safe Args now generates a <code translate="no" dir="ltr">fromSavedStateHandle()</code> method for each <code translate="no" dir="ltr">NavArgs</code> class. (<a href="https://github.com/androidx/androidx/pull/122">#122</a>, <a href="https://issuetracker.google.com/136967621">b/136967621</a>)</p> <pre class="prettyprint lang-Kotlin" translate="no" dir="ltr"><code translate="no" dir="ltr">class HomeViewModel(savedStateHandle: SavedStateHandle) : ViewModel() { // Create a HomeDestinationArgs class with type safe accessors for each argument // defined on your destination private val args = HomeDestinationArgs.fromSavedStateHandle(savedStateHandle) } </code></pre></li> </ul> <p><strong>Navigation Routes and the Kotlin DSL</strong></p> <p>Previous versions of Navigation relied on each destination having a constant integer ID that would uniquely identify it from its sibling destinations and allow you to <code translate="no" dir="ltr">navigate()</code> to that destination either directly or via an action. While this continues to be valid and useful, particularly in cases where you are defining your navigation graph in XML and can use auto-generated <code translate="no" dir="ltr">R.id</code> constants or Safe Args (which uses those constants to generate code at build time), this system of unique integers did not capture the semantic meaning and expressiveness needed to support fully dynamic graphs built programmatically at runtime via the <a href="https://developer.android.com/guide/navigation/navigation-kotlin-dsl">Navigation Kotlin DSL</a>.</p> <p>This release introduces a new option for uniquely identifying a destination in a navigation graph by its <strong>route</strong>. A <strong>route</strong> is a <code translate="no" dir="ltr">String</code> that defines the unique path to a destination. All Kotlin DSL methods that took a destination ID are now deprecated and replaced with an equivalent API that takes a route.</p> <p>Each route should be treated as the ‘path’ part of a <code translate="no" dir="ltr">Uri</code> that defines that destination, e.g., <code translate="no" dir="ltr">home</code>, <code translate="no" dir="ltr">profile/{userId}</code>, <code translate="no" dir="ltr">profile/{userId}/friends</code>, etc. When the identity of a destination is associated with a specific piece of content, those dynamic arguments should be part of the route, following the same rules as <a href="https://developer.android.com/guide/navigation/navigation-deep-link#implicit">implicit deep links</a>.</p> <p>All <code translate="no" dir="ltr">NavController</code> APIs that used to only take an ID now have an overload that takes a route <code translate="no" dir="ltr">String</code>. This includes <code translate="no" dir="ltr">navigate()</code>, <code translate="no" dir="ltr">popBackStack()</code>, <code translate="no" dir="ltr">popUpTo()</code>, and <code translate="no" dir="ltr">getBackStackEntry()</code>.</p> <p>This has had some API implications:</p> <ul> <li>The <code translate="no" dir="ltr">popUpTo</code> Kotlin property on the Kotlin DSL has been deprecated in favor of <code translate="no" dir="ltr">popUpToId</code>.</li> <li>The <code translate="no" dir="ltr">getStartDestination()</code> API has been deprecated in favor of <code translate="no" dir="ltr">getStartDestinationId()</code>.</li> </ul> <p>Unlike when navigating by ID, navigating by route follows the same rules as <a href="https://developer.android.com/guide/navigation/navigation-deep-link#implicit">implicit deep links</a> in that you can directly navigate to any destination in any nested graph, ensuring that these routes are usable in <a href="https://developer.android.com/guide/navigation/navigation-multi-module">multi-module projects</a> without explicitly adding an externally visible deep link to each destination.</p> <p><strong>Navigation Compose</strong></p> <p>The <code translate="no" dir="ltr">navigation-compose</code> artifact provides integration between the <a href="/navigation">Navigation Component</a> and <a href="/jetpack/compose">Jetpack Compose</a>. It uses <code translate="no" dir="ltr">@Composable</code> functions as the destinations in your application.</p> <p>This release provides:</p> <ul> <li>A <code translate="no" dir="ltr">NavHost</code> composable that allows you to construct your navigation graph via a Kotlin DSL, using <code translate="no" dir="ltr">composable</code> and <code translate="no" dir="ltr">dialog</code> destinations, plus support for optional Navigators such as those from <a href="https://google.github.io/accompanist/navigation-material/">Accompanist Navigation Material</a>.</li> <li>Mandatory support for crossfading between destinations. <a href="https://google.github.io/accompanist/navigation-animation/">Accompanist Navigation Animation</a> can be used to control the enter and exit transitions using experimental Compose APIs.</li> <li>Scoping of a <code translate="no" dir="ltr">Lifecycle</code> to each composable destination. Each destination only reaches the <code translate="no" dir="ltr">RESUMED</code> state when any entering transitions finish and immediately drops to <code translate="no" dir="ltr">STARTED</code> when any exiting transitions start, thus allowing you to avoid all <code translate="no" dir="ltr">IllegalStateException</code> and multi-touch issues by only triggering a <code translate="no" dir="ltr">navigate</code> call when the <code translate="no" dir="ltr">Lifecycle</code> is <code translate="no" dir="ltr">RESUMED</code>.</li> <li>Scoping of <code translate="no" dir="ltr">ViewModel</code> (via the <code translate="no" dir="ltr">viewModel()</code> API of <a href="/jetpack/androidx/releases/lifecycle#2.4.0">Lifecycle ViewModel Compose <code translate="no" dir="ltr">2.4.0</code></a> or <code translate="no" dir="ltr">hiltViewModel()</code> of <a href="/jetpack/androidx/releases/hilt#hilt-navigation-compose-1.0.0">Hilt Navigation Compose <code translate="no" dir="ltr">1.0.0</code></a> at the destination level, providing a scope that survives configuration changes and being on the back stack (when your Composable content is otherwise disposed) and a signal in the ViewModel’s <code translate="no" dir="ltr">onCleared()</code> that indicates the permanent disposal and cleaning up of state associated with that <code translate="no" dir="ltr">NavBackStackEntry</code>.</li> <li>Scoping of <code translate="no" dir="ltr">rememberSaveable</code> state at a destination level, ensuring that all composable state is saved and restored automatically when you return to a destination.</li> <li>Full support for saving and restoring the state of the <code translate="no" dir="ltr">NavController</code> and its destination’s state after process death and recreation.</li> <li>Automatic integration with the system back button.</li> <li><p>Support for passing arguments, attaching deep links to destinations, and returning a result to previous destinations.</p></li> <li><p>Compose specific helpers in <code translate="no" dir="ltr">rememberNavController()</code> and <code translate="no" dir="ltr">currentBackStackEntryAsState()</code> to allow <a href="/jetpack/compose/state#state-hoisting">hoisting state</a> and connecting the <code translate="no" dir="ltr">NavController</code> to composables outside of the <code translate="no" dir="ltr">NavHost</code> (such as a bottom navigation bar).</p></li> </ul> <pre class="prettyprint lang-Kotlin" translate="no" dir="ltr"><code translate="no" dir="ltr">val navController = rememberNavController() Scaffold { innerPadding -&gt; NavHost(navController, &#34;home&#34;, Modifier.padding(innerPadding)) { composable(&#34;home&#34;) { // This content fills the area provided to the NavHost HomeScreen() } dialog(&#34;detail_dialog&#34;) { // This content will be automatically added to a Dialog() composable // and appear above the HomeScreen or other composable destinations DetailDialogContent() } } } </code></pre> <p>See the <a href="/jetpack/compose/navigation">Compose Navigation guide</a> for more information.</p> <p><strong>Multiple back stacks</strong></p> <p>The NavController is responsible for managing the back stack of destinations, adding destinations to the back stack when you <code translate="no" dir="ltr">navigate()</code> to them and removing them when you call <code translate="no" dir="ltr">popBackStack()</code> or trigger the system back button. The existing <a href="/reference/kotlin/androidx/navigation/NavOptions"><code translate="no" dir="ltr">NavOptions</code></a> class and the integration into <code translate="no" dir="ltr">&lt;action&gt;</code> elements in the navigation graph XML has been expanded to support saving and restoring the back stack.</p> <p>As part of this change, the <code translate="no" dir="ltr">NavigationUI</code> methods of <code translate="no" dir="ltr">onNavDestinationSelected()</code>, <code translate="no" dir="ltr">BottomNavigationView.setupWithNavController()</code> and <code translate="no" dir="ltr">NavigationView.setupWithNavController()</code> now automatically save and restore the state of popped destinations, enabling support for multiple back stacks without any code changes. When using Navigation with Fragments, this is the recommended way to integrate with multiple back stacks.</p> <p>The underlying APIs for saving and restoring the state are exposed via a number of surfaces:</p> <ul> <li><p>In Navigation XML, the <code translate="no" dir="ltr">&lt;action&gt;</code> element can now use the boolean attributes of <code translate="no" dir="ltr">app:popUpToSaveState</code> and <code translate="no" dir="ltr">app:restoreState</code> to save the state of any destinations popped via <code translate="no" dir="ltr">app:popUpTo</code> and restore the state associated with the destination passed as the <code translate="no" dir="ltr">app:destination</code>:</p> <pre class="prettyprint lang-Xml" translate="no" dir="ltr"><code translate="no" dir="ltr">&lt;action android:id=”@+id/swap_stack” app:destination=”@id/second_stack” app:restoreState=”true” app:popUpTo=”@id/first_stack_start_destination” app:popUpToSaveState=”true” /&gt; </code></pre></li> <li><p>In the <a href="/reference/kotlin/androidx/navigation/package-summary#navoptions"><code translate="no" dir="ltr">navOptions</code> Kotlin DSL</a>, you can add the <code translate="no" dir="ltr">restoreState</code> boolean property and the <code translate="no" dir="ltr">saveState</code> boolean property on the <a href="/reference/kotlin/androidx/navigation/NavOptionsBuilder#popupto"><code translate="no" dir="ltr">popUpTo</code> builder</a>:</p> <pre class="prettyprint lang-Kotlin" translate="no" dir="ltr"><code translate="no" dir="ltr">// Use the navigate() method that takes a navOptions DSL Builder navController.navigate(selectedBottomNavRoute) { launchSingleTop = true restoreState = true popUpTo(navController.graph.findStartDestination().id) { saveState = true } } </code></pre></li> <li><p>In manually building a <code translate="no" dir="ltr">NavOptions</code> object via the <a href="/reference/kotlin/androidx/navigation/NavOptions.Builder"><code translate="no" dir="ltr">NavOptions.Builder</code></a>, you can use the <code translate="no" dir="ltr">setRestoreState()</code> and new overload to <code translate="no" dir="ltr">setPopUpTo()</code> that takes an additional <code translate="no" dir="ltr">saveState</code> parameter.</p> <pre class="prettyprint lang-Java" translate="no" dir="ltr"><code translate="no" dir="ltr">NavOptions navOptions = new NavOptions.Builder() .setLaunchSingleTop(true) .setRestoreState(true) .setPopUpTo(NavGraph.findStartDestination(navController.getGraph()).getId(), false, // inclusive true) // saveState .build(); navController.navigate(selectedBottomNavId, null, navOptions); </code></pre></li> <li><p>Programmatic calls to <a href="/reference/kotlin/androidx/navigation/NavController#popbackstack"><code translate="no" dir="ltr">popBackStack()</code></a> can now include an additional <code translate="no" dir="ltr">saveState</code> parameter.</p></li> <li><p>You can use the <code translate="no" dir="ltr">clearBackStack()</code> method to clear any state that was saved with <code translate="no" dir="ltr">popBackStack()</code> or <code translate="no" dir="ltr">popUpToSaveState</code>.</p></li> </ul> <p>In all cases, the <code translate="no" dir="ltr">NavController</code> will save and restore the state of each <code translate="no" dir="ltr">NavBackStackEntry</code>, including any navigation destination scoped <code translate="no" dir="ltr">ViewModel</code> instances. The <a href="/reference/kotlin/androidx/navigation/Navigator"><code translate="no" dir="ltr">Navigator</code></a> APIs have been updated to enable each <code translate="no" dir="ltr">Navigator</code> to support saving and restoring their own state.</p> <p><strong>Behavior changes</strong></p> <ul> <li><code translate="no" dir="ltr">NavDeepLinkBuilder</code> now adds <code translate="no" dir="ltr">PendingIntent.FLAG_IMMUTABLE</code> to the <code translate="no" dir="ltr">PendingIntent</code> returned by <code translate="no" dir="ltr">createPendingIntent()</code>, ensuring that this API works as expected when targeting Android 12.</li> <li>Navigation now depends on <a href="/jetpack/androidx/releases/lifecycle#2.3.1">Lifecycle <code translate="no" dir="ltr">2.3.1</code></a> and now marks <code translate="no" dir="ltr">setGraph()</code>, <code translate="no" dir="ltr">popBackStack()</code>, <code translate="no" dir="ltr">navigateUp()</code>, and <code translate="no" dir="ltr">navigate()</code>, the methods that update the <code translate="no" dir="ltr">NavBackStackEntry</code> <code translate="no" dir="ltr">Lifecycle</code>, as <code translate="no" dir="ltr">@MainThread</code>, aligning Navigation with the main thread enforcement introduced in Lifecycle <code translate="no" dir="ltr">2.3.0</code>.</li> <li>Deep links now verify that all required arguments (those without default values) are present in the <code translate="no" dir="ltr">Uri</code>.</li> <li><code translate="no" dir="ltr">NavDeepLink</code> parsed arguments now consider pound signs in the same way as question marks as a separator between path segments, preventing an argument from spanning across the pound sign.</li> <li>When generating actions, Kotlin code generated from Safe Args now puts arguments without default values before those with default values as parameters.</li> <li>When generating arguments, Safe Args now puts parameters without default values before those with default values.</li> <li>Safe-Args now depends on Android Gradle Plugin 4.2.0. This means you should no longer get the using <code translate="no" dir="ltr">applicationIdTextResource</code> warning.</li> </ul> <p><strong>Known issues</strong></p> <ul> <li>Fixed in <a href="#2.5.0-alpha01">Navigation <code translate="no" dir="ltr">2.5.0-alpha01</code></a>: accessing a <code translate="no" dir="ltr">ViewModel</code> created via <code translate="no" dir="ltr">by navGraphViewModels()</code> from a Fragment&#39;s <code translate="no" dir="ltr">onCreate()</code> will fail with an <code translate="no" dir="ltr">IllegalStateException</code>. (<a href="https://issuetracker.google.com/213504272">b/213504272</a>)</li> <li>Fixed in <a href="#2.5.0-alpha01">Navigation <code translate="no" dir="ltr">2.5.0-alpha01</code></a>: Safe Args 2.4.0 is incompatible with Android Gradle Plugin 7.1.0 and higher. (<a href="https://issuetracker.google.com/213086135">b/213086135</a>)</li> <li>Deep linking with multiple nested nav graphs doesn&#39;t correctly create the full backstack. (<a href="https://issuetracker.google.com/214383060">b/214383060</a>)</li> </ul> <h3 id="2.4.0-rc01" data-text="Version 2.4.0-rc01" tabindex="-1">Version 2.4.0-rc01</h3> <p>December 15, 2021</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.4.0-rc01</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/f07d12061370a603549747200c79b60239706330..ee27dabb830fecc2bb6899cb460d977a31d90612/navigation">Version 2.4.0-rc01 contains these commits.</a></p> <p><strong>Behavior changes</strong></p> <ul> <li><code translate="no" dir="ltr">NavDeepLink</code> parsed arguments now consider pound signs in the same way as question marks as a separator between arguments. (<a href="https://android-review.googlesource.com/#/q/I213095f3a5a34962657feb0e8631589765b0a1ca">I21309</a>, <a href="https://issuetracker.google.com/issues/180042703">b/180042703</a>)</li> </ul> <p><strong>Bug Fixes</strong></p> <ul> <li>Deeplinks will no longer ignore arguments with values that are the same as the name of the placeholder. (<a href="https://android-review.googlesource.com/#/q/If8017489c9f36da2f20876313356f42ae8bfc208">If8017</a>, <a href="https://issuetracker.google.com/issues/207389470">b/207389470</a>)</li> <li><code translate="no" dir="ltr">NavController</code> will no longer crash when popping a nested destination using transitions after the <code translate="no" dir="ltr">NavController</code> has been restored. (<a href="https://android-review.googlesource.com/#/q/I0f7c990620f9e16cb96e2076ce0104916a47e0f0">I0f7c9</a>, <a href="https://issuetracker.google.com/issues/205021623">b/205021623</a>)</li> <li>The error message when using an invalid <code translate="no" dir="ltr">startDestination</code> will now default to the start destination&#39;s route if one is available. (<a href="https://android-review.googlesource.com/#/q/I86b9d0aff3e758729e83b08f7aa538d4547782e7">I86b9d</a>, <a href="https://issuetracker.google.com/issues/208041894">b/208041894</a>)</li> </ul> <p><strong>Navigation Compose Bug Fixes</strong></p> <ul> <li>Fixed potential crash caused by fast switching between the start destination and another destination using bottom nav menu items. (<a href="https://android-review.googlesource.com/#/q/Ic89766e6f0527af0cd3e793643c38ea9e1f2a272">Ic8976</a>, <a href="https://issuetracker.google.com/issues/208887901">b/208887901</a>)</li> <li>Dialog destination are now properly restored on top of the screen after config changes or process death. (<a href="https://android-review.googlesource.com/#/q/I4c0dce39bbbe26d05d0cb60c65c6e5fcfbbc62b2">I4c0dc</a>, <a href="https://issuetracker.google.com/issues/207386169">b/207386169</a>)</li> <li>Fixed an issue where attempting to retrieve a <code translate="no" dir="ltr">ViewModel</code> from a dialog’s <code translate="no" dir="ltr">NavBackStackEntry</code> would fail when the dialog was dismissed. (<a href="https://android-review.googlesource.com/#/q/I6b96d1ce4bcd703340c1d20968d2416c56b9fe46">I6b96d</a>, <a href="https://issuetracker.google.com/issues/206465487">b/206465487</a>)</li> <li>Fixed an issue when using <code translate="no" dir="ltr">activity</code> destinations with Navigation Compose&#39;s <code translate="no" dir="ltr">NavHost</code> that would result in infinite recompositions. (<a href="https://android-review.googlesource.com/#/q/I8f64c2edbd87f77662f8b92a6101c179a1eee585">I8f64c</a>)</li> <li>Fixed a leak in Navigation Compose where it was holding on to a reference of the old activity after a config change or process death. (<a href="https://android-review.googlesource.com/#/q/I4efcb0709b3864dde243d011548d801fcef24159">I4efcb</a>, <a href="https://issuetracker.google.com/issues/204905432">b/204905432</a>)</li> </ul> <p><strong>Safe Args Bug Fixes</strong></p> <ul> <li><code translate="no" dir="ltr">SafeArgs</code> no longer crashes when attempting to restore custom parcelable arrays after process death. (<a href="https://android-review.googlesource.com/#/q/I618e8b5027ef6c8b95c1696eddf3bdf7dd15ac4d">I618e8</a>, <a href="https://issuetracker.google.com/issues/207315994">b/207315994</a>)</li> <li>Fixed a bug in safe args that would not allow boolean arrays to have a <code translate="no" dir="ltr">null</code> value. (<a href="https://android-review.googlesource.com/#/q/I8c396c8f174d5924bb5ee147261de158256fba94">I8c396</a>, <a href="https://issuetracker.google.com/issues/174787525">b/174787525</a>)</li> </ul> <h3 id="2.4.0-beta02" data-text="Version 2.4.0-beta02" tabindex="-1">Version 2.4.0-beta02</h3> <p>November 3, 2021</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.4.0-beta02</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/4414c046f9f3ceed61638de755aac5f976f4d4b7..f07d12061370a603549747200c79b60239706330/navigation">Version 2.4.0-beta02 contains these commits.</a></p> <p><strong>API Changes</strong></p> <ul> <li>The handling of both explicit and implicit deep links now automatically adds the <code translate="no" dir="ltr">saveState</code> flag when navigating to another graph, ensuring that code such as <code translate="no" dir="ltr">NavigationUI.setupWithNavController</code> and code using multiple back stacks works as expected. (<a href="https://android-review.googlesource.com/#/q/Ic8807b65fbcaf8d859f2ac35a45d508d2714231e">Ic8807</a>)</li> </ul> <p><strong>Behavior Changes</strong></p> <ul> <li>Deep link patterns are now compiled lazily in NavDeepLink instead of during inflation. This should improve the inflation time of navigation graphs that include deep links. (<a href="https://android-review.googlesource.com/#/q/b8d257d8ea213126b304813c6d70cc5986e97d3e">b8d257</a>, <a href="https://issuetracker.google.com/issues/184149935">b/184149935</a>)</li> </ul> <p><strong>Bug Fixes</strong></p> <ul> <li>Fixed an issue where NavBackStackEntries were being pushed down to <code translate="no" dir="ltr">Lifecycle.State.CREATED</code> after moving to <code translate="no" dir="ltr">Lifecycle.State.STARTED</code> when the <code translate="no" dir="ltr">NavHost</code> is added directly to the activity&#39;s <code translate="no" dir="ltr">setContent()</code>. (<a href="https://android-review.googlesource.com/#/q/Ia5ac1c2c7e83f90780dd85187519c08debaa6eca">Ia5ac1</a>, <a href="https://issuetracker.google.com/issues/203536683">b/203536683</a>)</li> <li>Fixed a race condition where popping a <code translate="no" dir="ltr">DialogFragment</code> destination off of the back stack before the dialog was actually shown would not actually dismiss the dialog, resulting in a crash when the errant dialog was manually dismissed by the user. (<a href="https://android-review.googlesource.com/#/q/I687e5c540686b7eedf96a2c8875e6e456840ca69">I687e5</a>)</li> <li>Fixed an issue where the <code translate="no" dir="ltr">onNavDestinationSelected</code> API on <code translate="no" dir="ltr">NavigationUI</code> would return <code translate="no" dir="ltr">true</code> even if you didn&#39;t actually <code translate="no" dir="ltr">navigate()</code> to that navigation graph. It now uses the same logic used internally by <code translate="no" dir="ltr">setupWithNavController</code> to only select the <code translate="no" dir="ltr">MenuItem</code> associated with the current destination using the <code translate="no" dir="ltr">hierarchy</code> of the destination. (<a href="https://android-review.googlesource.com/#/q/I2b053225195ac72ee7e2e6aabebcbb0b97418ec0">I2b053</a>)</li> </ul> <h3 id="2.4.0-beta01" data-text="Version 2.4.0-beta01" tabindex="-1">Version 2.4.0-beta01</h3> <p>October 27, 2021</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.4.0-beta01</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/418e77ded6b319212f986a3d211532a4b89f2468..4414c046f9f3ceed61638de755aac5f976f4d4b7/navigation">Version 2.4.0-beta01 contains these commits.</a></p> <p><strong>New Features</strong></p> <ul> <li>You can now use <code translate="no" dir="ltr">by navGraphViewModel</code> with a route as an alternative to using an ID so as to better support using the Navigation Kotlin DSL with Fragments. (<a href="https://android-review.googlesource.com/#/q/I901e3832099e6e2a698e41af1e5e5d9bef7634d5">I901e3</a>, <a href="https://issuetracker.google.com/issues/201446416">b/201446416</a>)</li> </ul> <p><strong>API Changes</strong></p> <ul> <li>The <code translate="no" dir="ltr">visibleEntries</code> API is now experimental. (<a href="https://android-review.googlesource.com/#/q/I93f6fce8ecad6a57aad12aa042c1b1a5e5f9f004">I93f6f</a>)</li> </ul> <p><strong>Bug Fixes</strong></p> <ul> <li>ViewModels will no longer be destroyed when transitions are interrupted by navigating back and forth between the same screens (<a href="https://android-review.googlesource.com/#/q/Id52d8102f24b4b7d62ca2dd4c36c74c1ab7c11e5">Id52d8</a>, <a href="https://issuetracker.google.com/issues/200817333">b/200817333</a>)</li> <li>Nullable <code translate="no" dir="ltr">NavDeepLink</code> arguments no longer require a default value when adding deep links to <code translate="no" dir="ltr">NavDestination</code>s. (<a href="https://android-review.googlesource.com/#/q/I5aad4e1e7cc53857d050d328d099f813bc0dd0d9">I5aad4</a>, <a href="https://issuetracker.google.com/issues/201320030">b/201320030</a>)</li> <li>NavBackStackEntries now with different Lifecycles are not longer considered equal. This means NavHost will properly recompose all destinations when doing navigation with singleTop and when reselecting bottom menu items. (<a href="https://android-review.googlesource.com/#/q/I1b3510b238d3c4e6ed5cc86a6fddf795bd9acb02">I1b351</a>, <a href="https://issuetracker.google.com/issues/196997433">b/196997433</a>)</li> <li>Fixed an issue with <code translate="no" dir="ltr">AbstractListDetailFragment</code> that caused the <code translate="no" dir="ltr">layout_width</code> and <code translate="no" dir="ltr">layout_weight</code> attributes on the list pane returned by <code translate="no" dir="ltr">onCreateListPaneView()</code> to be incorrectly handled or ignored. (<a href="https://android-review.googlesource.com/#/q/f5fbf3227a0d9111f8d284398ad58554429046cb">f5fbf3</a>)</li> <li>The visual state of dialog destinations now correctly stays in sync with the <code translate="no" dir="ltr">DialogFragmentNavigator</code>&#39;s state. This means that manually calling the asynchronous <code translate="no" dir="ltr">dismiss()</code> API for <code translate="no" dir="ltr">DialogFragment</code> now properly clears all dialog destinations above the now dismissed dialog. This does not affect cases where you use <code translate="no" dir="ltr">popUpTo</code> or <code translate="no" dir="ltr">popBackStack()</code> to dismiss your dialog. (<a href="https://android-review.googlesource.com/#/q/I77ba23fb7a816fc555d0c383213cac01cbafee43">I77ba2</a>)</li> <li><code translate="no" dir="ltr">AbstractAppBarOnDestinationChangedListener</code> now has clearer error messaging for <code translate="no" dir="ltr">onDestinationChanged()</code>. (<a href="https://android-review.googlesource.com/#/q/Ie742de2163740a4050d4c80f3f">Ie742d</a>)</li> </ul> <h3 id="2.4.0-alpha10" data-text="Version 2.4.0-alpha10" tabindex="-1">Version 2.4.0-alpha10</h3> <p>September 29, 2021</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.4.0-alpha10</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/1a3dcfb231517d6104969f17063fcc6c97ba6eeb..1f6bc4d47b7be46a5af151ed726e84db0a1cf9f9/navigation">Version 2.4.0-alpha10 contains these commits.</a></p> <p><strong>New Features</strong></p> <ul> <li>NavController now offers the ability to retrieve a list of all visible <code translate="no" dir="ltr">NavBackStackEntry</code> instances via the <code translate="no" dir="ltr">visibleEntries</code> StateFlow (<a href="https://android-review.googlesource.com/#/q/Ia964e808d2e2a2c3d3e60eea7713ce86fec7ee0d">Ia964e</a>)</li> <li><code translate="no" dir="ltr">rememberNavController()</code> now takes a optional set of <code translate="no" dir="ltr">Navigator</code> instances that will be added to the returned <code translate="no" dir="ltr">NavController</code> to better support optional Navigators such as those from <a href="https://google.github.io/accompanist/navigation-material/">Accompanist Navigation Material</a>. (<a href="https://android-review.googlesource.com/#/q/I4619e6c4b47fc76c45a64c68085519fd8d18f699">I4619e</a>)</li> </ul> <p><strong>Bug Fixes</strong></p> <ul> <li>Dynamic Navigation will no longer crash when the Activity is recreated. (<a href="https://android-review.googlesource.com/#/q/Ifa6a3e2f563bbe181cb1fdfb8460217e77bb9338">Ifa6a3</a>, <a href="https://issuetracker.google.com/issues/197942869">b/197942869</a>)</li> <li>Fixed an issue with the system back button that occurs only after popping back to a composable destination that contains a <code translate="no" dir="ltr">NavHost</code>. (<a href="https://android-review.googlesource.com/#/q/3ed14822dae6a7c72b8a070992800e0ebc7b5f39">3ed148</a>, <a href="https://issuetracker.google.com/issues/195668143">b/195668143</a>)</li> <li>SafeArgs now generates the arguments for <code translate="no" dir="ltr">fromBundle()</code> and <code translate="no" dir="ltr">fromSavedStateHandle()</code> in the proper parameter order. (<a href="https://android-review.googlesource.com/#/q/I824a871363ff0aaf5fa5ef608f103582e7abfc61">I824a8</a>, <a href="https://issuetracker.google.com/issues/200059831">b/200059831</a>)</li> </ul> <h3 id="2.4.0-alpha09" data-text="Version 2.4.0-alpha09" tabindex="-1">Version 2.4.0-alpha09</h3> <p>September 15, 2021</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.4.0-alpha09</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/47e81d1c497b8a57534a460c277855db1b0257ae..1a3dcfb231517d6104969f17063fcc6c97ba6eeb/navigation">Version 2.4.0-alpha09 contains these commits.</a></p> <p><strong>New Features</strong></p> <ul> <li>You can now use the <code translate="no" dir="ltr">clearBackStack()</code> method to clear any state that was saved with <code translate="no" dir="ltr">popBackStack()</code> or <code translate="no" dir="ltr">popUpToSaveState</code>. (<a href="https://android-review.googlesource.com/#/q/I80a0f7baf982d750383a7db7aa9311b4f8e2a77d">I80a0f</a>)</li> <li>You can now pass in a list of arguments and/or deep links to your nested navigation graph&#39;s builder and they will automatically be added to the resulting graph. (<a href="https://android-review.googlesource.com/#/q/I8a47074b68f36d9195f353ef7c726c75b8e1a73f">I8a470</a>, <a href="https://issuetracker.google.com/issues/182545357">b/182545357</a>)</li> </ul> <p><strong>API Changes</strong></p> <ul> <li>The <code translate="no" dir="ltr">navArgument</code> Kotlin DSL function is now part of <code translate="no" dir="ltr">navigation-common</code> instead of <code translate="no" dir="ltr">navigation-compose</code>. This will require updating imports to continue to use this function. (<a href="https://android-review.googlesource.com/#/q/I1d0958743bb7a5df957968c091e16078f3ffa8f1">I1d095</a>)</li> </ul> <p><strong>Behavior Changes</strong></p> <ul> <li>When generating arguments, Safe Args now puts parameters without default values before those with default values. (<a href="https://android-review.googlesource.com/#/q/I8970968c48deb3a1437437df9a3db696ed497372">I89709</a>, <a href="https://issuetracker.google.com/issues/198493585">b/198493585</a>)</li> </ul> <p><strong>Bug Fixes</strong></p> <ul> <li>When using Navigation Compose, NavGraphs will only be <code translate="no" dir="ltr">DESTROYED</code> once all their children are <code translate="no" dir="ltr">DESTROYED</code>. (<a href="https://android-review.googlesource.com/#/q/I86552cc841eee95858ff23a1fce895e5d47c9746">I86552</a>, <a href="https://issuetracker.google.com/issues/198741720">b/198741720</a>)</li> <li>Nullable <code translate="no" dir="ltr">NavDeepLink</code> arguments no longer require a default value. (<a href="https://android-review.googlesource.com/#/q/Ia14ef04bfe5b25942163688f40adacc30fa7e044">Ia14ef</a>, <a href="https://issuetracker.google.com/issues/198689811">b/198689811</a>)</li> <li>Calling <code translate="no" dir="ltr">setGraph()</code> with a new graph will now also clear any saved back stacks in addition to its previous behavior of popping the back stack. (<a href="https://android-review.googlesource.com/#/q/I97f96a65efea43d4341c9572c3c1c63f343ab6ed">I97f96</a>)</li> <li>Fixed an issue where <code translate="no" dir="ltr">OnDestinationChangedListener</code> instances and the <code translate="no" dir="ltr">currentBackStackEntryFlow</code> were not notified when using <code translate="no" dir="ltr">launchSingleTop</code>. (<a href="https://android-review.googlesource.com/#/q/Iaaebc611c1134bec9a31a088742f66c30888f0f4">Iaaebc</a>)</li> </ul> <p><strong>Dependency Updates</strong></p> <ul> <li>Navigation Compose now depends on <a href="/jetpack/androidx/releases/activity#1.3.1">Activity Compose 1.3.1</a>. (<a href="https://android-review.googlesource.com/#/q/I05829230af5c04cb1a284a5f6c9bcb14f24b0fc1">I05829</a>)</li> <li>Navigation Compose now depends on <a href="/jetpack/androidx/releases/lifecycle#2.4.0-beta01">Lifecycle ViewModel Compose <code translate="no" dir="ltr">2.4.0-beta01</code></a>. (<a href="https://android-review.googlesource.com/#/q/Ib86a3ced486d87cd214b696123335ab8c5dd120b">Ib86a3</a>)</li> </ul> <h3 id="2.4.0-alpha08" data-text="Version 2.4.0-alpha08" tabindex="-1">Version 2.4.0-alpha08</h3> <p>September 1, 2021</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.4.0-alpha08</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/1e0ab9e58c3c2ebe8152b7507938aef7e9c1acdc..47e81d1c497b8a57534a460c277855db1b0257ae/navigation">Version 2.4.0-alpha08 contains these commits.</a></p> <p><strong>New Features</strong></p> <ul> <li>It is now possible to extend the <code translate="no" dir="ltr">NavType</code> class to create custom NavTypes. Custom types are supported only when building your navigation graph programmatically, such as via the <a href="/guide/navigation/navigation-kotlin-dsl">Navigation Graph Kotlin DSL</a>. (<a href="https://android-review.googlesource.com/#/q/I78440758311840441dd785cfaed6795fff2b56da">I78440</a>, <a href="https://issuetracker.google.com/issues/196871885">b/196871885</a>)</li> </ul> <p><strong>Behavior Changes</strong></p> <ul> <li>When generating actions, Kotlin code generated from Safe Args now puts arguments without default values before those with default values as parameters. (<a href="https://android-review.googlesource.com/#/q/Idb69783a3b0efe53de8f3e04a978dd6b979a0e04">Idb697</a>, <a href="https://issuetracker.google.com/issues/188855904">b/188855904</a>)</li> <li>Deep links now verify that all required arguments (those without default values) are present in the <code translate="no" dir="ltr">Uri</code>. (<a href="https://github.com/androidx/androidx/pull/204">#204</a>, <a href="https://issuetracker.google.com/issues/185527157">b/185527157</a>)</li> </ul> <p><strong>Bug Fixes</strong></p> <ul> <li>Using <code translate="no" dir="ltr">getBackStackEntry</code> and <code translate="no" dir="ltr">previousBackStackEntry</code> inside composable(), in conjunction with <code translate="no" dir="ltr">remember()</code>, will no longer cause an exception for no destination being on the back stack. (<a href="https://android-review.googlesource.com/#/q/I75138d24d27dac83b5301507161578ac811454e3">I75138</a>, <a href="https://issuetracker.google.com/issues/194313238">b/194313238</a>)</li> <li>Navigation Compose now properly recomposes when changing back stack arguments and using <code translate="no" dir="ltr">launchSingleTop=true</code>. (<a href="https://android-review.googlesource.com/#/q/Iebd698c9e310ad84ce65238c8a5a33db86a9f1f7">Iebd69</a>, <a href="https://issuetracker.google.com/issues/186392337">b/186392337</a>)</li> <li>There will no longer be an <code translate="no" dir="ltr">ArrayIndexOutOfBoundsException</code> when calling <code translate="no" dir="ltr">setGraph</code> with a graph with 13 or 29 destinations. (<a href="https://android-review.googlesource.com/#/q/I1a9f17c4616bc38dd3dd89cb1da29814c3dfd512">I1a9f1</a>, <a href="https://issuetracker.google.com/issues/195171984">b/195171984</a>)</li> <li>The SafeArgs java generator should no longer cause lint warnings when generating Args classes. (<a href="https://android-review.googlesource.com/#/q/I1a6661b10b8e380aaa9fcfd1fc710c35b047bd6d">I1a666</a>, <a href="https://issuetracker.google.com/issues/185843837">b/185843837</a>)</li> </ul> <p><strong>External Contribution</strong></p> <ul> <li>Thanks <a href="https://github.com/osipxd">ospixd</a> for ensuring that deep links verify that all required arguments (those without default values) are present in the <code translate="no" dir="ltr">Uri</code>. (<a href="https://github.com/androidx/androidx/pull/204">#204</a>, <a href="https://issuetracker.google.com/issues/185527157">b/185527157</a>)</li> </ul> <h3 id="2.4.0-alpha07" data-text="Version 2.4.0-alpha07" tabindex="-1">Version 2.4.0-alpha07</h3> <p>August 18, 2021</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.4.0-alpha07</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/175c082bd7563f6414a75b30d2ce3d167c5e7f3a..1e0ab9e58c3c2ebe8152b7507938aef7e9c1acdc/navigation">Version 2.4.0-alpha07 contains these commits.</a></p> <p><strong>Bug Fixes</strong></p> <ul> <li>Navigation Compose now properly saves state after configuration changes and when changing graphs while using the multiple back stack feature. (<a href="https://android-review.googlesource.com/#/q/If5a3d68c4a610f008ab6823a3982f0d0c312083a">If5a3d</a>, <a href="https://issuetracker.google.com/issues/195141957">b/195141957</a>)</li> <li>Re-selecting the same tab when using navigation compose with multiple back stacks will no longer result in a blank screen. (<a href="https://android-review.googlesource.com/#/q/I860dc9f2cc2516924c03dba491a37aa8ace99bb3">I860dc</a>, <a href="https://issuetracker.google.com/issues/194925622">b/194925622</a>)</li> <li><code translate="no" dir="ltr">NavHost</code> now observes for changes in the <code translate="no" dir="ltr">Lifecycle.State</code> of <code translate="no" dir="ltr">NavBackStackEntry</code>s which means using a <code translate="no" dir="ltr">NavHost</code> in a fragment now will properly be recomposed as the lifecycle changes instead of resulting in a blank screen. (<a href="https://android-review.googlesource.com/#/q/I4eb8586e4db4bebfac63525e9dcdab11b57fcff5">I4eb85</a>, <a href="https://issuetracker.google.com/issues/195864489">b/195864489</a>)</li> <li>Fixed an issue where dismissing a <code translate="no" dir="ltr">DialogFragment</code> would not correctly update the <code translate="no" dir="ltr">NavController</code> state after recreating your activity (i.e., after a configuration change). (<a href="https://android-review.googlesource.com/#/q/Icd72b58ece54484b576b44fc2fb9dbf68ccb9ab9">Icd72b</a>)</li> <li>Fixed an issue where popping a dialog destination would not update the NavController&#39;s system back button handling, potentially causing the NavController to intercept the back button even though it does not have any back stack to pop. (<a href="https://android-review.googlesource.com/#/q/If3b3464fea674b146f071448373afbac49f8cdc5">If3b34</a>)</li> <li>Safe-args now automatically generates a <code translate="no" dir="ltr">toSavedStateHandle</code> method for arguments which can be used to test your <code translate="no" dir="ltr">ViewModel</code> code. (<a href="https://android-review.googlesource.com/#/q/If1e2debe0126482e571cae59bcc89e27db63483d">If1e2d</a>, <a href="https://issuetracker.google.com/issues/193353880">b/193353880</a>)</li> </ul> <h3 id="2.4.0-alpha06" data-text="Version 2.4.0-alpha06" tabindex="-1">Version 2.4.0-alpha06</h3> <p>August 4, 2021</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.4.0-alpha06</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/97264aa4532db7f7db1ffb3f42f3a9204971dbfc..d725303accfa9be6d5c3d61c7603ed1b9a780cbd/navigation">Version 2.4.0-alpha06 contains these commits.</a></p> <p><strong>API Changes</strong></p> <ul> <li>The <code translate="no" dir="ltr">requireSlidingPaneLayout()</code> and <code translate="no" dir="ltr">requireDetailPaneNavHostFragment()</code> methods on <code translate="no" dir="ltr">AbstractListDetailFragment</code> have been renamed to <code translate="no" dir="ltr">getSlidingPaneLayout()</code> and <code translate="no" dir="ltr">getDetailPaneNavHostFragment()</code>, respectively. (<a href="https://android-review.googlesource.com/#/q/I34a0844edbccd871c37de5caf9cd4af62a7d0821">I34a08</a>)</li> </ul> <p><strong>Behavior Changes</strong></p> <ul> <li>When navigating with animations (like <code translate="no" dir="ltr">Crossfade</code>), the new destination’s <code translate="no" dir="ltr">Lifecycle</code> will now only reach the <code translate="no" dir="ltr">RESUMED</code> when the animation completes. (<a href="https://android-review.googlesource.com/#/q/If0543dd1c20e7338078115e98b5585623f9b8f1c">If0543</a>, <a href="https://issuetracker.google.com/issues/172112072">b/172112072</a>, <a href="https://issuetracker.google.com/issues/194301889">b/194301889</a>)</li> <li>Navigation Compose&#39;s <code translate="no" dir="ltr">NavHost</code> now sets the graph as part of the first composition. (<a href="https://android-review.googlesource.com/#/q/Ieb7be7689ab5c40cfcc52fefd70a87b406ce8c60">Ieb7be</a>)</li> </ul> <p><strong>Bug Fixes</strong></p> <ul> <li>Popping the last destination of a navigation graph no longer throws a <code translate="no" dir="ltr">ClassCastException</code>. (<a href="https://android-review.googlesource.com/#/q/If0543dd1c20e7338078115e98b5585623f9b8f1c">If0543</a>, <a href="https://issuetracker.google.com/issues/172112072">b/172112072</a>, <a href="https://issuetracker.google.com/issues/194301889">b/194301889</a>)</li> <li>Fixed a <code translate="no" dir="ltr">NullPointerException</code> that would occur when adding a deep link without a <code translate="no" dir="ltr">Uri</code> and navigating via a route or deep link. (<a href="https://android-review.googlesource.com/#/q/938a0cc7f71bf0c8c7556ef7fe2f772f9d0ec07c">938a0c</a>, <a href="https://issuetracker.google.com/193805425">b/193805425</a>)</li> <li>Fixed an issue in Navigation Compose where a deep linked <code translate="no" dir="ltr">NavBackStackEntry</code> would not reach the <code translate="no" dir="ltr">RESUMED</code> state. (<a href="https://android-review.googlesource.com/#/q/I192c5d5922901f94ea0cf5abe7a922c0a63cc033">I192c5</a>)</li> <li>Fixed an issue where popping a dialog destination would not update the NavController&#39;s system back button handling, potentially causing the NavController to intercept the back button even though it does not have any back stack to pop. (<a href="https://android-review.googlesource.com/c/platform/frameworks/support/+/1782668">aosp/1782668</a>)</li> </ul> <h3 id="2.4.0-alpha05" data-text="Version 2.4.0-alpha05" tabindex="-1">Version 2.4.0-alpha05</h3> <p>July 21, 2021</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.4.0-alpha05</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/19ae3a88ff0824d615355b492cb56049e16991f2..97264aa4532db7f7db1ffb3f42f3a9204971dbfc/navigation">Version 2.4.0-alpha05 contains these commits.</a></p> <p><strong>Behavior Changes</strong></p> <ul> <li>Navigation Compose’s <code translate="no" dir="ltr">NavHost</code> now always uses Crossfades when navigating through destinations. (<a href="https://android-review.googlesource.com/#/q/I07049268d9c78bfbc6bb49f94bf2a1284d4f1180">I07049</a>, <a href="https://issuetracker.google.com/issues/172112072">b/172112072</a>)</li> <li>You can now make changes to the graph of a NavHost. Graphs with the same startDestination and destinations in the graph will be considered equal and will not clear the <code translate="no" dir="ltr">NavController</code> back stack. (<a href="https://android-review.googlesource.com/#/q/I0b8dbcea4186232c3280c4a43be11e4fafcc6ce3">I0b8db</a>, <a href="https://issuetracker.google.com/issues/175392262">b/175392262</a>)</li> </ul> <p><strong>Bug Fixes</strong></p> <ul> <li>Fixed a <code translate="no" dir="ltr">NoSuchElementException</code> when calling <code translate="no" dir="ltr">popBackStack()</code> from within a <code translate="no" dir="ltr">LifecycleObserver</code> attached to a <code translate="no" dir="ltr">NavBackStackEntry</code> caused by reentrant updates to the NavController&#39;s state. (<a href="https://android-review.googlesource.com/#/q/I646215354c80b1c4571c7351b782db9897d1ddc2">I64621</a>)</li> <li><code translate="no" dir="ltr">AbstractListDetailFragment</code> now allows <code translate="no" dir="ltr">SlidingPaneLayout</code> to be completely stripped from your APK when <code translate="no" dir="ltr">AbstractListDetailFragment</code> is not used. (<a href="https://android-review.googlesource.com/#/q/I611adc2ebb2f61e7a51b2d9299902ff4656c6025">I611ad</a>)</li> <li><code translate="no" dir="ltr">NavGraph</code> and <code translate="no" dir="ltr">NavDestination</code> now override the equals method so two objects with the same values will be considered equal. (<a href="https://android-review.googlesource.com/#/q/I166eb54122cabc12cc569daea8eefcf8e0ec95a7">I166eb</a>, <a href="https://issuetracker.google.com/issues/175392262">b/175392262</a>)</li> </ul> <h3 id="2.4.0-alpha04" data-text="Version 2.4.0-alpha04" tabindex="-1">Version 2.4.0-alpha04</h3> <p>July 1, 2021</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.4.0-alpha04</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/ccf79f53033e665475116a4e78ff124df2a52c4b..19ae3a88ff0824d615355b492cb56049e16991f2/navigation">Version 2.4.0-alpha04 contains these commits.</a></p> <p><strong>New Features</strong></p> <ul> <li>The <code translate="no" dir="ltr">navigation-fragment</code> artifact now contains a prebuilt implementation of a <a href="/guide/topics/ui/layout/twopane">two pane layout</a> via the new <code translate="no" dir="ltr">AbstractListDetailFragment</code>. This fragment uses a <code translate="no" dir="ltr">SlidingPaneLayout</code> to manage a list pane (which your subclass provides) and a detail pane, which uses a <code translate="no" dir="ltr">NavHostFragment</code> as its implementation, as seen in our <a href="https://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:navigation/integration-tests/testapp/src/main/java/androidx/navigation/testapp/TwoPaneFragment.kt">example implementation</a>. (<a href="https://android-review.googlesource.com/#/q/Iac4be7b764ced86cdbff3c696c2cbdf2741eb81c">Iac4be</a>, <a href="https://issuetracker.google.com/issues/191276636">b/191276636</a>)</li> <li>The <code translate="no" dir="ltr">NavHost</code> of the <code translate="no" dir="ltr">navigation-compose</code> artifact now supports <code translate="no" dir="ltr">dialog</code> destinations in addition to <code translate="no" dir="ltr">composable</code> destinations. These dialog destinations will each be shown within a Composable <code translate="no" dir="ltr">Dialog</code>, floating above the current <code translate="no" dir="ltr">composable</code> destination. (<a href="https://android-review.googlesource.com/#/q/I011d03df5689a72e938d755c9c6da2b0f72eb162">I011d0</a>)</li> </ul> <pre class="prettyprint lang-Kotlin" translate="no" dir="ltr"><code translate="no" dir="ltr">val navController = rememberNavController() Scaffold { innerPadding -&gt; NavHost(navController, &#34;home&#34;, Modifier.padding(innerPadding)) { composable(&#34;home&#34;) { // This content fills the area provided to the NavHost HomeScreen() } dialog(&#34;detail_dialog&#34;) { // This content will be automatically added to a Dialog() composable // and appear above the HomeScreen or other composable destinations DetailDialogContent() } } } </code></pre> <p><strong>API Changes</strong></p> <ul> <li>The <code translate="no" dir="ltr">add</code> function in <code translate="no" dir="ltr">NavigatorState</code> has been renamed to <code translate="no" dir="ltr">push</code>. All current calls to <code translate="no" dir="ltr">add()</code> will need to be changed to push(). (<a href="https://android-review.googlesource.com/#/q/Ie89fcbcf0753d6918f91450e322b156ff2fd6e9b">Ie89fc</a>, <a href="https://issuetracker.google.com/issues/172112072">b/172112072</a>)</li> <li>Custom <code translate="no" dir="ltr">Navigator</code> instances can now use the <code translate="no" dir="ltr">pushWithTransaction</code> and <code translate="no" dir="ltr">popWithTransition</code> APIs on <code translate="no" dir="ltr">NavigatorState</code> to push or pop a destination asynchronously. Note that this APIs are not yet used by any of the included navigators. (<a href="https://android-review.googlesource.com/#/q/Ic4d7cc6530bf576c4d812d1fd0c5a2697874d384">Ic4d7c</a>, <a href="https://issuetracker.google.com/issues/172112072">b/172112072</a>)</li> </ul> <p><strong>Behavior Changes</strong></p> <ul> <li><code translate="no" dir="ltr">NavDeepLinkBuilder</code> now adds <code translate="no" dir="ltr">PendingIntent.FLAG_IMMUTABLE</code> to the <code translate="no" dir="ltr">PendingIntent</code> returned by <code translate="no" dir="ltr">createPendingIntent()</code>, ensuring that this API works as expected when targeting Android 12. (<a href="https://android-review.googlesource.com/#/q/If8c522f9719dd134f6518c4241acab1a791aa656">If8c52</a>)</li> </ul> <p><strong>Bug Fixes</strong></p> <ul> <li>Fixed an issue with <code translate="no" dir="ltr">&lt;include-dynamic&gt;</code> where arguments passed to the graph would not be correctly passed to the dynamically included graph. (<a href="https://android-review.googlesource.com/#/q/I3e11572a629c34aaee290fb1255f258ebf632d75">I3e115</a>)</li> <li>Fixed a <code translate="no" dir="ltr">NullPointerException</code> when navigating to a destination using a <code translate="no" dir="ltr">string[]</code> argument with a default value of <code translate="no" dir="ltr">@null</code>. (<a href="https://android-review.googlesource.com/#/q/I1fbe8da49d9652a842852778e9935e2426984ea9">I1fbe8</a>)</li> <li>Add ProGuard rules for <code translate="no" dir="ltr">@Navigator.Name</code>, fixing issues when using R8 3.1 full mode. (<a href="https://android-review.googlesource.com/#/q/I2add9f695eede9d912de6710745a37f088050cac">I2add9</a>, <a href="https://issuetracker.google.com/issues/191654433">b/191654433</a>)</li> <li>SafeArgs will no longer fail when building your app with <code translate="no" dir="ltr">Kotlin</code> versions before <code translate="no" dir="ltr">1.5.0</code>. (<a href="https://android-review.googlesource.com/#/q/Icd1ff3c64f220f4b310934c2edf910d6aae01475">Icd1ff</a>, <a href="https://issuetracker.google.com/issues/190739257">b/190739257</a>)</li> </ul> <h3 id="2.4.0-alpha03" data-text="Version 2.4.0-alpha03" tabindex="-1">Version 2.4.0-alpha03</h3> <p>June 16, 2021</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.4.0-alpha03</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/86ff5b4bb956431ec884586ce0aea0127e189ec4..ccf79f53033e665475116a4e78ff124df2a52c4b/navigation">Version 2.4.0-alpha03 contains these commits.</a></p> <p><strong>Bug Fixes</strong></p> <ul> <li>Fixed an issue where two <code translate="no" dir="ltr">navigate()</code> calls were needed to navigate to an included dynamic graph. (<a href="https://android-review.googlesource.com/#/q/I7785c40969a40b30b34acd6eedd896b44c3200a1">I7785c</a>, <a href="https://issuetracker.google.com/issues/188859835">b/188859835</a>)</li> <li>Fixed a regression introduced in <a href="#2.4.0-alpha01">Navigation <code translate="no" dir="ltr">2.4.0-alpha01</code></a> where <code translate="no" dir="ltr">setupActionBarWithNavController()</code> would not properly remove the Up icon when you are on a top level destination. (<a href="https://android-review.googlesource.com/#/q/I5d4439021161f544d664a822e1c422ff60c91e1b">I5d443</a>, <a href="https://issuetracker.google.com/issues/189868637">b/189868637</a>)</li> <li>Fixed an <code translate="no" dir="ltr">IllegalStateException</code> when calling <code translate="no" dir="ltr">popBackStack()</code> after previously popping the root graph of the NavController. (<a href="https://android-review.googlesource.com/#/q/I2a330acdd339aece36455aa0da37d0609767552c">I2a330</a>, <a href="https://issuetracker.google.com/issues/190265699">b/190265699</a>)</li> <li>ProGuard rules for <code translate="no" dir="ltr">by navArgs()</code> now properly apply when using <code translate="no" dir="ltr">navigation-common</code> or any artifacts that depend on it. (<a href="https://android-review.googlesource.com/#/q/I688009632403c98afe728d856ce91cd056ef32a5">I68800</a>, <a href="https://issuetracker.google.com/issues/190082521">b/190082521</a>)</li> <li>An <code translate="no" dir="ltr">OnDestinationChangedListener</code> that calls <code translate="no" dir="ltr">navigate()</code> the first time it receives a callback now properly get a second callback with the destination it navigated to. (<a href="https://android-review.googlesource.com/#/q/Ie5f9e0f8dec404775c99a0e90c1cde8a9e059550">Ie5f9e</a>, <a href="https://issuetracker.google.com/issues/190228815">b/190228815</a>)</li> <li>Safe Args no longer crashes when using it with dynamic feature modules and AGP 7.0+. (<a href="https://android-review.googlesource.com/#/q/I6951812da260e739a2d515fb9b3782b90c75642d">I69518</a>, <a href="https://issuetracker.google.com/issues/189966576">b/189966576</a>)</li> </ul> <p><strong>Known Issue</strong></p> <ul> <li>Safe Args will fail with an <code translate="no" dir="ltr">Unable to find method ‘’java.lang.String kotlin.text.CarsKt.titleCase(char, java.util.Locale)’’</code> error when using Gradle <code translate="no" dir="ltr">6.7.0</code> due to a dependency on an older version of Kotlin. This can be worked around by updating to use Gradle 7.0. (<a href="https://issuetracker.google.com/190739257">b/190739257</a>)</li> </ul> <h3 id="2.4.0-alpha02" data-text="Version 2.4.0-alpha02" tabindex="-1">Version 2.4.0-alpha02</h3> <p>June 2, 2021</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.4.0-alpha02</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/66681ad83c328d0dd821b943bb3d375f02c1db61..86ff5b4bb956431ec884586ce0aea0127e189ec4/navigation">Version 2.4.0-alpha02 contains these commits.</a></p> <p><strong>New Features</strong></p> <ul> <li>Routes are now supported for Activity, Fragment and Dialog destinations, as well as throughout the DynamicNavigation Kotlin DSL. (<a href="https://android-review.googlesource.com/#/q/Ib5544bd128a17f0dc681e105a1ce4a8a28945bc3">Ib5544</a>, <a href="https://android-review.googlesource.com/#/q/Ia617ba47da5c4995fd21ce2becdf527ac6ade4e9">Ia617b</a>, <a href="https://android-review.googlesource.com/#/q/I22f963d5b533066670384c1af7fc7556f57b4163">I22f96</a>, <a href="https://issuetracker.google.com/issues/188914648">b/188914648</a>, <a href="https://issuetracker.google.com/issues/188901565">b/188901565</a>)</li> <li><code translate="no" dir="ltr">NavigationUI</code> has temporarily added experimental APIs to allow opting out of saving your state. While always saving the state is the correct behavior, there are still uses of deprecated libraries (i.e. retained fragments), that cannot be supported when saving the state so this gives an opportunity for apps to slowly convert away from any unsupported APIs. (<a href="https://android-review.googlesource.com/#/q/Idf93c093c0f3729148c78c1de9d36a0f10fbb31f">Idf93c</a>)</li> <li><p>Navigation now provides<code translate="no" dir="ltr">findDestination()</code> and <code translate="no" dir="ltr">getHierarchy()</code> APIs that can be used to help implement custom NavigationUI. <code translate="no" dir="ltr">findDestination()</code> is an extension function on <code translate="no" dir="ltr">NavGraph</code> that will locate a destination within the graph. <code translate="no" dir="ltr">getHierarchy()</code> is a function on <code translate="no" dir="ltr">NavDestination</code> that can be used to verify if a given destination is within the hierarchy of another.(<a href="https://android-review.googlesource.com/#/q/I2932fc4ddba6f381e5e353ee30d2233140e5a674">I2932f</a>, <a href="https://issuetracker.google.com/issues/188183365">b/188183365</a>)</p> <pre class="prettyprint lang-Kotlin" translate="no" dir="ltr"><code translate="no" dir="ltr">val matchingRoute: Boolean = destination.hierarchy.any { it.route == routeToFind } </code></pre></li> <li><p>NavigationUI methods that took a <code translate="no" dir="ltr">BottomNavigationView</code> have been updated to instead take its superclass introduced in Material <code translate="no" dir="ltr">1.4.0</code>, <code translate="no" dir="ltr">NavigationBarView</code>. This allows these methods to be used with the <code translate="no" dir="ltr">NavigationRailView</code>. (<a href="https://android-review.googlesource.com/#/q/Ib0b36d933571daab2e94a79d524388c282a8c23c">Ib0b36</a>, <a href="https://issuetracker.google.com/issues/182938895">b/182938895</a>)</p></li> <li><p>When inflating an <code translate="no" dir="ltr">&lt;action&gt;</code> element via XML, animation attributes can use attributes pulled from your theme using the <code translate="no" dir="ltr">app:enterAnim=&quot;?attr/transitionEnter&quot;</code> syntax. (<a href="https://android-review.googlesource.com/#/q/I07bc1fbfd65e0c36c0cd8f1210efc1e82810f3dd">I07bc1</a>, <a href="https://issuetracker.google.com/issues/178291654">b/178291654</a>)</p></li> </ul> <p><strong>API Changes</strong></p> <ul> <li>Kotlin DSL builders that use an ID have been deprecated and should be replaced with builders that use routes (<a href="https://android-review.googlesource.com/#/q/I85b42c2dff5f5eddffd67f37b51c45b03f24c87a">I85b42</a>, <a href="https://issuetracker.google.com/issues/188816479">b/188816479</a>) (<a href="https://android-review.googlesource.com/#/q/I9f58f08400e8d7990784bdf27481c0ac2f34dedf">I9f58f</a>, <a href="https://issuetracker.google.com/issues/188816479">b/188816479</a>)</li> </ul> <p><strong>Bug Fixes</strong></p> <ul> <li><code translate="no" dir="ltr">DialogFragmentNavigator</code> now uses the <code translate="no" dir="ltr">NavigatorState.pop()</code> API to inform the <code translate="no" dir="ltr">NavController</code> when a dialog is dismissed by hitting the system back button or clicking outside of it, ensuring that the <code translate="no" dir="ltr">NavController</code> state is always in sync with the Navigator&#39;s state. (<a href="https://android-review.googlesource.com/#/q/I2ead97ae3d392d40e9312f3212e6bea02bf3343e">I2ead9</a>)</li> <li><p>Navigation no longer gives a <code translate="no" dir="ltr">ConcurrentModificationException</code> when using manipulating the list of <code translate="no" dir="ltr">OnDestinationChangedListeners</code> from with an <code translate="no" dir="ltr">onDestinationChanged</code> callback. (<a href="https://android-review.googlesource.com/#/q/Ib17074c773ed9462c6a69ad384c23e28fa8abaf6">Ib1707</a>, <a href="https://issuetracker.google.com/issues/188860458">b/188860458</a>)</p></li> <li><p>Safe Args no longer crashes when attempting to generate direction properties in Kotlin. (<a href="https://android-review.googlesource.com/#/q/Id2416d7d7c52888fb9ec9bdbb80afcc7d2a1bf3e">Id2416</a>, <a href="https://issuetracker.google.com/issues/188564435">b/188564435</a>)</p></li> <li><p>The setId method on NavDestination is now properly annotated with <code translate="no" dir="ltr">@IdRes</code>, so it only accepts resource ids. (<a href="https://android-review.googlesource.com/#/q/I69b80a6a63c4db257385c96bd07ad21f7665dcb8">I69b80</a>)</p></li> <li><p>The int parameter of <code translate="no" dir="ltr">findNode</code> is now <code translate="no" dir="ltr">resId</code> instead of <code translate="no" dir="ltr">resid</code>. (<a href="https://android-review.googlesource.com/#/q/I7711dafc332d1b06dfe48295bdf1cc05b23cf040">I7711d</a>)</p></li> </ul> <p><strong>Dependency Update</strong></p> <ul> <li>Safe-Args now depends on Android Gradle Plugin 4.2.0. This means you should no longer get the using <code translate="no" dir="ltr">applicationIdTextResource</code> warning. (<a href="https://android-review.googlesource.com/#/q/I6d67ba2067b42b57463efe5872f345058379ab40">I6d67b</a>, <a href="https://issuetracker.google.com/issues/172824579">b/172824579</a>)</li> </ul> <h3 id="2.4.0-alpha01" data-text="Version 2.4.0-alpha01" tabindex="-1">Version 2.4.0-alpha01</h3> <p>May 18, 2021</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.4.0-alpha01</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/3a949c2a53232f2253802f435d043677db8cecba..66681ad83c328d0dd821b943bb3d375f02c1db61/navigation">Version 2.4.0-alpha01 contains these commits.</a></p> <p><strong>New Features</strong></p> <ul> <li>The <code translate="no" dir="ltr">currentBackStackEntryAsFlow()</code> method on <code translate="no" dir="ltr">NavController</code> provides a <code translate="no" dir="ltr">Flow</code> that emits whenever the current <code translate="no" dir="ltr">NavBackStackEntry</code> changes. This flow can be used as an alternative to manually managing an <code translate="no" dir="ltr">OnDestinationChangedListener</code>. (<a href="https://android-review.googlesource.com/#/q/I19c4a18a70cb04543b50a39fc9eb35daccb8fa69">I19c4a</a>, <a href="https://github.com/androidx/androidx/pull/89">#89</a>, <a href="https://issuetracker.google.com/163947280">b/163947280</a>)</li> </ul> <p><strong>Multiple back stacks</strong></p> <p>The NavController is responsible for managing the back stack of destinations, adding destinations to the back stack when you <code translate="no" dir="ltr">navigate()</code> to them and removing them when you call <code translate="no" dir="ltr">popBackStack()</code> or trigger the system back button. The existing <a href="/reference/kotlin/androidx/navigation/NavOptions"><code translate="no" dir="ltr">NavOptions</code></a> class and the integration into <code translate="no" dir="ltr">&lt;action&gt;</code> entries in the navigation graph XML has been expanded to support saving and restoring the back stack. (<a href="https://issuetracker.google.com/80029773">b/80029773</a>)</p> <p>As part of this change, the <code translate="no" dir="ltr">NavigationUI</code> methods of <code translate="no" dir="ltr">onNavDestinationSelected()</code>, <code translate="no" dir="ltr">BottomNavigationView.setupWithNavController()</code> and <code translate="no" dir="ltr">NavigationView.setupWithNavController()</code> now automatically save and restore the state of popped destinations, enabling support for multiple back stacks without any code changes. When using Navigation with Fragments, this is the recommended way to integrate with multiple back stacks. (<a href="https://android-review.googlesource.com/#/q/Ie07ca3089faca25e56e58293b49f32b795e1f30a">Ie07ca</a>)</p> <p>The underlying APIs for saving and restoring the state are exposed via a number of surfaces:</p> <ul> <li><p>In Navigation XML, the <code translate="no" dir="ltr">&lt;action&gt;</code> element can now use the boolean attributes of <code translate="no" dir="ltr">app:popUpToSaveState</code> and <code translate="no" dir="ltr">app:restoreState</code> to save the state of any destinations popped via <code translate="no" dir="ltr">app:popUpTo</code> and restore the state associated with the destination passed as the <code translate="no" dir="ltr">app:destination</code>:</p> <pre class="prettyprint lang-Xml" translate="no" dir="ltr"><code translate="no" dir="ltr">&lt;action android:id=”@+id/swap_stack” app:destination=”@id/second_stack” app:restoreState=”true” app:popUpTo=”@id/first_stack_start_destination” app:popUpToSaveState=”true” /&gt; </code></pre></li> <li><p>In the <a href="/reference/kotlin/androidx/navigation/package-summary#navoptions"><code translate="no" dir="ltr">navOptions</code> Kotlin DSL</a>, you can add the <code translate="no" dir="ltr">restoreState</code> boolean property and the <code translate="no" dir="ltr">saveState</code> boolean property on the <a href="/reference/kotlin/androidx/navigation/NavOptionsBuilder#popupto"><code translate="no" dir="ltr">popUpTo</code> builder</a>:</p> <pre class="prettyprint lang-Kotlin" translate="no" dir="ltr"><code translate="no" dir="ltr">// Use the navigate() method that takes a navOptions DSL Builder navController.navigate(selectedBottomNavRoute) { launchSingleTop = true restoreState = true popUpTo(navController.graph.startDestinationId) { saveState = true } } </code></pre></li> <li><p>In manually building a <code translate="no" dir="ltr">NavOptions</code> object via the <a href="/reference/kotlin/androidx/navigation/NavOptions.Builder"><code translate="no" dir="ltr">NavOptions.Builder</code></a>, you can use the <code translate="no" dir="ltr">setRestoreState()</code> and new overload to <code translate="no" dir="ltr">setPopUpTo()</code> that takes an additional <code translate="no" dir="ltr">saveState</code> parameter.</p> <pre class="prettyprint lang-Java" translate="no" dir="ltr"><code translate="no" dir="ltr">NavOptions navOptions = new NavOptions.Builder() .setLaunchSingleTop(true) .setRestoreState(true) .setPopUpTo(navController.getGraph().getStartDestinationId(), false, // inclusive true) // saveState .build(); navController.navigate(selectedBottomNavId, null, navOptions); </code></pre></li> <li><p>Programmatic calls to <a href="/reference/kotlin/androidx/navigation/NavController#popbackstack"><code translate="no" dir="ltr">popBackStack()</code></a> can now include an additional <code translate="no" dir="ltr">saveState</code> parameter.</p></li> </ul> <p>In all cases, the <code translate="no" dir="ltr">NavController</code> will save and restore the state of each <code translate="no" dir="ltr">NavBackStackEntry</code>, including any navigation destination scoped <code translate="no" dir="ltr">ViewModel</code> instances. The <a href="/kotlin/androidx/navigation/Navigator"><code translate="no" dir="ltr">Navigator</code></a> APIs have been updated to enable each <code translate="no" dir="ltr">Navigator</code> to support saving and restoring their own state.</p> <p>The <code translate="no" dir="ltr">ComposeNavigator</code> used for <code translate="no" dir="ltr">composable</code> destinations in Navigation Compose and the <code translate="no" dir="ltr">FragmentNavigator</code> and <code translate="no" dir="ltr">DynamicFragmentNavigator</code> used for <code translate="no" dir="ltr">&lt;fragment&gt;</code> destinations in Navigation with Fragments have both been updated to use the new Navigator APIs and support saving and restoring state.</p> <p><strong>Navigation Routes</strong></p> <p>A <strong>route</strong> is a <code translate="no" dir="ltr">String</code> that uniquely identifies a destination. While previously only used in <a href="/jetpack/compose/navigation">Navigation Compose</a>, this concept has now graduated to become a part of the core Navigation APIs. This provides an alternative to using integer IDs when constructing your graph through the <a href="/guide/navigation/navigation-kotlin-dsl">Navigation Kotlin DSL</a>. (<a href="https://issuetracker.google.com/172823546">b/172823546</a>)</p> <p>All APIs that used to only take an ID now have an overload that takes a route <code translate="no" dir="ltr">String</code>. This includes <code translate="no" dir="ltr">navigate()</code>, <code translate="no" dir="ltr">popBackStack()</code>, <code translate="no" dir="ltr">popUpTo()</code>, and <code translate="no" dir="ltr">getBackStackEntry()</code>.</p> <p>This has had some API implications:</p> <ul> <li>The <code translate="no" dir="ltr">popUpTo</code> kotlin property on the Kotlin DSL has been deprecated in favor of <code translate="no" dir="ltr">popUpToId</code>. (<a href="https://android-review.googlesource.com/#/q/I59c73c383b84eb2b36472966aedff1b53957e26d">I59c73</a>, <a href="https://issuetracker.google.com/issues/172823546">b/172823546</a>)</li> <li>The <code translate="no" dir="ltr">getStartDestination()</code> API has been deprecated in favor of <code translate="no" dir="ltr">getStartDestinationId()</code>. (<a href="https://android-review.googlesource.com/#/q/I0887ffe673bea453b69dff286d5dc142ce4ef462">I0887f</a>, <a href="https://issuetracker.google.com/issues/172823546">b/172823546</a>)</li> </ul> <p>For developers upgrading from previous versions of Navigation Compose to Navigation Compose <code translate="no" dir="ltr">2.4.0-alpha01</code>, this means that the following imports on extension methods are no longer necessary and should be removed:</p> <pre class="prettyprint lang-Kotlin" translate="no" dir="ltr"><code translate="no" dir="ltr">import androidx.navigation.compose.navigation import androidx.navigation.compose.createGraph import androidx.navigation.compose.getBackStackEntry import androidx.navigation.compose.navigate import androidx.navigation.compose.popUpTo </code></pre> <p>The <code translate="no" dir="ltr">KEY_ROUTE</code> argument has been replaced with the <code translate="no" dir="ltr">route</code> property on <code translate="no" dir="ltr">NavDestination</code>, allowing you to call <code translate="no" dir="ltr">navBackStackEntry.destination.route</code> directly.</p> <p><strong>API Changes</strong></p> <ul> <li>All Navigation artifacts have been rewritten in Kotlin. This has improved the nullability of classes using generics (such as <code translate="no" dir="ltr">NavType</code> subclasses). All Kotlin extension functions that used to be part of the <code translate="no" dir="ltr">-ktx</code> artifacts have been moved to their respective main artifacts. The <code translate="no" dir="ltr">-ktx</code> artifacts will continue to be published, but are completely empty. (<a href="https://issuetracker.google.com/issues/184292145">b/184292145</a>)</li> <li><code translate="no" dir="ltr">NavDeepLinkBuilder</code> now supports adding multiple distinct destinations to the generated back stack. (<a href="https://android-review.googlesource.com/#/q/I3ee0d5251ec1047774aa4e826b25a6d8cf4ec28d">I3ee0d</a>, <a href="https://issuetracker.google.com/147913689">b/147913689</a>)</li> <li>Add factory functions for <code translate="no" dir="ltr">DynamicNavHostFragment</code> (<a href="https://android-review.googlesource.com/#/q/Icd51523a8f3cc3f93fffc1796c6a270bc28eaede">Icd515</a>, <a href="https://issuetracker.google.com/issues/175222619">b/175222619</a>)</li> <li>The unique ID of a <code translate="no" dir="ltr">NavBackStackEntry</code> is now exposed as part of its public API. (<a href="https://android-review.googlesource.com/#/q/Ie033a9056cead23ef9bcff1c52e67172c459b0f2">Ie033a</a>)</li> <li>The <code translate="no" dir="ltr">name</code> and <code translate="no" dir="ltr">argument</code> fields and destructuring functions of <code translate="no" dir="ltr">NamedNavArgument</code> are now public. (<a href="https://github.com/androidx/androidx/pull/174">#174</a>, <a href="https://issuetracker.google.com/181320559">b/181320559</a>)</li> <li>Introduced a new <code translate="no" dir="ltr">NavBackStackEntry#provideToCompositionLocals</code> extension that provides the <code translate="no" dir="ltr">NavBackStackEntry</code> to the relevant composition locals. (<a href="https://github.com/androidx/androidx/pull/175">#175</a>, <a href="https://issuetracker.google.com/issues/187229439">b/187229439</a>)</li> </ul> <p><strong>Safe Args</strong></p> <ul> <li><p>Safe Args now generates a <code translate="no" dir="ltr">fromSavedStateHandle()</code> method for each <code translate="no" dir="ltr">NavArgs</code> class. (<a href="https://github.com/androidx/androidx/pull/122">#122</a>, <a href="https://issuetracker.google.com/136967621">b/136967621</a>)</p> <pre class="prettyprint lang-Kotlin" translate="no" dir="ltr"><code translate="no" dir="ltr">class HomeViewModel(savedStateHandle: SavedStateHandle) : ViewModel() { // Create a HomeDestinationArgs class with type safe accessors for each argument // defined on your destination private val args = HomeDestinationArgs.fromSavedStateHandle(savedStateHandle) } </code></pre></li> <li><p>Updated Safe Args to depend on KotlinPoet <code translate="no" dir="ltr">1.8.0</code>. (<a href="https://github.com/androidx/androidx/pull/172">#172</a>, <a href="https://issuetracker.google.com/issues/183990444">b/183990444</a>)</p></li> </ul> <p><strong>Behavior Changes</strong></p> <ul> <li>Navigation now depends on <a href="/jetpack/androidx/releases/lifecycle#2.3.1">Lifecycle <code translate="no" dir="ltr">2.3.1</code></a> and now marks <code translate="no" dir="ltr">setGraph()</code>, <code translate="no" dir="ltr">popBackStack()</code>, <code translate="no" dir="ltr">navigateUp()</code>, and <code translate="no" dir="ltr">navigate()</code>, the methods that update the <code translate="no" dir="ltr">NavBackStackEntry</code> <code translate="no" dir="ltr">Lifecycle</code>, as <code translate="no" dir="ltr">@MainThread</code>, aligning Navigation with the main thread enforcement introduced in Lifecycle <code translate="no" dir="ltr">2.3.0</code>. (<a href="https://issuetracker.google.com/171125856">b/171125856</a>)</li> <li>Parsing Enum arguments from deep links is now case insensitive, allowing a deep link like <code translate="no" dir="ltr">http://www.example.com/red</code> to match a <code translate="no" dir="ltr">www.example.com/{color}</code> deep link even when the enum has the value of <code translate="no" dir="ltr">RED</code>. (<a href="https://github.com/androidx/androidx/pull/152">#152</a>, <a href="https://issuetracker.google.com/issues/135857840">b/135857840</a>)</li> </ul> <p><strong>Compose Compatibility</strong></p> <ul> <li><code translate="no" dir="ltr">androidx.navigation:navigation-compose:2.4.0-alpha01</code> is only compatible with Compose version <code translate="no" dir="ltr">1.0.0-beta07</code> and above.</li> </ul> <p><strong>Bug Fixes</strong></p> <ul> <li>Fixed an issue where trailing argument placeholders would take precedence over deep links that have a matching exact suffix. (<a href="https://github.com/androidx/androidx/pull/153">#153</a>, <a href="https://issuetracker.google.com/issues/184072811">b/184072811</a>)</li> <li><code translate="no" dir="ltr">NavHostFragment</code> now supports custom Navigators that use the same <code translate="no" dir="ltr">@Navigator.Name(&quot;dialog&quot;)</code> as the default <code translate="no" dir="ltr">DialogFragmentNavigator</code>. (<a href="https://android-review.googlesource.com/#/q/Ib1c2cc38e7a621d133be1f4c3692e62913450dda">Ib1c2c</a>, <a href="https://issuetracker.google.com/175979140">b/175979140</a>)</li> <li>Improved the behavior of <code translate="no" dir="ltr">NavigatorProvider#addNavigator</code> to ensure that calling it repeatedly with the same instance does not cause issues. (<a href="https://github.com/androidx/androidx/pull/176">#176</a>, <a href="https://issuetracker.google.com/issues/187443146">b/187443146</a>)</li> </ul> <p><strong>External Contributions</strong></p> <ul> <li>Thanks <a href="https://github.com/simonschiller">simonschiller</a> for building support for Safe Args generating a <code translate="no" dir="ltr">fromSavedStateHandle()</code> method for each <code translate="no" dir="ltr">NavArgs</code> class. (<a href="https://github.com/androidx/androidx/pull/122">#122</a>, <a href="https://issuetracker.google.com/136967621">b/136967621</a>)</li> <li>Thanks <a href="https://github.com/Bradleycorn">Bradleycorn</a> for making parsing Enum arguments from deep links case insensitive. (<a href="https://github.com/androidx/androidx/pull/152">#152</a>, <a href="https://issuetracker.google.com/issues/135857840">b/135857840</a>)</li> <li>Thanks <a href="https://github.com/osipxd">osipxd</a> for fixing an issue where trailing argument placeholders would take precedence over deep links that have a matching exact suffix. (<a href="https://github.com/androidx/androidx/pull/153">#153</a>, <a href="https://issuetracker.google.com/issues/184072811">b/184072811</a>)</li> <li>Thanks <a href="https://github.com/tatocaster">tatocaster</a> for updating Safe Args to depend on KotlinPoet <code translate="no" dir="ltr">1.8.0</code>. (<a href="https://github.com/androidx/androidx/pull/172">#172</a>, <a href="https://issuetracker.google.com/issues/183990444">b/183990444</a>)</li> <li>Thanks <a href="https://github.com/jossiwolf">jossiwolf</a> for making the <code translate="no" dir="ltr">name</code> and <code translate="no" dir="ltr">argument</code> fields and destructuring functions of <code translate="no" dir="ltr">NamedNavArgument</code> public. (<a href="https://github.com/androidx/androidx/pull/174">#174</a>, <a href="https://issuetracker.google.com/181320559">b/181320559</a>)</li> <li>Thanks <a href="https://github.com/jossiwolf">jossiwolf</a> for introducing a new <code translate="no" dir="ltr">NavBackStackEntry#provideToCompositionLocals</code> extension that provides the <code translate="no" dir="ltr">NavBackStackEntry</code> to the relevant composition locals. (<a href="https://github.com/androidx/androidx/pull/175">#175</a>, <a href="https://issuetracker.google.com/issues/187229439">b/187229439</a>)</li> <li>Thanks <a href="https://github.com/jossiwolf">jossiwolf</a> for improved the behavior of <code translate="no" dir="ltr">NavigatorProvider#addNavigator</code> to ensure that calling it repeatedly with the same instance does not cause issues. (<a href="https://github.com/androidx/androidx/pull/176">#176</a>, <a href="https://issuetracker.google.com/issues/187443146">b/187443146</a>)</li> </ul> <h2 id="navigation_compose_version_100_2" data-text="Navigation Compose Version 1.0.0" tabindex="-1">Navigation Compose Version 1.0.0</h2> <aside class="note"><strong>Note:</strong><span> Navigation Compose has aligned versioning with the rest of <code translate="no" dir="ltr">androidx.navigation</code> as of <code translate="no" dir="ltr">2.4.0-alpha01</code>. <code translate="no" dir="ltr">androidx.navigation:navigation-compose:1.0.0-alpha11</code> became <code translate="no" dir="ltr">androidx.navigation:navigation-compose:2.4.0-alpha01</code>.</span></aside> <h3 id="compose-1.0.0-alpha10" data-text="Version 1.0.0-alpha10" tabindex="-1">Version 1.0.0-alpha10</h3> <p>April 7, 2021</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-compose:1.0.0-alpha10</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/52fbd7ed5b07ca4431fa828325a1f8da45b02e51..0e6e72e136ada934db74265667417524ba0ba04f/navigation/navigation-compose">Version 1.0.0-alpha10 contains these commits.</a></p> <p><strong>API Changes</strong></p> <ul> <li><code translate="no" dir="ltr">NavHost</code> now accepts a <code translate="no" dir="ltr">Modifier</code>, which is passed down to the composable container that wraps the destination composables. (<a href="https://android-review.googlesource.com/#/q/I85aca06d44b0a1f55b7a8ef5ca7dae34577d28fa">I85aca</a>, <a href="https://issuetracker.google.com/issues/175125483">b/175125483</a>)</li> </ul> <p><strong>Bug Fixes</strong></p> <ul> <li><code translate="no" dir="ltr">NavHost</code> now works even when an <code translate="no" dir="ltr">OnBackPressedDispatcherOwner</code> is not found, such is the case when previewing the <code translate="no" dir="ltr">NavHost</code>. (<a href="https://android-review.googlesource.com/#/q/I7d8b4662b2d30515a4536e212bf6631357a5357f">I7d8b4</a>)</li> <li>Navigation Compose now depends on <a href="#2.3.5">Navigation <code translate="no" dir="ltr">2.3.5</code></a>, fixing an issue when using <code translate="no" dir="ltr">BackHandler</code> inside a <code translate="no" dir="ltr">NavHost</code> destination. (<a href="https://android-review.googlesource.com/#/q/I7e63b32c93deaee60b1d5e132d3fa255c3ba85e2">I7e63b</a>, <a href="https://issuetracker.google.com/issues/182284739">b/182284739</a>)</li> </ul> <h3 id="compose-1.0.0-alpha09" data-text="Version 1.0.0-alpha09" tabindex="-1">Version 1.0.0-alpha09</h3> <p>March 10, 2021</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-compose:1.0.0-alpha09</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/4b6cff92e45f1d4467086aa2c6aa0248b4883950..52fbd7ed5b07ca4431fa828325a1f8da45b02e51/navigation/navigation-compose">Version 1.0.0-alpha09 contains these commits.</a></p> <p><strong>API Changes</strong></p> <ul> <li><code translate="no" dir="ltr">LocalViewModelStoreOwner.current</code> now returns a nullable <code translate="no" dir="ltr">ViewModelStoreOwner</code> to better determine whether a <code translate="no" dir="ltr">ViewModelStoreOwner</code> is available in the current composition. APIs that require a <code translate="no" dir="ltr">ViewModelStoreOwner</code>, such as <code translate="no" dir="ltr">viewModel()</code> and <code translate="no" dir="ltr">NavHost</code>, still throw an exception if a <code translate="no" dir="ltr">ViewModelStoreOwner</code> is not set. (<a href="https://android-review.googlesource.com/#/q/Idf39af28f00e0c0522a897a1202385d21da828be">Idf39a</a>)</li> </ul> <p><strong>Bug Fixes</strong></p> <ul> <li>Navigation Compose now depends on <a href="#2.3.4">Navigation 2.3.4</a> which includes the fix for attempting to set the same ViewModelStore object after the graph has been set. (<a href="https://android-review.googlesource.com/#/q/I65c24fcd5674c1ac72715c612854aac62c2eda88">I65c24</a>, <a href="https://issuetracker.google.com/issues/177825470">b/177825470</a>)</li> </ul> <h3 id="1.0.0-alpha08" data-text="Version 1.0.0-alpha08" tabindex="-1">Version 1.0.0-alpha08</h3> <p>February 24, 2021</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-compose:1.0.0-alpha08</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/602cf9bff5e74e4355760aa47d3fc73a2e6d779b..4b6cff92e45f1d4467086aa2c6aa0248b4883950/navigation/navigation-compose">Version 1.0.0-alpha08 contains these commits.</a></p> <p><strong>New Features</strong></p> <ul> <li><code translate="no" dir="ltr">NavHost</code> now populates the <code translate="no" dir="ltr">LocalSavedStateRegistryOwner</code> CompositionLocal with that destination’s <code translate="no" dir="ltr">NavBackStackEntry</code>, ensuring that any state directly saved into the <code translate="no" dir="ltr">SavedStateRegistry</code> will be saved and restored alongside the destination. (<a href="https://android-review.googlesource.com/#/q/I435d70ef0cfa8059e0d490cd5e4ed141b690ec59">I435d7</a>, <a href="https://issuetracker.google.com/issues/179469431">b/179469431</a>)</li> </ul> <aside class="note"><strong>Note:</strong><span> Navigation Compose 1.0.0-alpha08 is only compatible with Compose 1.0.0-beta01.</span></aside> <h3 id="compose-1.0.0-alpha07" data-text="Version 1.0.0-alpha07" tabindex="-1">Version 1.0.0-alpha07</h3> <p>February 10, 2021</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-compose:1.0.0-alpha07</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/6950aab50fe6c9f7e9d97cf865161f2d3999eb9e..602cf9bff5e74e4355760aa47d3fc73a2e6d779b/navigation/navigation-compose">Version 1.0.0-alpha07 contains these commits.</a></p> <p><strong>Dependency Updates</strong></p> <ul> <li>Navigation Compose now depends on <a href="/jetpack/androidx/releases/lifecycle#viewmodel-compose-1.0.0-alpha01">Lifecycle ViewModel Compose 1.0.0-alpha01</a> to provide <code translate="no" dir="ltr">viewModel()</code> support to <code translate="no" dir="ltr">composable</code> destinations. (<a href="https://android-review.googlesource.com/#/q/I7a374b76168a6387e585337c131a988bddcb912b">I7a374</a>)</li> <li><code translate="no" dir="ltr">NavHost</code> now uses the new <code translate="no" dir="ltr">LocalOnBackPressedDispatcherOwner</code> from <a href="/jetpack/androidx/releases/activity#1.3.0-alpha01">Activity-Compose 1.3.0-alpha01</a> to get the <code translate="no" dir="ltr">OnBackPressedDispatcher</code> that is set on the <code translate="no" dir="ltr">NavController</code>. (<a href="https://android-review.googlesource.com/#/q/I65b12306c42364d26e1819145ab378b02b2ff0f5">I65b12</a>)</li> </ul> <aside class="note"><strong>Note:</strong><span> Navigation Compose <code translate="no" dir="ltr">1.0.0-alpha07</code> is only compatible with Compose <code translate="no" dir="ltr">1.0.0-alpha12</code>.</span></aside> <h3 id="compose-1.0.0-alpha06" data-text="Version 1.0.0-alpha06" tabindex="-1">Version 1.0.0-alpha06</h3> <p>January 28, 2021</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-compose:1.0.0-alpha06</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/6207afb1646d302c5d29c2c67d332b48db87fb27..aee18b103203a91ee89df91f0af5df2ecff356d6/navigation/navigation-compose">Version 1.0.0-alpha06 contains these commits.</a></p> <p><strong>API Changes</strong></p> <ul> <li>Added a <code translate="no" dir="ltr">getBackStackEntry(route: String)</code> extension method on <code translate="no" dir="ltr">NavController</code> that returns the associated <code translate="no" dir="ltr">NavBackStackEntry</code>. (<a href="https://android-review.googlesource.com/#/q/If89316ee73218d779dfaa593eeba53a44d9dfb50">If8931</a>)</li> </ul> <aside class="note"><strong>Note:</strong><span> Navigation Compose <code translate="no" dir="ltr">1.0.0-alpha06</code> is only compatible with Compose <code translate="no" dir="ltr">1.0.0-alpha11</code>.</span></aside> <h3 id="compose-1.0.0-alpha05" data-text="Version 1.0.0-alpha05" tabindex="-1">Version 1.0.0-alpha05</h3> <p>January 13, 2021</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-compose:1.0.0-alpha05</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/72f02c12e4709ab41ae0fea9a8a668d5267a1df8..6207afb1646d302c5d29c2c67d332b48db87fb27/navigation/navigation-compose">Version 1.0.0-alpha05 contains these commits.</a></p> <p>Updated to depend on Compose 1.0.0-alpha10.</p> <h3 id="compose-1.0.0-alpha04" data-text="Version 1.0.0-alpha04" tabindex="-1">Version 1.0.0-alpha04</h3> <p>December 16, 2020</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-compose:1.0.0-alpha04</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/10b5e9fd366c1c413d5576aed50a305d300938e1..72f02c12e4709ab41ae0fea9a8a668d5267a1df8/navigation/navigation-compose">Version 1.0.0-alpha04 contains these commits.</a></p> <ul> <li>Updated for compatibility with Compose <code translate="no" dir="ltr">1.0.0-alpha09</code>.</li> </ul> <aside class="note"><strong>Note:</strong><span> Navigation Compose <code translate="no" dir="ltr">1.0.0-alpha04</code> is only compatible with Compose <code translate="no" dir="ltr">1.0.0-alpha09</code>.</span></aside> <h3 id="compose-1.0.0-alpha03" data-text="Version 1.0.0-alpha03" tabindex="-1">Version 1.0.0-alpha03</h3> <p>December 2, 2020</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-compose:1.0.0-alpha03</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/2d49f9fa892a0d067580a871f3aa0cd6764f4c3b..10b5e9fd366c1c413d5576aed50a305d300938e1/navigation/navigation-compose">Version 1.0.0-alpha03 contains these commits.</a></p> <p><strong>Bug Fixes</strong></p> <ul> <li>Fixed an issue where <code translate="no" dir="ltr">popBackStack()</code> and <code translate="no" dir="ltr">navigateUp()</code> would not work after a configuration change or process death and recreation. (<a href="https://android-review.googlesource.com/#/q/Icea477e53970d8fcd22a698ed2feca1734503896">Icea47</a>, <a href="https://issuetracker.google.com/issues/173281473">b/173281473</a>)</li> <li>Navigating to a nested graph within your NavHost now works properly. (<a href="https://android-review.googlesource.com/#/q/I0948d85d73e1e7a9e37a43bc2f9267e0cd7b6355">I0948d</a>, <a href="https://issuetracker.google.com/issues/173647694">b/173647694</a>)</li> </ul> <aside class="note"><strong>Note:</strong><span> Navigation Compose <code translate="no" dir="ltr">1.0.0-alpha03</code> is only compatible with Compose <code translate="no" dir="ltr">1.0.0-alpha08</code>.</span></aside> <h3 id="compose-1.0.0-alpha02" data-text="Version 1.0.0-alpha02" tabindex="-1">Version 1.0.0-alpha02</h3> <p>November 11, 2020</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-compose:1.0.0-alpha02</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/234e23e470a5e7f81291f6acd12d538146dc010b..2d49f9fa892a0d067580a871f3aa0cd6764f4c3b/navigation/navigation-compose">Version 1.0.0-alpha02 contains these commits.</a></p> <p><strong>API Changes</strong></p> <ul> <li>Navigation compose now support NavOptions for using popUpTo and launchSingleTop operations (<a href="https://android-review.googlesource.com/#/q/If96c3a3f99f29c6e2e88d64285b7af46ad3835c2">If96c3</a>, <a href="https://issuetracker.google.com/issues/171468994">b/171468994</a>)</li> <li>Added a navigation function that takes a route instead of an ID that allows you to construct nested graphs in the Navigation Compose DSL. (<a href="https://android-review.googlesource.com/#/q/I1661dbcd4c385ca7ea0961e00d2e6ce1a7429655">I1661d</a>)</li> <li>startDestination now comes before the route in the list of a parameters for a NavHost (<a href="https://android-review.googlesource.com/#/q/Ie620e9208948db572ab70ee6be09f3dafb605bd7">Ie620e</a>)</li> <li>You can now create a graph using the route as a start destination outside of a NavHost composable. (<a href="https://android-review.googlesource.com/#/q/Iceb753387e02e654b0835826c8428bef78c4cf50">Iceb75</a>)</li> </ul> <h3 id="compose-1.0.0-alpha01" data-text="Version 1.0.0-alpha01" tabindex="-1">Version 1.0.0-alpha01</h3> <p>October 28, 2020</p> <p><code translate="no" dir="ltr">android.navigation:navigation-compose:1.0.0-alpha01</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/234e23e470a5e7f81291f6acd12d538146dc010b/navigation/navigation-compose">Version 1.0.0-alpha01 contains these commits.</a></p> <p><strong>New Features</strong></p> <p>The <code translate="no" dir="ltr">navigation-compose</code> artifact provides integration between the <a href="/navigation">Navigation Component</a> and <a href="/jetpack/compose">Jetpack Compose</a>. It uses <code translate="no" dir="ltr">@Composable</code> functions as the destinations in your application.</p> <p>This initial release provides:</p> <ul> <li>A <code translate="no" dir="ltr">NavHost</code> composable that allows you to construct your navigation graph via a Kotlin DSL.</li> <li>Scoping of lifecycle, <code translate="no" dir="ltr">ViewModel</code>, and remembered state at the destination level.</li> <li>Automatic integration with the system back button.</li> <li>Support for passing arguments, attaching deep links to destinations, and returning a result to previous destinations.</li> <li>Compose specific helpers in <code translate="no" dir="ltr">rememberNavController()</code> and <code translate="no" dir="ltr">currentBackStackEntryAsState()</code> to allow <a href="/jetpack/compose/state#separate-internal-state-from-UI-composables">hoisting state</a> and connecting the <code translate="no" dir="ltr">NavController</code> to composables outside of the <code translate="no" dir="ltr">NavHost</code> (such as a bottom navigation bar).</li> </ul> <p>See the <a href="/jetpack/compose/navigation">Compose Navigation guide</a> for more information.</p> <h2 id="version_235_3" data-text="Version 2.3.5" tabindex="-1">Version 2.3.5</h2> <h3 id="2.3.5" data-text="Version 2.3.5" tabindex="-1">Version 2.3.5</h3> <p>April 7, 2021</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.3.5</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/ac398a3ebf3b1e2659e61710acf5220ba17dfc11..3a949c2a53232f2253802f435d043677db8cecba/navigation">Version 2.3.5 contains these commits.</a></p> <p><strong>New Features</strong></p> <ul> <li>When navigating using a <code translate="no" dir="ltr">NavDeepLinkRequest</code> or <code translate="no" dir="ltr">Uri</code>, you can now access the <code translate="no" dir="ltr">Uri</code>, action, and mime type in the resulting destination by getting the intent from arguments via <a href="/reference/kotlin/androidx/navigation/NavController#key_deep_link_intent"><code translate="no" dir="ltr">KEY_DEEP_LINK_INTENT</code></a>, mirroring the functionality already available for external deep linking. (<a href="https://android-review.googlesource.com/#/q/I975c3ed3958575cd6213c0a97ef2c4c8071c7a71">I975c3</a>, <a href="https://issuetracker.google.com/issues/181521877">b/181521877</a>)</li> </ul> <p><strong>Bug Fixes</strong></p> <ul> <li><code translate="no" dir="ltr">OnBackPressedCallbacks</code> added to a dispatcher with the <code translate="no" dir="ltr">NavBackStackEntry</code> as the LifecycleOwner now properly intercept back after the Activity Lifecycle is <code translate="no" dir="ltr">STOPPED</code>, then <code translate="no" dir="ltr">STARTED</code> (<a href="https://android-review.googlesource.com/#/q/Iff94f9efa9739fa49166ddb2dc11b50d2a4c4a8c">Iff94f</a>, <a href="https://issuetracker.google.com/issues/182284739">b/182284739</a>)</li> <li>Deep link domain parsing is now case insensitive, ensuring that <code translate="no" dir="ltr">www.example.com</code> matches both <code translate="no" dir="ltr">www.example.com</code> and <code translate="no" dir="ltr">www.Example.com</code>. Note that query parameter names are still case sensitive. (<a href="https://github.com/androidx/androidx/pull/144">#144</a>, <a href="https://issuetracker.google.com/issues/153829033">b/153829033</a>)</li> <li>Fixed a <code translate="no" dir="ltr">NullPointerException</code> that could occur when a destination has multiple non-nullable default arguments and you navigate to that destination while only overriding a subset of those arguments. (<a href="https://android-review.googlesource.com/c/platform/frameworks/support/+/1644827">aosp/1644827</a>)</li> </ul> <p><strong>Dependency Updates</strong></p> <ul> <li>The Navigation Safe Args Gradle Plugin now depends on Kotlin Gradle Plugin 1.4.31. (<a href="https://android-review.googlesource.com/c/platform/frameworks/support/+/1661058">aosp/1661058</a>, <a href="https://issuetracker.google.com/issues/181156413">b/181156413</a>)</li> </ul> <p><strong>External Contribution</strong></p> <ul> <li>Thanks <a href="https://github.com/bentrengrove"><code translate="no" dir="ltr">bentrengrove</code></a> for the pull request making deep link domain parsing case insensitive. (<a href="https://github.com/androidx/androidx/pull/144">#144</a>, <a href="https://issuetracker.google.com/issues/153829033">b/153829033</a>)</li> </ul> <h2 id="version_234_3" data-text="Version 2.3.4" tabindex="-1">Version 2.3.4</h2> <h3 id="2.3.4" data-text="Version 2.3.4" tabindex="-1">Version 2.3.4</h3> <p>March 10, 2021</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.3.4</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/2295caa3f58e03d553783241bde8e36b8c14acc9..ac398a3ebf3b1e2659e61710acf5220ba17dfc11/navigation">Version 2.3.4 contains these commits.</a></p> <p><strong>New Features</strong></p> <ul> <li><code translate="no" dir="ltr">ReferenceType</code> arguments can now be properly parsed when sent as part of a deeplink URI. This supports both the raw integer value as well as hex values prefixed by <code translate="no" dir="ltr">0x</code>. (<a href="https://github.com/androidx/androidx/pull/127">#127</a>, <a href="https://issuetracker.google.com/issues/179166693">b/179166693</a>)</li> <li>The <code translate="no" dir="ltr">android:defaultValue</code> for an argument with <code translate="no" dir="ltr">app:argType=&quot;float&quot;</code> now supports integer default values, allowing you to use <code translate="no" dir="ltr">android:defaultValue=&quot;0&quot;</code>rather than requiring the use of <code translate="no" dir="ltr">0.0</code>. (<a href="https://github.com/androidx/androidx/pull/117">#117</a>, <a href="https://issuetracker.google.com/issues/173766247">b/173766247</a>)</li> </ul> <p><strong>Bug Fixes</strong></p> <ul> <li>Fix stuck installation progress when using Navigation’s support for dynamic features. (<a href="https://android-review.googlesource.com/#/q/Ib27a77bc4572fc69cea38d738255c987449d6137">Ib27a7</a>, <a href="https://issuetracker.google.com/issues/169636207">b/169636207</a>)</li> <li>Calling <code translate="no" dir="ltr">setViewModelStore</code> or <code translate="no" dir="ltr">setLifecycleOwner</code> with the same object that has already been set will now be a no-op (<a href="https://android-review.googlesource.com/#/q/Idf491fa68c0771dd617832cefe4c03e8ea85dae7">Idf491</a>, <a href="https://issuetracker.google.com/issues/177825470">b/177825470</a>)</li> <li>Safe-Args now adds suppress annotations on the proper methods when using java. (<a href="https://android-review.googlesource.com/#/q/I8fbc577e6e16bc8b2441377df1a59f9f59abae56">I8fbc5</a>, <a href="https://issuetracker.google.com/issues/179463137">b/179463137</a>)</li> </ul> <p><strong>External Contributions</strong></p> <ul> <li>Thanks <a href="https://github.com/JvmName"><code translate="no" dir="ltr">JvmName</code></a> for the pull request to ensure that <code translate="no" dir="ltr">ReferenceType</code> arguments can now be properly parsed when sent as part of a deeplink URI. (<a href="https://github.com/androidx/androidx/pull/127">#127</a>, <a href="https://issuetracker.google.com/issues/179166693">b/179166693</a>)</li> <li>Thanks <a href="https://github.com/tatocaster"><code translate="no" dir="ltr">tatocaster</code></a> for the pull request to allow the <code translate="no" dir="ltr">defaultValue</code> for an argument with <code translate="no" dir="ltr">app:argType=”float”</code> now supports integer default values. (<a href="https://github.com/androidx/androidx/pull/117">#117</a>, <a href="https://issuetracker.google.com/issues/173766247">b/173766247</a>)</li> </ul> <h2 id="version_233_3" data-text="Version 2.3.3" tabindex="-1">Version 2.3.3</h2> <h3 id="2.3.3" data-text="Version 2.3.3" tabindex="-1">Version 2.3.3</h3> <p>January 27, 2021</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.3.3</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/722c6ca874bb106de216eddb5133c44b6921aaf9..2295caa3f58e03d553783241bde8e36b8c14acc9/navigation">Version 2.3.3 contains these commits.</a></p> <p><strong>Bug Fixes</strong></p> <ul> <li>There is no longer a crash when popping a <code translate="no" dir="ltr">NavBackStackEntry</code> before its <code translate="no" dir="ltr">Lifecycle</code> is moved to <code translate="no" dir="ltr">CREATED</code>. (<a href="https://android-review.googlesource.com/#/q/Ie3ba3e34e3e4f4982bfc87b38b1d2764d10238a0">Ie3ba3</a>)</li> <li>Fixed regression caused by <a href="https://issuetracker.google.com/issues/171364502">b/171364502</a> where navigating to an activity with an animation resource value of <code translate="no" dir="ltr">0</code> caused a <code translate="no" dir="ltr">ResourceNotFoundException</code>. (<a href="https://android-review.googlesource.com/#/q/I7aedb282e3bd4534758035fe17bfcdb3287be604">I7aedb</a>, <a href="https://issuetracker.google.com/issues/176819931">b/176819931</a>)</li> </ul> <h2 id="version_232_3" data-text="Version 2.3.2" tabindex="-1">Version 2.3.2</h2> <h3 id="2.3.2" data-text="Version 2.3.2" tabindex="-1">Version 2.3.2</h3> <p>December 2, 2020</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.3.2</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/76e4783df885f268f5aa76eee474c79167279a8a..722c6ca874bb106de216eddb5133c44b6921aaf9/navigation">Version 2.3.2 contains these commits.</a></p> <p><strong>Bug Fixes</strong></p> <ul> <li>Fixed a regression in <code translate="no" dir="ltr">NavigationUI</code> where using an <code translate="no" dir="ltr">&lt;activity&gt;</code> destination with <code translate="no" dir="ltr">onNavDestinationSelected</code> would fail to navigate to the Activity. (<a href="https://android-review.googlesource.com/#/q/I22e34487faa43e2024a407047956c18b85923b52">I22e34</a>, <a href="https://issuetracker.google.com/issues/171364502">b/171364502</a>)</li> <li>Fixed an issue where <code translate="no" dir="ltr">navigation-dynamic-features-fragment</code> would result in navigating to the newly installed destination multiple times. (<a href="https://android-review.googlesource.com/1486056">aosp/1486056</a>, <a href="https://issuetracker.google.com/169636207">b/169636207</a>)</li> <li>Fixed an issue where default arguments would not be sent to <code translate="no" dir="ltr">OnDestinationChangedListener</code> instances when using <code translate="no" dir="ltr">launchSingleTop</code>. (<a href="https://android-review.googlesource.com/#/q/I2c5cbc0bb904880f76b2d3660f9800ec9a50fe14">I2c5cb</a>)</li> <li>Fixed an issue where navigating to a nested navigation graph would not create a new graph instance on the back stack. (<a href="https://android-review.googlesource.com/#/q/Ifc8318d58fedcfe71ed9a486fe43f963ebb4a330">Ifc831</a>)</li> <li>Fixed an issue where using <code translate="no" dir="ltr">navigate()</code> with a <code translate="no" dir="ltr">popUpTo</code> that removed the last destination in a navigation graph would not immediately destroy and remove the navigation graph itself from the back stack. (<a href="https://android-review.googlesource.com/#/q/I910a3aadd9add3932285cc9aefbb4cfc45ec178b">I910a3</a>)</li> <li>Navigation SafeArgs now uses KotlinPoet version 1.7.2 which adds support for Kotlin&#39;s explicit API mode. (<a href="https://android-review.googlesource.com/#/q/I918b59356727391e3caa909089aee8a19c3ea4d5">I918b5</a>)</li> <li><code translate="no" dir="ltr">NavHostFragment.findNavController(Fragment)</code> now also checks the root decor view of a DialogFragment in addition to the existing checks of the Fragment hierarchy and Fragment&#39;s view hierarchy. This allows you to test dialog fragments that use Navigation with <code translate="no" dir="ltr">FragmentScenario</code> and <code translate="no" dir="ltr">Navigation.setViewNavController()</code>. (<a href="https://android-review.googlesource.com/#/q/I69e0d4f69ce830d85e0697df410e62bb6333c8ac">I69e0d</a>)</li> </ul> <h2 id="version_231_3" data-text="Version 2.3.1" tabindex="-1">Version 2.3.1</h2> <h3 id="2.3.1" data-text="Version 2.3.1" tabindex="-1">Version 2.3.1</h3> <p>October 14, 2020</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.3.1</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/654b8a76ea3c162fc3f9d84f3484ebadda0bbb9f..76e4783df885f268f5aa76eee474c79167279a8a/navigation">Version 2.3.1 contains these commits.</a></p> <p><strong>New Features</strong></p> <ul> <li>Default Animator resources have been added to Navigation UI and are recommended over the default animation resources. (<a href="https://issuetracker.google.com/167430145">b/167430145</a>)</li> <li>NavOptions now overrides the hashcode and equals methods (<a href="https://issuetracker.google.com/161586466">b/161586466</a>)</li> <li>Navigation now includes the current destination in the “No destination with ID” IllegalArgumentException, which should improve the developer debugging experience. (<a href="https://issuetracker.google.com/168311416">b/168311416</a>)</li> </ul> <p><strong>Bug Fixes</strong></p> <ul> <li>Safe Args will no longer wrap the return line, even if the generated argument class name is longer than 100 characters. (<a href="https://issuetracker.google.com/168584987">b/168584987</a>)</li> </ul> <p><strong>Dependency Changes</strong></p> <ul> <li><code translate="no" dir="ltr">navigation-ui</code> now depends on <a href="/jetpack/androidx/releases/drawerlayout#1.1.1">DrawerLayout 1.1.1</a>, ensuring that <code translate="no" dir="ltr">NavigationUI</code> is able to open the drawer even when using <code translate="no" dir="ltr">LOCK_MODE_LOCKED_CLOSED</code> or <code translate="no" dir="ltr">LOCK_MODE_LOCKED_OPEN</code>. (<a href="https://issuetracker.google.com/162253907">b/162253907</a>)</li> <li>Safe Args now depends on KotlinPoet 1.6.0 (<a href="https://android-review.googlesource.com/c/platform/frameworks/support/+/1435911">aosp/1435911</a>)</li> <li>Safe Args now depends on AGP 4.0.1 (<a href="https://android-review.googlesource.com/c/platform/frameworks/support/+/1442337">aosp/1442337</a>)</li> </ul> <h2 id="version_230_3" data-text="Version 2.3.0" tabindex="-1">Version 2.3.0</h2> <aside class="note"><strong>Note:</strong><span> This version is dependent on the Java 8 programming language. Please read <a href="/studio/write/java8-support">Use Java 8 language features</a> to learn how to use it in your project.</span></aside> <h3 id="2.3.0" data-text="Version 2.3.0" tabindex="-1">Version 2.3.0</h3> <p>June 24, 2020</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.3.0</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/098293bcdb2b40862b3e287d38dd82ac8a9c6d38..654b8a76ea3c162fc3f9d84f3484ebadda0bbb9f/navigation">Version 2.3.0 contains these commits.</a></p> <p><strong>Major changes since 2.2.0</strong></p> <ul> <li><strong>Feature Module integration</strong>: The <code translate="no" dir="ltr">navigation-dynamic-features-runtime</code> and <code translate="no" dir="ltr">navigation-dynamic-features-fragment</code> artifacts allow you to navigate to destinations that are defined in feature modules, automatically handling the installation of the feature modules as needed. See <a href="/guide/navigation/navigation-dynamic">Navigate with feature modules</a> for more information.</li> <li><strong>Navigation Testing</strong>: The <code translate="no" dir="ltr">navigation-testing</code> artifact provides a <code translate="no" dir="ltr">TestNavHostController</code> that allows you to set the current destination and verify the back stack after navigation operations. See <a href="/guide/navigation/navigation-testing">Test Navigation</a> for more information.</li> <li><strong>Returning a Result</strong>: The <code translate="no" dir="ltr">NavBackStackEntry</code> associated with each destination on the Navigation back stack now allows you to access a <a href="/reference/androidx/lifecycle/SavedStateHandle"><code translate="no" dir="ltr">SavedStateHandle</code></a> suitable for storing small amounts of saved state that should be associated with a particular back stack entry. See <a href="/guide/navigation/navigation-programmatic#returning_a_result">Returning a result to the previous Destination</a> for more information.</li> <li><strong><code translate="no" dir="ltr">NavigationUI</code> support for <code translate="no" dir="ltr">Openable</code></strong>: All usages of <code translate="no" dir="ltr">DrawerLayout</code> in <code translate="no" dir="ltr">NavigationUI</code> have been replaced with the more generic <a href="/reference/androidx/customview/widget/Openable"><code translate="no" dir="ltr">Openable</code></a> interface added in <a href="/jetpack/androidx/releases/customview#1.1.0">CustomView <code translate="no" dir="ltr">1.1.0</code></a> and implemented by <code translate="no" dir="ltr">DrawerLayout</code> in <a href="/jetpack/androidx/releases/drawerlayout#1.1.0">DrawerLayout <code translate="no" dir="ltr">1.1.0</code></a>.</li> <li><strong>Action and Mime Type support in deep links</strong>: Deep linking has been expanded to support <code translate="no" dir="ltr">app:action</code> and <code translate="no" dir="ltr">app:mimeType</code> in addition to the <code translate="no" dir="ltr">app:uri</code> previously available. <code translate="no" dir="ltr">NavController</code> now supports navigating by any combination of these fields via the new <code translate="no" dir="ltr">NavDeepLinkRequest</code> class. See <a href="/guide/navigation/navigation-navigate#uri">Navigate using NavDeepLinkRequest</a> for more information.</li> </ul> <aside class="note"><strong>Note:</strong><span> Support for adding an action and mime type in the visual editor is available in Android Studio 4.1 Canary 10 and higher.</span></aside> <p><strong>Known Issues</strong></p> <ul> <li>Support for deep link actions and mime types is not yet available in <a href="https://issuetracker.google.com/issues/154166825">Manifest Merger</a>. Until that work is completed, any generated <code translate="no" dir="ltr">&lt;intent-filter&gt;</code> elements from the <code translate="no" dir="ltr">&lt;nav-graph&gt;</code> element in your manifest won&#39;t include your mime type in its <code translate="no" dir="ltr">&lt;data&gt;</code> element or your custom <code translate="no" dir="ltr">&lt;action&gt;</code>. You must manually add an appropriate <code translate="no" dir="ltr">&lt;intent-filter&gt;</code> to your manifest.</li> </ul> <h3 id="2.3.0-rc01" data-text="Version 2.3.0-rc01" tabindex="-1">Version 2.3.0-rc01</h3> <p>June 10, 2020</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.3.0-rc01</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/ccc6e95c574b66563952c33fbe26888b93a0e0cb..098293bcdb2b40862b3e287d38dd82ac8a9c6d38/navigation">Version 2.3.0-rc01 contains these commits.</a></p> <p><strong>Bug Fixes</strong></p> <ul> <li>Fixed a <code translate="no" dir="ltr">NullPointerException</code> when replacing an instance of a destination with no arguments with another instance <em>with</em> arguments with <code translate="no" dir="ltr">singleTop</code>. (<a href="https://issuetracker.google.com/issues/158006669">b/158006669</a>)</li> <li>All <code translate="no" dir="ltr">destination is unknown</code> exceptions thrown by <code translate="no" dir="ltr">NavController</code> now have additional debugging information to help determine the state of the <code translate="no" dir="ltr">NavController</code>. (<a href="https://issuetracker.google.com/issues/157764916">b/157764916</a>)</li> </ul> <h3 id="2.3.0-beta01" data-text="Version 2.3.0-beta01" tabindex="-1">Version 2.3.0-beta01</h3> <p>May 20, 2020</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.3.0-beta01</code> are released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/942518f415d35ff9f2ff78f312c076c673468877..ccc6e95c574b66563952c33fbe26888b93a0e0cb/navigation">Version 2.3.0-beta01 contains these commits.</a></p> <p><strong>Bug Fixes</strong></p> <ul> <li>Fixed an issue where the <code translate="no" dir="ltr">Lifecycle</code> of the <code translate="no" dir="ltr">NavBackStackEntry</code> would not be properly updated after process death. (<a href="https://issuetracker.google.com/issues/155218371">b/155218371</a>)</li> <li><code translate="no" dir="ltr">OnDestinationChangedListener</code> instances registered before calling <code translate="no" dir="ltr">setGraph()</code> are now properly sent the restored destination after a process death. (<a href="https://issuetracker.google.com/issues/155218371">b/155218371</a>)</li> <li>When using <code translate="no" dir="ltr">singleTop</code>, the <code translate="no" dir="ltr">NavBackStackEntry</code> now correctly has its arguments updated and the updated arguments are sent to all <code translate="no" dir="ltr">OnDestinationChangeListener</code> instances. (<a href="https://issuetracker.google.com/issues/156545508">b/156545508</a>)</li> </ul> <p><strong>Dependency Updates</strong></p> <ul> <li>The <code translate="no" dir="ltr">NavigationUI</code> artifact now depends on <a href="/jetpack/androidx/releases/customview#1.1.0-rc01">CustomView <code translate="no" dir="ltr">1.1.0-rc01</code></a> and <a href="/jetpack/androidx/releases/drawerlayout#1.1.0-rc01">DrawerLayout <code translate="no" dir="ltr">1.1.0-rc01</code></a>. (<a href="https://android-review.googlesource.com/1309696">aosp/1309696</a>)</li> </ul> <h3 id="2.3.0-alpha06" data-text="Version 2.3.0-alpha06" tabindex="-1">Version 2.3.0-alpha06</h3> <p>April 29, 2020</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.3.0-alpha06</code> is released. (<a href="https://android.googlesource.com/platform/frameworks/support/+log/24daa503442fcd3e44ada60cf1da41df2815c045..942518f415d35ff9f2ff78f312c076c673468877/navigation">Version 2.3.0-alpha06 contains these commits.</a>)</p> <p><strong>New Features</strong></p> <ul> <li>Deep linking has been expanded to support <code translate="no" dir="ltr">app:action</code> and <code translate="no" dir="ltr">app:mimeType</code> in addition to the <code translate="no" dir="ltr">app:uri</code> previously available. NavController now supports navigating by any combination of these fields via the new <code translate="no" dir="ltr">NavDeepLinkRequest</code> class. (<a href="https://issuetracker.google.com/issues/136573074">b/136573074</a>, <a href="https://issuetracker.google.com/issues/135334841">b/135334841</a>)</li> </ul> <aside class="note"><strong>Note:</strong><span> Support for deep link actions and mime types is not yet available in Android Studio or in <a href="https://issuetracker.google.com/issues/154166825">Manifest Merger</a>. Until those are completed, you won&#39;t see the new attributes in the visual editor and any generated <code translate="no" dir="ltr">&lt;intent-filter&gt;</code> elements won&#39;t include your mime type in its <code translate="no" dir="ltr">&lt;data&gt;</code> element or your custom <code translate="no" dir="ltr">&lt;action&gt;</code>. You can add the attributes manually to the <code translate="no" dir="ltr">&lt;deeplink&gt;</code> element in XML and manually add an <code translate="no" dir="ltr">&lt;intent-filter&gt;</code> to your manifest, respectively.</span></aside> <p><strong>API Changes</strong></p> <ul> <li>Greatly expanded the Kotlin DSL support for Dynamic Navigation destinations. (<a href="https://issuetracker.google.com/issues/148969800">b/148969800</a>)</li> </ul> <p><strong>Bug Fixes</strong></p> <ul> <li>Fixed an issue where deep link Intents would be ignored when using a nested start destination. (<a href="https://issuetracker.google.com/issues/154532067">b/154532067</a>)</li> </ul> <h3 id="2.3.0-alpha05" data-text="Version 2.3.0-alpha05" tabindex="-1">Version 2.3.0-alpha05</h3> <p>April 15, 2020</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.3.0-alpha05</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/8744680798c115f612a99148c5a5c3ad4bd6fbf5..24daa503442fcd3e44ada60cf1da41df2815c045/navigation">Version 2.3.0-alpha05 contains these commits.</a></p> <p><strong>New Features</strong></p> <ul> <li>For <a href="/guide/navigation/navigation-dynamic#included">dynamic graph includes</a> using <code translate="no" dir="ltr">&lt;include-dynamic&gt;</code>, you no longer need to specify <code translate="no" dir="ltr">app:graphPackage</code> and a default one will be used by adding <code translate="no" dir="ltr">moduleName</code> suffix to the <code translate="no" dir="ltr">applicationId</code> after a dot. If you do need to customize your <code translate="no" dir="ltr">graphPackage</code>, an <code translate="no" dir="ltr">${applicationId}</code> placeholder is now supported. (<a href="https://issuetracker.google.com/issues/152696768">b/152696768</a>)</li> <li>The Navigation Graph Kotlin DSL now exposes a <code translate="no" dir="ltr">defaultArguments</code> <code translate="no" dir="ltr">Map</code> for actions, mirroring the ability to set default values on <code translate="no" dir="ltr">&lt;action&gt;</code> elements in Navigation XML files. (<a href="https://issuetracker.google.com/issues/150345605">b/150345605</a>)</li> </ul> <p><strong>Bug Fixes</strong></p> <ul> <li>From <a href="/androidx/releases/navigation#2.2.2">Navigation 2.2.2</a>: Fixed an <code translate="no" dir="ltr">IllegalStateException</code> when deep linking to the start destination of your graph when you have multiple <code translate="no" dir="ltr">NavHostFragment</code> instances in your Activity. (<a href="https://issuetracker.google.com/issues/147378752">b/147378752</a>)</li> </ul> <p><strong>Dependency updates</strong></p> <ul> <li>Navigation now depends on <a href="/jetpack/androidx/releases/fragment#1.2.4">Fragment <code translate="no" dir="ltr">1.2.4</code></a>. (<a href="https://android-review.googlesource.com/1277325">aosp/1277325</a>)</li> <li>Dynamic Navigation now depends on <a href="/reference/com/google/android/play/core/release-notes#1-7-2">Play Core <code translate="no" dir="ltr">1.7.2</code></a>. (<a href="https://android-review.googlesource.com/1282257">aosp/1282257</a>)</li> </ul> <h3 id="2.3.0-alpha04" data-text="Version 2.3.0-alpha04" tabindex="-1">Version 2.3.0-alpha04</h3> <p>March 18, 2020</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.3.0-alpha04</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/666ae665acfcfa2a20eccc18e4494808169742f4..8744680798c115f612a99148c5a5c3ad4bd6fbf5/navigation">Version 2.3.0-alpha04 contains these commits.</a></p> <p><strong>New Features</strong></p> <ul> <li>Added support for feature module activity and fragment destinations in the Navigation Kotlin DSL. (<a href="https://issuetracker.google.com/issues/148969800">b/148969800</a>)</li> </ul> <p><strong>API Changes</strong></p> <ul> <li>The <code translate="no" dir="ltr">DynamicExtras</code> class no longer uses a builder pattern and can now be constructed directly. (<a href="https://android-review.googlesource.com/1253671">aosp/1253671</a>)</li> <li><code translate="no" dir="ltr">DynamicActivityNavigator</code> now takes a <code translate="no" dir="ltr">Context</code> in its constructor rather than an <code translate="no" dir="ltr">Activity</code>. (<a href="https://android-review.googlesource.com/1250252">aosp/1250252</a>)</li> </ul> <p><strong>Bug Fixes</strong></p> <ul> <li><code translate="no" dir="ltr">NavigationUI</code> no longer ignores empty labels (i.e., a destination with <code translate="no" dir="ltr">android:label=””</code>) and now correctly sets the title to an empty string. (<a href="https://issuetracker.google.com/issues/148679860">b/148679860</a>)</li> </ul> <p><strong>Dependency Updates</strong></p> <ul> <li>The Navigation Dynamic Features artifacts now depend on Play Core <code translate="no" dir="ltr">1.6.5</code>. (<a href="https://issuetracker.google.com/issues/149556401">b/149556401</a>)</li> </ul> <h3 id="2.3.0-alpha03" data-text="Version 2.3.0-alpha03" tabindex="-1">Version 2.3.0-alpha03</h3> <p>March 4, 2020</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.3.0-alpha03</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/6f7b9ed69dc63e3c2c2b02ee1155b6009a9d5f82..666ae665acfcfa2a20eccc18e4494808169742f4/navigation">Version 2.3.0-alpha03 contains these commits.</a></p> <p><strong>API Changes</strong></p> <ul> <li>Instead of relying on the concrete <code translate="no" dir="ltr">DrawerLayout</code> class, <code translate="no" dir="ltr">AppBarConfiguration</code> now uses the <code translate="no" dir="ltr">Openable</code> interface introduced in <a href="/jetpack/androidx/releases/customview#1.1.0-alpha02">CustomView <code translate="no" dir="ltr">1.1.0-alpha02</code></a> (which <code translate="no" dir="ltr">DrawerLayout</code> implements as of <a href="/jetpack/androidx/releases/drawerlayout#1.1.0-alpha03">DrawerLayout <code translate="no" dir="ltr">1.1.0-alpha04</code></a>), allowing you to use custom implementations of <code translate="no" dir="ltr">Openable</code> with <code translate="no" dir="ltr">NavigationUI</code>. (<a href="https:///issuetracker.google.com/issues/129030452">b/129030452</a>)</li> </ul> <p><strong>Bug Fixes</strong></p> <ul> <li>The <code translate="no" dir="ltr">navigation-common-ktx</code> ProGuard rules now correctly only keep the <code translate="no" dir="ltr">NavArgs</code> classes that are used rather than all <code translate="no" dir="ltr">NavArgs</code> instances. (<a href="https://issuetracker.google.com/issues/150213558">b/150213558</a>)</li> </ul> <p><strong>Dependency changes</strong></p> <ul> <li>Navigation has reverted its dependency on Core <code translate="no" dir="ltr">1.2.0</code> and now depends on Core <code translate="no" dir="ltr">1.1.0</code> to avoid forcing developers to move to a newer dependency when Navigation does not depend on any new APIs in Core <code translate="no" dir="ltr">1.2.0</code>.</li> </ul> <h3 id="2.3.0-alpha02" data-text="Version 2.3.0-alpha02" tabindex="-1">Version 2.3.0-alpha02</h3> <p>February 19, 2020</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.3.0-alpha02</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/a670497cb9ff2d13701f20ef5f25f14dd4548f22..6f7b9ed69dc63e3c2c2b02ee1155b6009a9d5f82/navigation">Version 2.3.0-alpha02 contains these commits.</a></p> <p><strong>New Features</strong></p> <ul> <li>The <code translate="no" dir="ltr">NavBackStackEntry</code> now allows you to access a <a href="/reference/androidx/lifecycle/SavedStateHandle"><code translate="no" dir="ltr">SavedStateHandle</code></a> suitable for storing small amounts of saved state that should be associated with a particular back stack entry. See <a href="/guide/navigation/navigation-programmatic#returning_a_result">Returning a result</a> for an example use case. (<a href="https://issuetracker.google.com/issues/79672220">b/79672220</a>)</li> </ul> <p><strong>API Changes</strong></p> <ul> <li>Convenience methods of <code translate="no" dir="ltr">getCurrentBackStackEntry()</code> and <code translate="no" dir="ltr">getPreviousBackStackEntry()</code> have been added to make it easier to retrieve a <code translate="no" dir="ltr">NavBackStackEntry</code> for the current and previous destinations. (<a href="https://issuetracker.google.com/issues/79672220">b/79672220</a>)</li> </ul> <p><strong>Bug Fixes</strong></p> <ul> <li><code translate="no" dir="ltr">navigateUp()</code> now passes the current destination’s arguments and the <a href="/reference/androidx/navigation/NavController#KEY_DEEP_LINK_INTENT"><code translate="no" dir="ltr">KEY_DEEP_LINK_INTENT</code></a> to the previous destination when launching your app on your own task stack. (<a href="https://issuetracker.google.com/issues/147456890">b/147456890</a>)</li> </ul> <p><strong>Dependency changes</strong></p> <ul> <li>Navigation now depends on <a href="/jetpack/androidx/releases/core#1.2.0">Core <code translate="no" dir="ltr">1.2.0</code></a>.</li> </ul> <h3 id="2.3.0-alpha01" data-text="Version 2.3.0-alpha01" tabindex="-1">Version 2.3.0-alpha01</h3> <p>February 5, 2020</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.3.0-alpha01</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/1420d9e061d8a0ff92bf7b3d28a6bdc4f20d13f5..a670497cb9ff2d13701f20ef5f25f14dd4548f22/navigation">Version 2.3.0-alpha01 contains these commits</a>.</p> <p><strong>New features</strong></p> <ul> <li>The new <code translate="no" dir="ltr">navigation-testing</code> artifact provides a <code translate="no" dir="ltr">TestNavHostController</code> class. This class provides an alternative to using a mock <code translate="no" dir="ltr">NavController</code> when <a href="/guide/navigation/navigation-testing">testing Navigation</a> that allows you to set the current destination and verify the back stack after navigation operations. (<a href="https://issuetracker.google.com/issues/140884273">b/140884273</a>)</li> <li>The new <code translate="no" dir="ltr">navigation-dynamic-features-fragment</code> (and its transitive dependency, <code translate="no" dir="ltr">navigation-dynamic-features-runtime</code>) allows you to include destinations or entire navigation graphs (via <code translate="no" dir="ltr">&lt;include-dynamic&gt;</code>) from <a href="/guide/app-bundle/dynamic-delivery">feature modules</a>, providing seamless installation of on-demand feature modules when navigating to those destinations. See <a href="/guide/navigation/navigation-dynamic">Navigate with feature modules</a> for more information. (<a href="https://issuetracker.google.com/issues/132170186">b/132170186</a>)</li> </ul> <p><strong>Bug fixes</strong></p> <ul> <li>From <a href="/jetpack/androidx/releases/navigation#2.2.1">Navigation <code translate="no" dir="ltr">2.2.1</code></a>: Deep links without query parameters now correctly ignore any query parameters rather than appending them to trailing <code translate="no" dir="ltr">{argument}</code> elements or not matching the deep link. (<a href="https://issuetracker.google.com/issues/147447512">b/147447512</a>)</li> <li>From <a href="/jetpack/androidx/releases/navigation#2.2.1">Navigation <code translate="no" dir="ltr">2.2.1</code></a>: The <code translate="no" dir="ltr">navigation-ui</code> ProGuard rules for <code translate="no" dir="ltr">DrawerArrowDrawable</code> have been updated to ensure that <code translate="no" dir="ltr">android.enableJetifier=true</code> is not required. (<a href="https://issuetracker.google.com/issues/147610424">b/147610424</a>)</li> <li>From <a href="/jetpack/androidx/releases/navigation#2.2.1">Navigation <code translate="no" dir="ltr">2.2.1</code></a>: The <code translate="no" dir="ltr">navigation-common-ktx</code> module now has a unique manifest package name instead of sharing the same manifest package name as <code translate="no" dir="ltr">navigation-runtime-ktx</code>. (<a href="https://android-review.googlesource.com/1141947/">aosp/1141947</a>)</li> </ul> <p><strong>Dependency updates</strong></p> <ul> <li>From <a href="/jetpack/androidx/releases/navigation#2.2.1">Navigation <code translate="no" dir="ltr">2.2.1</code></a>: Navigation <code translate="no" dir="ltr">2.2.1</code> now depends on <a href="/jetpack/androidx/releases/lifecycle#viewmodel-savedstate-2.2.0">Lifecycle ViewModel SavedState <code translate="no" dir="ltr">2.2.0</code></a> and <a href="/jetpack/androidx/releases/fragment#1.2.1">Fragment <code translate="no" dir="ltr">1.2.1</code></a>.</li> </ul> <h2 id="version_222_3" data-text="Version 2.2.2" tabindex="-1">Version 2.2.2</h2> <aside class="note"><strong>Note:</strong><span> This version is dependent on the Java 8 programming language. Please read <a href="/studio/write/java8-support">Use Java 8 language features</a> to learn how to use it in your project.</span></aside> <h3 id="2.2.2" data-text="Version 2.2.2" tabindex="-1">Version 2.2.2</h3> <p>April 15, 2020</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.2.2</code> are released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/3758a176b024534e6af6095fbd2f966627453d36..283af54f404f00bb16e7cbb90354681924d21ded/navigation">Version 2.2.2 contains these commits.</a></p> <p><strong>Bug Fixes</strong></p> <ul> <li>Fixed an <code translate="no" dir="ltr">IllegalStateException</code> when deep linking to the start destination of your graph when you have multiple <code translate="no" dir="ltr">NavHostFragment</code> instances in your Activity. (<a href="https://issuetracker.google.com/issues/147378752">b/147378752</a>)</li> <li><code translate="no" dir="ltr">NavigationUI</code> no longer ignores empty labels (i.e., a destination with <code translate="no" dir="ltr">android:label=””</code>) and now correctly sets the title to an empty string. This was previously released in <a href="/androidx/releases/navigation#2.3.0-alpha04">Navigation 2.3.0-alpha04</a>. (<a href="https://issuetracker.google.com/issues/148679860">b/148679860</a>)</li> <li>The <code translate="no" dir="ltr">navigation-common-ktx</code> ProGuard rules now correctly only keep the <code translate="no" dir="ltr">NavArgs</code> classes that are used rather than all <code translate="no" dir="ltr">NavArgs</code> instances. This was previously released in <a href="/androidx/releases/navigation#2.3.0-alpha03">Navigation 2.3.0-alpha03</a>. (<a href="https://issuetracker.google.com/issues/150213558">b/150213558</a></li> </ul> <p><strong>Dependency updates</strong></p> <ul> <li>Navigation now depends on <a href="/jetpack/androidx/releases/fragment#1.2.4">Fragment <code translate="no" dir="ltr">1.2.4</code></a>. (<a href="https://android-review.googlesource.com/1277325">aosp/1277325</a>)</li> </ul> <h2 id="version_221_3" data-text="Version 2.2.1" tabindex="-1">Version 2.2.1</h2> <aside class="note"><strong>Note:</strong><span> This version is dependent on the Java 8 programming language. Please read <a href="/studio/write/java8-support">Use Java 8 language features</a> to learn how to use it in your project.</span></aside> <h3 id="2.2.1" data-text="Version 2.2.1" tabindex="-1">Version 2.2.1</h3> <p>February 5, 2020</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.2.1</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/1420d9e061d8a0ff92bf7b3d28a6bdc4f20d13f5..3758a176b024534e6af6095fbd2f966627453d36/navigation">Version 2.2.1 contains these commits</a>.</p> <p><strong>Bug fixes</strong></p> <ul> <li>Deep links without query parameters now correctly ignore any query parameters rather than appending them to trailing <code translate="no" dir="ltr">{argument}</code> elements or not matching the deep link. (<a href="https://issuetracker.google.com/issues/147447512">b/147447512</a>)</li> <li>The <code translate="no" dir="ltr">navigation-ui</code> ProGuard rules for <code translate="no" dir="ltr">DrawerArrowDrawable</code> have been updated to ensure that <code translate="no" dir="ltr">android.enableJetifier=true</code> is not required. (<a href="https://issuetracker.google.com/issues/147610424">b/147610424</a>)</li> <li>The <code translate="no" dir="ltr">navigation-common-ktx</code> module now has a unique manifest package name instead of sharing the same manifest package name as <code translate="no" dir="ltr">navigation-runtime-ktx</code>. (<a href="https://android-review.googlesource.com/1141947/">aosp/1141947</a>)</li> </ul> <p><strong>Dependency updates</strong></p> <ul> <li>Navigation <code translate="no" dir="ltr">2.2.1</code> now depends on <a href="/jetpack/androidx/releases/lifecycle#viewmodel-savedstate-2.2.0">Lifecycle ViewModel SavedState <code translate="no" dir="ltr">2.2.0</code></a> and <a href="/jetpack/androidx/releases/fragment#1.2.1">Fragment <code translate="no" dir="ltr">1.2.1</code></a>.</li> </ul> <h2 id="version_220_3" data-text="Version 2.2.0" tabindex="-1">Version 2.2.0</h2> <aside class="note"><strong>Note:</strong><span> This version is dependent on the Java 8 programming language. Please read <a href="/studio/write/java8-support">Use Java 8 language features</a> to learn how to use it in your project.</span></aside> <h3 id="2.2.0" data-text="Version 2.2.0" tabindex="-1">Version 2.2.0</h3> <p>January 22, 2020</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.2.0</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/ecc5b7be8afa070b3e8381ad059773453c860324..1420d9e061d8a0ff92bf7b3d28a6bdc4f20d13f5/navigation">Version 2.2.0 contains these commits</a>.</p> <p><strong>Important changes since 2.1.0</strong></p> <ul> <li><strong>NavBackStackEntry</strong>: You can now call <code translate="no" dir="ltr">NavController.getBackStackEntry()</code>, passing in the ID of a destination or navigation graph on the back stack. The returned <code translate="no" dir="ltr">NavBackStackEntry</code> provides a Navigation-driven <code translate="no" dir="ltr">LifecycleOwner</code>, <code translate="no" dir="ltr">ViewModelStoreOwner</code> (the same returned by <code translate="no" dir="ltr">NavController.getViewModelStoreOwner()</code>), and <code translate="no" dir="ltr">SavedStateRegistryOwner</code>, in addition to providing the arguments used to start that destination.</li> <li><strong>Lifecycle ViewModel SavedState Integration</strong>: <code translate="no" dir="ltr">SavedStateViewModelFactory</code> is now the default factory used when using <code translate="no" dir="ltr">by navGraphViewModels()</code> or the <code translate="no" dir="ltr">ViewModelProvider</code> constructor with a <code translate="no" dir="ltr">ViewModelStoreOwner</code> returned by <code translate="no" dir="ltr">NavController.getBackStackEntry()</code> or <code translate="no" dir="ltr">NavController.getViewModelStoreOwner()</code>.</li> <li><strong>Query Parameter Support for Deep Links</strong>: Deep links with query parameters now support reordered query parameters; arguments that have a default value or are nullable are now optional when matching deep links.</li> <li><strong>Improved Animation Support</strong>: <code translate="no" dir="ltr">NavHostFragment</code> now uses <code translate="no" dir="ltr">FragmentContainerView</code> from <a href="/jetpack/androidx/releases/fragment#1.2.0">Fragment 1.2.0</a>, fixing animation z-ordering issues and window insets dispatching to Fragments.</li> </ul> <h3 id="2.2.0-rc04" data-text="Version 2.2.0-rc04" tabindex="-1">Version 2.2.0-rc04</h3> <p>December 18, 2019</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.2.0-rc04</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/ac0a968ffb9334b853a1799aba7dac42fed70b5f..f251e0f6da084dca812052169c8f2032a3151604/navigation">Version 2.2.0-rc04 contains these commits</a>.</p> <p><strong>Bug fixes</strong></p> <ul> <li>Adjusted the default fade animations used by <code translate="no" dir="ltr">navigation-ui</code> to match the adjusted fade animations in <a href="/jetpack/androidx/releases/fragment#1.2.0-rc04">Fragment <code translate="no" dir="ltr">1.2.0-rc04</code></a>. (<a href="https://issuetracker.google.com/issues/145769814">b/145769814</a>)</li> </ul> <h3 id="2.2.0-rc03" data-text="Version 2.2.0-rc03" tabindex="-1">Version 2.2.0-rc03</h3> <p>December 4, 2019</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.2.0-rc03</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/b0b973c9bc89f9ad3efe3c06e41b72957f032a99..ac0a968ffb9334b853a1799aba7dac42fed70b5f/navigation">Version 2.2.0-rc03 contains these commits</a>.</p> <p><strong>Bug fixes</strong></p> <ul> <li>Fixed an issue with deep link parsing when using query parameters and an argument as the last part of the path that prevented more than one character of the final path argument from being parsed. (<a href="https://issuetracker.google.com/issues/144554689">b/144554689</a>)</li> <li>Fixed an issue with deep link parsing where optional parameters would receive <code translate="no" dir="ltr">&quot;@null&quot;</code> instead of <code translate="no" dir="ltr">null</code>. (<a href="https://issuetracker.google.com/issues/141613546">b/141613546</a>)</li> <li><code translate="no" dir="ltr">NavHostFragment</code> now correctly restores the graph after a configuration change when used with <code translate="no" dir="ltr">FragmentContainerView</code>. (<a href="https://issuetracker.google.com/issues/143752103">b/143752103</a>)</li> </ul> <p><strong>Dependency changes</strong></p> <ul> <li>Navigation now depends on Lifecycle <code translate="no" dir="ltr">2.2.0-rc03</code>, Lifecycle ViewModel SavedState <code translate="no" dir="ltr">1.0.0-rc03</code>, Activity <code translate="no" dir="ltr">1.1.0-rc03</code>, and Fragment <code translate="no" dir="ltr">1.2.0-rc03</code> where appropriate.</li> </ul> <h3 id="2.2.0-rc02" data-text="Version 2.2.0-rc02" tabindex="-1">Version 2.2.0-rc02</h3> <p>November 7, 2019</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.2.0-rc02</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/c378b9a2eae63d2701c82b0144af36e33d15c26a..b0b973c9bc89f9ad3efe3c06e41b72957f032a99/navigation">Version 2.2.0-rc02 contains these commits</a>.</p> <p><strong>Dependency changes</strong></p> <ul> <li>Navigation now depends on androidx.lifecycle <code translate="no" dir="ltr">2.2.0-rc02</code>.</li> </ul> <h3 id="2.2.0-rc01" data-text="Version 2.2.0-rc01" tabindex="-1">Version 2.2.0-rc01</h3> <p>October 23, 2019</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.2.0-rc01</code> is released with no changes since <code translate="no" dir="ltr">2.2.0-beta01</code>. <a href="https://android.googlesource.com/platform/frameworks/support/+log/2180ea57914af961d4f2bb43802b42ae0d1802e0..c378b9a2eae63d2701c82b0144af36e33d15c26a/navigation">Version 2.2.0-rc01 contains these commits</a>.</p> <h3 id="2.2.0-beta01" data-text="Version 2.2.0-beta01" tabindex="-1">Version 2.2.0-beta01</h3> <p>October 9, 2019</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.2.0-beta01</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/b08258a10a1c5db71bfaaeee2220bbc5e775fe5f..2180ea57914af961d4f2bb43802b42ae0d1802e0/navigation">Version 2.2.0-beta01 contains these commits</a>.</p> <p><strong>New features</strong></p> <ul> <li><code translate="no" dir="ltr">NavDestination</code> and its subclasses now override <code translate="no" dir="ltr">toString()</code> to provide more helpful information when debugging. (<a href="https://issuetracker.google.com/issues/141264986">b/141264986</a>)</li> </ul> <p><strong>Behavior changes</strong></p> <ul> <li>Extra query parameters are now ignored when matching deep links rather than causing the match to fail. (<a href="https://issuetracker.google.com/issues/141482822">b/141482822</a>)</li> </ul> <p><strong>Bug fixes</strong></p> <ul> <li>Fixed an issue where arguments in a deep link’s path would be ignored if query parameters were also specified. (<a href="https://issuetracker.google.com/issues/141505755">b/141505755</a>)</li> <li>The <code translate="no" dir="ltr">navArgs()</code> Kotlin extension on <code translate="no" dir="ltr">Activity</code> now has a better error message when there are no extras. (<a href="https://issuetracker.google.com/issues/141408999">b/141408999</a>)</li> <li>Safe Args generated <code translate="no" dir="ltr">Directions</code> Java classes now contain default values. (<a href="https://issuetracker.google.com/issues/141099045">b/141099045</a>)</li> <li>Safe Args generated <code translate="no" dir="ltr">Args</code> Java classes now contain default values. (<a href="https://issuetracker.google.com/issues/140123727">b/140123727</a>)</li> <li>When using a <code translate="no" dir="ltr">Toolbar</code>, <code translate="no" dir="ltr">NavigationUI</code> no longer animates the text change when moving between two top level destinations. (<a href="https://issuetracker.google.com/issues/140848160">b/140848160</a>)</li> </ul> <h3 id="2.2.0-alpha03" data-text="Version 2.2.0-alpha03" tabindex="-1">Version 2.2.0-alpha03</h3> <p>September 18, 2019</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.2.0-alpha03</code> is released. <a href="https://android.googlesource.com/platform/frameworks/support/+log/2d0a22f1ddeb3b7e9d0002f0e089a25b7ef64f1c..391dc4bc729d2973a6e6e57916d3008c58026e56/navigation">Version 2.2.0-alpha03 contains these commits</a>.</p> <p><strong>Behavior changes</strong></p> <ul> <li>Calling <code translate="no" dir="ltr">setViewModelStore()</code> after calling <code translate="no" dir="ltr">setGraph</code> now results in an <code translate="no" dir="ltr">IllegalStateException</code>. This should always be set by the <code translate="no" dir="ltr">NavHost</code> as part of the initial setup to ensure that all <code translate="no" dir="ltr">NavBackStackEntry</code> instances have a consistent storage for <code translate="no" dir="ltr">ViewModel</code> instances. (<a href="https://android-review.googlesource.com/1111821">aosp/1111821</a>)</li> </ul> <p><strong>Bug fixes</strong></p> <ul> <li>Fixed a <code translate="no" dir="ltr">ConcurrentModificationException</code> when using <code translate="no" dir="ltr">ViewModel</code> instances attached to multiple different navigation graph scoped <code translate="no" dir="ltr">ViewModelStore</code> instances. (<a href="https://android-review.googlesource.com/1112257">aosp/1112257</a>)</li> </ul> <h3 id="2.2.0-alpha02" data-text="Version 2.2.0-alpha02" tabindex="-1">Version 2.2.0-alpha02</h3> <p>September 5, 2019</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.2.0-alpha02</code> is released. The commits included in this version can be found <a href="https://android.googlesource.com/platform/frameworks/support/+log/23fecdb1097a69a528ab6109f661b4e46123aecc..2d0a22f1ddeb3b7e9d0002f0e089a25b7ef64f1c/navigation">here</a>.</p> <p><strong>New features</strong></p> <ul> <li>Deep links with query parameters now support reordered query parameters; arguments that have a default value or are nullable are now optional when matching deep links. (<a href="https://issuetracker.google.com/issues/133273839">b/133273839</a>)</li> <li>You can now call <code translate="no" dir="ltr">NavController.getBackStackEntry()</code>, passing in the ID of a destination or navigation graph on the back stack. The returned <code translate="no" dir="ltr">NavBackStackEntry</code> provides a Navigation-driven <code translate="no" dir="ltr">LifecycleOwner</code>, <code translate="no" dir="ltr">ViewModelStoreOwner</code> (the same returned by <code translate="no" dir="ltr">NavController.getViewModelStoreOwner()</code>), and <code translate="no" dir="ltr">SavedStateRegistryOwner</code>, in addition to providing the arguments used to start that destination. (<a href="https://android-review.googlesource.com/1101691">aosp/1101691</a>, <a href="https://android-review.googlesource.com/1101710">aosp/1101710</a>)</li> </ul> <p><strong>Bug fixes</strong></p> <ul> <li>Fixed an issue where adding a <code translate="no" dir="ltr">NavHostFragment</code> to <code translate="no" dir="ltr">ViewPager2</code> failed with an <code translate="no" dir="ltr">IllegalArgumentException</code>. (<a href="https://issuetracker.google.com/issues/133640271">b/133640271</a>)</li> <li><code translate="no" dir="ltr">NavInflater</code> now avoids calling <code translate="no" dir="ltr">getResourceName()</code> unnecessarily, speeding up inflation time by up to 40%. (<a href="https://issuetracker.google.com/issues/139213740">b/139213740</a>)</li> </ul> <h3 id="2.2.0-alpha01" data-text="Version 2.2.0-alpha01" tabindex="-1">Version 2.2.0-alpha01</h3> <p>August 7, 2019</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.2.0-alpha01</code> is released. The commits included in this version can be found <a href="https://android.googlesource.com/platform/frameworks/support/+log/e08a521e6ca90dc09329823c31c733d69a1164cf..23fecdb1097a69a528ab6109f661b4e46123aecc/navigation">here</a>.</p> <p><strong>New features</strong></p> <ul> <li><code translate="no" dir="ltr">SavedStateViewModelFactory</code> is now the default factory used when using <code translate="no" dir="ltr">by navGraphViewModels()</code> or the <code translate="no" dir="ltr">ViewModelProvider</code> constructor with a <code translate="no" dir="ltr">ViewModelStoreOwner</code> returned by <code translate="no" dir="ltr">NavController.getViewModelStoreOwner()</code>. (<a href="https://issuetracker.google.com/issues/135716331">b/135716331</a>)</li> </ul> <p><strong>API changes</strong></p> <ul> <li>From <a href="#2.1.0-rc01">Navigation <code translate="no" dir="ltr">2.1.0-rc01</code></a>: The deprecated <code translate="no" dir="ltr">getViewModelStore()</code> API on <code translate="no" dir="ltr">NavController</code> introduced in <code translate="no" dir="ltr">2.1.0-alpha02</code> has been removed. (<a href="https://android-review.googlesource.com/1091021">aosp/1091021</a>)</li> </ul> <p><strong>Bug fixes</strong></p> <ul> <li><code translate="no" dir="ltr">NavHostFragment</code> now uses <code translate="no" dir="ltr">FragmentContainerView</code>, fixing animation z-ordering issues and window insets dispatching to Fragments. (<a href="https://issuetracker.google.com/issues/137310379">b/137310379</a>)</li> </ul> <h2 id="version_210_3" data-text="Version 2.1.0" tabindex="-1">Version 2.1.0</h2> <h3 id="2.1.0" data-text="Version 2.1.0" tabindex="-1">Version 2.1.0</h3> <p>September 5, 2019</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.1.0</code> is released. The commits included in this version can be found <a href="https://android.googlesource.com/platform/frameworks/support/+log/d86f26b9b2b958f75b4f23161344cec32237c9ca..73f368c10e67f70c624a53d53828686746bf51bf/navigation">here</a>.</p> <p><strong>Important changes since 2.0.0</strong></p> <ul> <li><strong>Scoping ViewModels to a navigation graph</strong>: You can now create ViewModels that are scoped at the navigation graph level using the <code translate="no" dir="ltr">by navGraphViewModels()</code> property delegate for Kotlin users using the <code translate="no" dir="ltr">-ktx</code> libraries or by using the <code translate="no" dir="ltr">getViewModelStoreOwner()</code> API added to <code translate="no" dir="ltr">NavController</code>. See <a href="/guide/navigation/navigation-programmatic#share_ui-related_data_between_destinations_with_viewmodel">Share UI-related data between destinations</a> for more information.</li> <li><strong>Dialog destinations</strong>: You can now create <code translate="no" dir="ltr">&lt;dialog&gt;</code> destinations that will show a <code translate="no" dir="ltr">DialogFragment</code> when you <code translate="no" dir="ltr">navigate</code> to them. <code translate="no" dir="ltr">NavHostFragment</code> supports dialog destinations by default. See <a href="/guide/navigation/navigation-create-destinations#create-dialog">Create a destination from a DialogFragment</a> for more information.</li> <li><strong>Navigating by Uri</strong>: You can now <code translate="no" dir="ltr">navigate</code> using a <code translate="no" dir="ltr">Uri</code>, which uses the <code translate="no" dir="ltr">&lt;deepLink&gt;</code> you’ve added to a destination to navigate there. See <a href="/guide/navigation/navigation-navigate#uri">Navigate using Uri</a> for more information.</li> <li><strong>NavHostController</strong>: APIs used specifically for constructing a custom <code translate="no" dir="ltr">NavHost</code> have been moved to <code translate="no" dir="ltr">NavHostController</code>, allowing implementations to connect their <code translate="no" dir="ltr">NavController</code> to the hosting <code translate="no" dir="ltr">LifecycleOwner</code>, <code translate="no" dir="ltr">OnBackPressedDispatcher</code>, and <code translate="no" dir="ltr">ViewModelStore</code>.</li> </ul> <h3 id="2.1.0-rc01" data-text="Version 2.1.0-rc01" tabindex="-1">Version 2.1.0-rc01</h3> <p>August 7, 2019</p> <p><code translate="no" dir="ltr">androidx.navigation:navigation-*:2.1.0-rc01</code> is released. The commits included in this version can be found <a href="https://android.googlesource.com/platform/frameworks/support/+log/ec4f7aa322b7f2b5aa14aff6dca9475b0df1345c..d86f26b9b2b958f75b4f23161344cec32237c9ca/navigation">here</a>.</p> <p><strong>API changes</strong></p> <ul> <li>The deprecated <code translate="no" dir="ltr">getViewModelStore()</code> API on <code translate="no" dir="ltr">NavController</code> introduced in <code translate="no" dir="ltr">2.1.0-alpha02</code> has been removed. (<a href="https://android-review.googlesource.com/1091021">aosp/1091021</a>)</li> </ul> <h3 id="2.1.0-beta02" data-text="Version 2.1.0-beta02" tabindex="-1">Version 2.1.0-beta02</h3> <p>July 19, 2019</p> <p><code translate="no" dir="ltr">androidx.navigation:*:2.1.0-beta02</code> is released. The commits included in this version can be found <a href="https://android.googlesource.com/platform/frameworks/support/+log/e08a521e6ca90dc09329823c31c733d69a1164cf..ec4f7aa322b7f2b5aa14aff6dca9475b0df1345c/navigation">here</a>.</p> <aside class="note"><strong>Note:</strong><span> This version is dependent on the Java 8 programming language. Please read <a href="/studio/write/java8-support">Use Java 8 language features</a> to learn how to use it in your project.</span></aside> <p><strong>Bug fixes</strong></p> <ul> <li>Removed unintentional jacoco dependency that was introduced in <code translate="no" dir="ltr">2.1.0-beta01</code>. (<a href="https://issuetracker.google.com/issues/137782950">b/137782950</a>)</li> </ul> <h3 id="2.1.0-beta01" data-text="Version 2.1.0-beta01" tabindex="-1">Version 2.1.0-beta01</h3> <p>July 17, 2019</p> <p><code translate="no" dir="ltr">androidx.navigation:*:2.1.0-beta01</code> is released. The commits included in this version can be found <a href="https://android.googlesource.com/platform/frameworks/support/+log/498e1c39f543ee174434d4fc26e26219c298e9cd..e08a521e6ca90dc09329823c31c733d69a1164cf/navigation">here</a>.</p> <aside class="caution"><strong>Caution:</strong><span> This version contains an unintentional dependency on <code translate="no" dir="ltr">org.jacoco:org.jacoco.agent:0.8.3</code>, which can cause a build failure. Please update to the latest version, in which this dependency has been removed.</span></aside><aside class="note"><strong>Note:</strong><span> This version is dependent on the Java 8 programming language. Please read <a href="/studio/write/java8-support">Use Java 8 language features</a> to learn how to use it in your project.</span></aside> <p><strong>New features</strong></p> <ul> <li><code translate="no" dir="ltr">NavigationUI</code> now animates the removal of the Up button when using <code translate="no" dir="ltr">setupWithNavController()</code> with a <code translate="no" dir="ltr">Toolbar</code> or <code translate="no" dir="ltr">CollapsingToolbarLayout</code>. (<a href="https://issuetracker.google.com/issues/131403621">b/131403621</a>)</li> </ul> <p><strong>Bug fixes</strong></p> <ul> <li>Fixed a timing issue when using multiple NavHostFragments with the same container with <code translate="no" dir="ltr">findNavController()</code>. (<a href="https://issuetracker.google.com/issues/136021571">b/136021571</a>)</li> </ul> <h3 id="2.1.0-alpha06" data-text="Version 2.1.0-alpha06" tabindex="-1">Version 2.1.0-alpha06</h3> <p>July 2, 2019</p> <p><code translate="no" dir="ltr">androidx.navigation:*:2.1.0-alpha06</code> is released. The commits included in this version can be found <a href="https://android.googlesource.com/platform/frameworks/support/+log/067bb2bdba5ad5259e147e5f36ec20c5efa9ae42..498e1c39f543ee174434d4fc26e26219c298e9cd/navigation">here</a>.</p> <aside class="note"><strong>Note:</strong><span> This version is dependent on the Java 8 programming language. Please read <a href="/studio/write/java8-support">Use Java 8 language features</a> to learn how to use it in your project.</span></aside> <p><strong>New features</strong></p> <ul> <li>The <code translate="no" dir="ltr">app:navGraph</code> attribute used by NavHostFragment has now been moved to the <code translate="no" dir="ltr">navigation-runtime</code> artifact. Custom navigators that can be added via XML should use this attribute to gain integration with the Navigation Editor’s Host panel. (<a href="https://issuetracker.google.com/issues/133880955">b/133880955</a>)</li> </ul> <p><strong>API changes</strong></p> <ul> <li>The <code translate="no" dir="ltr">getViewModelStore()</code> API on <code translate="no" dir="ltr">NavController</code> has been deprecated in favor of the new <code translate="no" dir="ltr">getViewModelStoreOwner()</code> method that returns a <code translate="no" dir="ltr">ViewModelStoreOwner</code>. (<a href="https://android-review.googlesource.com/987010">aosp/987010</a>)</li> <li>The implementation of floating window destinations, such as <code translate="no" dir="ltr">&lt;dialog&gt;</code> destinations, has been generalized into a marker interface, <code translate="no" dir="ltr">FloatingWindow</code>, that all <code translate="no" dir="ltr">&lt;dialog&gt;</code> destinations now implement. NavigationUI methods for interacting with the top app bar now ignore <code translate="no" dir="ltr">FloatingWindow</code> destinations. (<a href="https://issuetracker.google.com/issues/133600763">b/133600763</a>)</li> </ul> <p><strong>Behavior changes</strong></p> <ul> <li>Navigation now correctly keeps its state in sync with what is seen on the screen when using a <code translate="no" dir="ltr">&lt;dialog&gt;</code> destination. As a consequence, Navigation now automatically pops <code translate="no" dir="ltr">&lt;dialog&gt;</code> destinations when you navigate to a non-dialog and non-activity destination, such as a <code translate="no" dir="ltr">&lt;fragment&gt;</code> destination. (<a href="https://issuetracker.google.com/issues/134089818">b/134089818</a>)</li> </ul> <p><strong>Bug fixes</strong></p> <ul> <li>Navigation now suppresses the animation that occurs when recreating the activity when handling a deep link, fixing a visual flash. (<a href="https://issuetracker.google.com/issues/130362979">b/130362979</a>)</li> <li>Fixed a bug where the Navigation back stack would be out of sync when popping a Fragment as the initial fragment is being added. (<a href="https://issuetracker.google.com/issues/133832218">b/133832218</a>)</li> </ul> <h3 id="2.1.0-alpha05" data-text="Version 2.1.0-alpha05" tabindex="-1">Version 2.1.0-alpha05</h3> <p>June 5, 2019</p> <p><code translate="no" dir="ltr">androidx.navigation:*:2.1.0-alpha05</code> is released. The commits included in this version can be found <a href="https://android.googlesource.com/platform/frameworks/support/+log/a2937df81230da03ed4121b65f7ef3eab0d9a42e..a3fc6e9c32e6438770cdb7201eaa1d6477521d82/navigation">here</a>.</p> <p><strong>API changes</strong></p> <ul> <li>Host related APIs on <code translate="no" dir="ltr">NavController</code> have been renamed and moved to a new subclass of <code translate="no" dir="ltr">NavController</code>, <code translate="no" dir="ltr">NavHostController</code>. (<a href="https://android-review.googlesource.com/966091">aosp/966091</a>)</li> <li>The <code translate="no" dir="ltr">NavController</code> <code translate="no" dir="ltr">setHostOnBackPressedDispatcherOwner()</code> method has been replaced with <code translate="no" dir="ltr">NavHostController</code>’s <code translate="no" dir="ltr">setOnBackPressedDispatcher()</code> method and now requires that you call <code translate="no" dir="ltr">setLifecycleOwner()</code> prior to calling it. (<a href="https://android-review.googlesource.com/965409">aosp/965409</a>)</li> <li><code translate="no" dir="ltr">NavHostController</code> now contains a <code translate="no" dir="ltr">enableOnBackPressed(boolean)</code> method that replaces the <code translate="no" dir="ltr">NavHostOnBackPressedManager</code> class that was previously returned by <code translate="no" dir="ltr">setHostOnBackPressedDispatcherOwner()</code>. (<a href="https://android-review.googlesource.com/966091">aosp/966091</a>)</li> </ul> <p><strong>Bug fixes</strong></p> <ul> <li>Fixed an issue where the back stack was not correct after navigating by URI. (<a href="https://issuetracker.google.com/issues/132509387">b/132509387</a>)</li> <li>Deep links automatically handled by NavController now only trigger once. (<a href="https://issuetracker.google.com/issues/132754763">b/132754763</a>)</li> </ul> <h3 id="2.1.0-alpha04" data-text="Version 2.1.0-alpha04" tabindex="-1">Version 2.1.0-alpha04</h3> <p>May 16, 2019</p> <p><code translate="no" dir="ltr">androidx.navigation:*:2.1.0-alpha04</code> is released. The commits included in this version can be found <a href="https://android.googlesource.com/platform/frameworks/support/+log/d339df058031dadca4676524c5c184e559553a2e..a2937df81230da03ed4121b65f7ef3eab0d9a42e/navigation">here</a>.</p> <p><strong>Bug fixes</strong></p> <ul> <li><code translate="no" dir="ltr">NavHostFragment</code> correctly respects <code translate="no" dir="ltr">app:defaultNavHost</code> when intercepting the system Back button events, fixing a regression in Navigation <code translate="no" dir="ltr">2.1.0-alpha03</code>. <a href="https://issuetracker.google.com/issues/132077777">b/132077777</a></li> <li><code translate="no" dir="ltr">DialogFragmentNavigator</code> now correctly handles <code translate="no" dir="ltr">popBackStack()</code> and <code translate="no" dir="ltr">navigateUp()</code> operations. <a href="https://issuetracker.google.com/issues/132576764">b/132576764</a></li> <li>Fixed an <code translate="no" dir="ltr">IllegalStateException: unknown destination during restore</code> issue when repeatedly navigating between nested graphs. <a href="https://issuetracker.google.com/issues/131733658">b/131733658</a></li> </ul> <h3 id="2.1.0-alpha03" data-text="Version 2.1.0-alpha03" tabindex="-1">Version 2.1.0-alpha03</h3> <p>May 7, 2019</p> <p><code translate="no" dir="ltr">androidx.navigation:*:2.1.0-alpha03</code> is released. The commits included in this version can be found <a href="https://android.googlesource.com/platform/frameworks/support/+log/3cc9b77742508c095f3268b60956967bce46f0ed..d339df058031dadca4676524c5c184e559553a2e/navigation">here</a>.</p> <p><strong>Known Issues</strong></p> <ul> <li>NavHostFragment continues to intercept the system Back button despite using <code translate="no" dir="ltr">app:defaultNavHost=&quot;false&quot;</code> <a href="https://issuetracker.google.com/issues/132077777">b/132077777</a></li> </ul> <p><strong>New features</strong></p> <ul> <li>You can now create <code translate="no" dir="ltr">&lt;dialog&gt;</code> destinations that will show a <code translate="no" dir="ltr">DialogFragment</code> when you <code translate="no" dir="ltr">navigate</code> to them. <code translate="no" dir="ltr">NavHostFragment</code> supports dialog destinations by default. <a href="https://issuetracker.google.com/issues/80267254">b/80267254</a></li> <li>In addition to calling <code translate="no" dir="ltr">navigate</code> with a resource id or a <code translate="no" dir="ltr">NavDirections</code> instance, you can now navigate via a <code translate="no" dir="ltr">Uri</code>, which uses the <code translate="no" dir="ltr">&lt;deepLink&gt;</code> you’ve added to a destination to navigate to the correct destination. <a href="https://issuetracker.google.com/issues/110412864">b/110412864</a></li> </ul> <p><strong>Behavior changes</strong></p> <ul> <li>The default animations provided by NavigationUI have been sped up from 400ms to 220ms to match the default animation speed of activities and fragments. <a href="https://issuetracker.google.com/issues/130055522">b/130055522</a></li> </ul> <p><strong>API changes</strong></p> <ul> <li>The <code translate="no" dir="ltr">createFragmentNavigator()</code> method of <code translate="no" dir="ltr">NavHostFragment</code> has been deprecated and its functionality moved to the new <code translate="no" dir="ltr">onCreateNavController()</code> method to make it more clear that this is the correct entry point of adding custom Navigators when subclassing <code translate="no" dir="ltr">NavHostFragment</code>. <a href="https://issuetracker.google.com/issues/122802849">b/122802849</a></li> <li>A <code translate="no" dir="ltr">hasDeepLink()</code> method has been added to <code translate="no" dir="ltr">NavDestination</code> to allow you to check if a given <code translate="no" dir="ltr">Uri</code> can be handled by that destination or, in the case of a <code translate="no" dir="ltr">NavGraph</code>, any destination in the navigation graph. <a href="https://issuetracker.google.com/issues/117437718">b/117437718</a></li> </ul> <p><strong>Bug fixes</strong></p> <ul> <li>Default arguments are now correctly passed to <code translate="no" dir="ltr">OnDestinationChangedListener</code> instances. <a href="https://issuetracker.google.com/issues/130630686">b/130630686</a></li> <li><code translate="no" dir="ltr">NavHostFragment</code> now intercepts system Back events using the <code translate="no" dir="ltr">OnBackPressedDispatcher</code>, fixing an issue when doing conditional navigation in Fragment lifecycle methods upon returning to a Fragment. <a href="https://issuetracker.google.com/issues/111598096">b/111598096</a></li> <li>For Safe Args, an <code translate="no" dir="ltr">android:defaultValue=”@null”</code> with an unspecified <code translate="no" dir="ltr">app:argType</code> is now properly inferred as a <code translate="no" dir="ltr">string</code> argument. <a href="https://issuetracker.google.com/issues/129629192">b/129629192</a></li> </ul> <h3 id="2.1.0-alpha02" data-text="Version 2.1.0-alpha02" tabindex="-1">Version 2.1.0-alpha02</h3> <p>April 3, 2019</p> <p><code translate="no" dir="ltr">androidx.navigation:*:2.1.0-alpha02</code> is released. The commits included in this version can be found <a href="https://android.googlesource.com/platform/frameworks/support/+log/d0b1a77198af283997fb25e6ca3f083fbf535179..3cc9b77742508c095f3268b60956967bce46f0ed/navigation">here</a>.</p> <p><strong>New features</strong></p> <ul> <li>You can now create ViewModels that are scoped at a navigation graph level via the <code translate="no" dir="ltr">by navGraphViewModels()</code> property delegate for Kotlin users or by using the <code translate="no" dir="ltr">getViewModelStore()</code> API added to <code translate="no" dir="ltr">NavController</code>. <a href="https://issuetracker.google.com/issues/111614463">b/111614463</a></li> </ul> <p><strong>API changes</strong></p> <ul> <li>You can now add an <code translate="no" dir="ltr">app:targetPackage</code> to an <code translate="no" dir="ltr">&lt;activity&gt;</code> destination to limit the matching package name. It supports <code translate="no" dir="ltr">app:targetPackage=&quot;${applicationId}&quot;</code> for restricting the package to your own application id. <a href="https://issuetracker.google.com/issues/110975456">b/110975456</a></li> </ul> <p><strong>Bug fixes</strong></p> <ul> <li>The <code translate="no" dir="ltr">android:name</code> for <code translate="no" dir="ltr">&lt;activity&gt;</code> destinations is no longer parsed into a Class at inflation time, preventing ClassNotFoundExceptions when using dynamic features. <a href="https://issuetracker.google.com/issues/124538597">b/124538597</a></li> </ul> <h3 id="2.1.0-alpha01" data-text="Version 2.1.0-alpha01" tabindex="-1">Version 2.1.0-alpha01</h3> <p>March 19, 2019</p> <p>This is the first alpha release of Navigation <code translate="no" dir="ltr">2.1.0</code>.</p> <p><strong>Dependency changes</strong></p> <ul> <li>Navigation now depends on <code translate="no" dir="ltr">androidx.core:core:1.0.1</code> and <code translate="no" dir="ltr">androidx.fragment:fragment:1.1.0-alpha05</code>. This release also removes the dependency on <code translate="no" dir="ltr">androidx.legacy:legacy-support-core-utils:1.0.0</code>. <a href="https://issuetracker.google.com/128632612">b/128632612</a></li> </ul> <p><strong>API Changes</strong></p> <ul> <li>A new <code translate="no" dir="ltr">Navigation.createNavigateOnClickListener(NavDirections)</code> method has been added as an alternative to creating a click listener with a resource ID and Bundle. <a href="https://issuetracker.google.com/127631752">b/127631752</a></li> <li><code translate="no" dir="ltr">FragmentNavigator.instantiateFragment</code> is now deprecated. The default implementation now uses <code translate="no" dir="ltr">FragmentFactory</code> to instantiate Fragments. <a href="https://issuetracker.google.com/119054429">b/119054429</a></li> </ul> <p><strong>Bug Fixes</strong></p> <ul> <li>Navigation no longer sends a null <code translate="no" dir="ltr">Bundle</code> when there are arguments attached to a destination, fixing an issue when using <code translate="no" dir="ltr">android:defaultValue=&quot;@null&quot;</code>. <a href="https://issuetracker.google.com/128531879">b/128531879</a></li> <li>Safe Args now depends on KotlinPoet 1.1.0, fixing an issue with extremely long package names. <a href="https://issuetracker.google.com/123654948">b/123654948</a></li> </ul> <h2 id="version_200_3" data-text="Version 2.0.0" tabindex="-1">Version 2.0.0</h2> <h3 id="2.0.0" data-text="Version 2.0.0" tabindex="-1">Version 2.0.0</h3> <p>March 14, 2019</p> <p>Navigation <code translate="no" dir="ltr">2.0.0</code> is released with no changes from <code translate="no" dir="ltr">2.0.0-rc02</code>.</p> <h3 id="2.0.0-rc02" data-text="Version 2.0.0-rc02" tabindex="-1">Version 2.0.0-rc02</h3> <p>March 6, 2019</p> <p>Navigation 2.0.0-rc02 provides new artifacts with the <code translate="no" dir="ltr">androidx.navigation</code> group ID and changes its dependencies to the AndroidX equivalents.</p> <p>The behavior of 2.0.0-rc02 is identical to behavior to Navigation 1.0.0-rc02 and no changes to your code should be required to update from 1.0.0-rc02 besides updating your dependencies to match the <a href="#declaring_dependencies">new dependencies</a>.</p> <p>Your project must have <a href="/jetpack/androidx/migrate">migrated to AndroidX</a> to use 2.X releases of Navigation. Navigation 1.0 stable will be the last release using the Support Library dependencies; all future development beyond 1.0 will be based on AndroidX and build upon the 2.0 stable release.</p> <h2 id="pre-androidx_dependencies_2" data-text="Pre-AndroidX Dependencies" tabindex="-1">Pre-AndroidX Dependencies</h2> <p>For the pre-AndroidX versions of Navigation, include these dependencies:</p> <pre class="prettyprint" translate="no" dir="ltr"><code translate="no" dir="ltr">dependencies { def nav_version = &#34;1.0.0&#34; implementation &#34;android.arch.navigation:navigation-fragment:$nav_version&#34; // For Kotlin use navigation-fragment-ktx implementation &#34;android.arch.navigation:navigation-ui:$nav_version&#34; // For Kotlin use navigation-ui-ktx } </code></pre> <p>For <a href="/topic/libraries/architecture/navigation/navigation-pass-data#Safe-args">Safe args</a>, add the following <strong>classpath</strong> in your <strong>top level</strong> <code translate="no" dir="ltr">build.gradle</code> file</p> <pre class="prettyprint" translate="no" dir="ltr"><code translate="no" dir="ltr">buildscript { repositories { google() } dependencies { classpath &#34;android.arch.navigation:navigation-safe-args-gradle-plugin:1.0.0&#34; } } </code></pre> <h2 id="version_100_3" data-text="Version 1.0.0" tabindex="-1">Version 1.0.0</h2> <h3 id="1.0.0" data-text="Version 1.0.0" tabindex="-1">Version 1.0.0</h3> <p>March 14, 2019</p> <p>Navigation <code translate="no" dir="ltr">1.0.0</code> is released with no changes from <code translate="no" dir="ltr">1.0.0-rc02</code>.</p> <h3 id="1.0.0-rc02" data-text="Version 1.0.0-rc02" tabindex="-1">Version 1.0.0-rc02</h3> <p>February 26, 2019</p> <p>This is the second release candidate for Navigation&#39;s 1.0.0 stable release. This release contains a number of bug fixes.</p> <p><strong>Bug Fixes</strong></p> <ul> <li>Fixed an issue where <code translate="no" dir="ltr">popBackStack()</code> would be ignored if the root graph did not have an ID <a href="https://issuetracker.google.com/126251695">b/126251695</a></li> <li><code translate="no" dir="ltr">navigateUp()</code> now correctly handles navigating back to your app&#39;s task when called after handling a deep link without <code translate="no" dir="ltr">FLAG_ACTIVITY_NEW_TASK</code> <a href="https://issuetracker.google.com/126082008">b/126082008</a></li> <li>Fixed an issue with <code translate="no" dir="ltr">ActivityNavigator.applyPopAnimationsToPendingTransition</code> not applying the correct pop exit animation <a href="https://issuetracker.google.com/126237567">b/126237567</a></li> <li>Kotlin code generated by Safe Args now properly escapes Kotlin keywords such as <code translate="no" dir="ltr">in</code> and <code translate="no" dir="ltr">fun</code> in the package name associated with the <code translate="no" dir="ltr">R</code> class. <a href="https://issuetracker.google.com/126020455">b/126020455</a></li> </ul> <h3 id="1.0.0-rc01" data-text="Version 1.0.0-rc01" tabindex="-1">Version 1.0.0-rc01</h3> <p>February 21, 2019</p> <p>This is a release candidate for Navigation&#39;s 1.0.0 stable release. This release contains one bug fix.</p> <p><strong>Bug Fixes</strong></p> <ul> <li>Fixed an issue when using Fragments and <code translate="no" dir="ltr">singleTop</code> navigation operations <a href="https://issuetracker.google.com/124294805">b/124294805</a></li> </ul> <h3 id="1.0.0-beta02" data-text="Version 1.0.0-beta02" tabindex="-1">Version 1.0.0-beta02</h3> <p>February 12, 2019</p> <p>This release includes a number of minor improvements and important bug fixes.</p> <p><strong>New Features</strong></p> <ul> <li>You can now use <code translate="no" dir="ltr">0</code> as an <code translate="no" dir="ltr">android:defaultValue</code> for <code translate="no" dir="ltr">reference</code> arguments. <a href="https://issuetracker.google.com/124248602">b/124248602</a></li> </ul> <p><strong>Behavior changes</strong></p> <ul> <li>Exact deep link matches are now prioritized over deep links with <code translate="no" dir="ltr">.*</code> or argument matches. <a href="https://issuetracker.google.com/123969518">b/123969518</a></li> </ul> <p><strong>Bug Fixes</strong></p> <ul> <li><code translate="no" dir="ltr">popBackStack()</code> and <code translate="no" dir="ltr">navigateUp</code> now correctly return <code translate="no" dir="ltr">false</code> when popping the last destination on the back stack, fixing a regression introduced in <code translate="no" dir="ltr">1.0.0-beta01</code>. <a href="https://issuetracker.google.com/123933201">b/123933201</a></li> <li>Navigation now correctly sets the <code translate="no" dir="ltr">ClassLoader</code> during restoration of saved instance state, avoiding issues when using custom classes in <code translate="no" dir="ltr">Navigator</code> saved state or in arguments sent to a <code translate="no" dir="ltr">NavDestination</code>. <a href="https://issuetracker.google.com/123893858">b/123893858</a></li> <li>Safe Args generated NavArgs classes no longer crash when restoring a <code translate="no" dir="ltr">Parcelable[]</code> argument from saved instance state. <a href="https://issuetracker.google.com/123963545">b/123963545</a></li> <li>Safe Args now properly cleans up unnecessary generated Kotlin classes. <a href="https://issuetracker.google.com/124120883">b/124120883</a></li> </ul> <h3 id="1.0.0-beta01" data-text="Version 1.0.0-beta01" tabindex="-1">Version 1.0.0-beta01</h3> <p>February 4, 2019</p> <p>This is the first beta release of Navigation; moving forward, the Navigation API is expected to stay stable until the next version unless there is a critical problem. This release contains some bug fixes and behavior changes.</p> <p><strong>Behavior changes</strong></p> <ul> <li>Navigation now ensures that argument default values are treated identically at runtime and through Safe Args. As a consequence, only arguments with an <code translate="no" dir="ltr">app:argType=&quot;reference&quot;</code> can have a default value point to another resource (for example, <code translate="no" dir="ltr">@color/colorPrimary</code>). Attempting to use a reference default value with a different <code translate="no" dir="ltr">app:argType</code> will result in an exception when parsing the navigation XML. <a href="https://issuetracker.google.com/123551990">b/123551990</a></li> <li>Safe Args now depends on Android Gradle Plugin 3.3.0 <a href="https://android-review.googlesource.com/888413">aosp/888413</a></li> <li>Safe Args now depends on Kotlin 1.3.20 <a href="https://android-review.googlesource.com/888414">aosp/888414</a></li> </ul> <p><strong>Bug Fixes</strong></p> <ul> <li>Safe Args can now be used in library and feature modules on all versions of the Android Gradle Plugin. <a href="https://issuetracker.google.com/121304903">b/121304903</a></li> <li>Fixed a regression that would cause a single <code translate="no" dir="ltr">popBackStack()</code> operation to pop all copies of a destination off the top of the back stack, rather than just a single destination at a time. <a href="https://issuetracker.google.com/123552990">b/123552990</a></li> <li>Fixed an issue where the <code translate="no" dir="ltr">FragmentNavigator</code> state would desynchronize with the <code translate="no" dir="ltr">NavController</code>&#39;s state, causing an <code translate="no" dir="ltr">IllegalStateException</code> when attempting to restore the back stack. <a href="https://issuetracker.google.com/123803044">b/123803044</a></li> <li>Fixed an issue where the <code translate="no" dir="ltr">NavigationUI</code> handled back arrow would not appear when using ProGuard with obfuscation. <a href="https://issuetracker.google.com/123449431">b/123449431</a></li> <li>The code generated by Safe Args now properly handles using an <code translate="no" dir="ltr">app:argType</code> pointing to a static inner class in the format <code translate="no" dir="ltr">.OuterClass$InnerClass</code>. <a href="https://issuetracker.google.com/123736741">b/123736741</a></li> <li>The Java code generated by Safe Args now properly handles global actions and deeply nested destinations. <a href="https://issuetracker.google.com/123347762">b/123347762</a></li> </ul> <h3 id="1.0.0-alpha11" data-text="Version 1.0.0-alpha11" tabindex="-1">Version 1.0.0-alpha11</h3> <p>January 23, 2019</p> <p>This is a hotfix release of <code translate="no" dir="ltr">1.0.0-alpha10</code> that fixes an issue with Safe Args.</p> <p><strong>Bug Fixes</strong></p> <ul> <li>Fixes an issue where Safe Args would fail to import the Directions class associated with global actions. <a href="https://issuetracker.google.com/123307342">b/123307342</a></li> </ul> <h3 id="1.0.0-alpha10" data-text="Version 1.0.0-alpha10" tabindex="-1">Version 1.0.0-alpha10</h3> <p>January 23, 2019</p> <p><strong>Known Issues</strong></p> <ul> <li>Safe Args fails to import the Directions class associated with global actions. <a href="https://issuetracker.google.com/123307342">b/123307342</a></li> </ul> <p>This release contains breaking API changes; please see the <em>Breaking Changes</em> section below.</p> <p><strong>New Features</strong></p> <ul> <li>Kotlin users can now use the <code translate="no" dir="ltr">by navArgs()</code> property delegate to lazily get a reference to a Safe Args generated <code translate="no" dir="ltr">NavArgs</code> class in an <code translate="no" dir="ltr">Activity</code> or <code translate="no" dir="ltr">Fragment</code>. <a href="https://issuetracker.google.com/122603367">b/122603367</a></li> <li>Safe Args now allows you to generate Kotlin code by applying the <code translate="no" dir="ltr">androidx.navigation.safeargs.kotlin</code> plugin. The Kotlin code is built specifically for Kotlin only modules, using default arguments and immutable classes over the builder pattern that is still available via the previous <code translate="no" dir="ltr">androidx.navigation.safeargs</code> plugin. <a href="https://issuetracker.google.com/110263087">b/110263087</a></li> </ul> <p><strong>Behavior Changes</strong></p> <ul> <li>Matching deep links are now biased towards the deep link that has the most matching arguments. <a href="https://issuetracker.google.com/118393029">b/118393029</a></li> <li>Calling <code translate="no" dir="ltr">setGraph()</code> on a <code translate="no" dir="ltr">NavController</code> will now reset the back stack. <a href="https://issuetracker.google.com/111450672">b/111450672</a></li> <li>Unknown deep links no longer throw an <code translate="no" dir="ltr">IllegalStateException</code>, but are ignored, fixing issues with nested or multiple <code translate="no" dir="ltr">NavHostFragment</code>s. <a href="https://issuetracker.google.com/121340440">b/121340440</a></li> </ul> <p><strong>Breaking Changes</strong></p> <ul> <li>The <code translate="no" dir="ltr">NavOptions.applyPopAnimationsToPendingTransition()</code> method for applying pop animations to an Activity has been moved to <code translate="no" dir="ltr">ActivityNavigator</code>. <a href="https://issuetracker.google.com/122413117">b/122413117</a></li> <li>Safe Args now avoids duplicating identical classes for actions without arguments. The return type for no argument methods in generated NavDirections classes is now <code translate="no" dir="ltr">NavDirections</code>. <a href="https://issuetracker.google.com/123233147">b/123233147</a></li> <li>Safe Args generated Directions classes no longer have a public constructor - you should only be interacting with the generated static methods. <a href="https://issuetracker.google.com/123031660">b/123031660</a></li> <li>Safe Args generated <code translate="no" dir="ltr">NavDirections</code> classes no longer have a public constructor - they should only be generated via the static methods in the generated Directions classes. <a href="https://issuetracker.google.com/122963206">b/122963206</a></li> <li>The returned <code translate="no" dir="ltr">Bundle</code> from <code translate="no" dir="ltr">NavDirections</code>&#39; <code translate="no" dir="ltr">getArguments()</code> is now marked as <code translate="no" dir="ltr">@NonNull</code> rather than <code translate="no" dir="ltr">@Nullable</code>. <a href="https://issuetracker.google.com/123243957">b/123243957</a></li> </ul> <p><strong>Bug Fixes</strong></p> <ul> <li><code translate="no" dir="ltr">NavDeepLinkBuilder</code> now correctly handles multiple simultaneous <code translate="no" dir="ltr">PendingIntent</code>s to the same destination by using the arguments you pass in to determine the uniqueness. <a href="https://issuetracker.google.com/120042732">b/120042732</a></li> <li><code translate="no" dir="ltr">NavController</code> now correctly handles <code translate="no" dir="ltr">popBackStack()</code> operations when using a nested <code translate="no" dir="ltr">NavHostFragment</code> or other child Fragments with a back stack. <a href="https://issuetracker.google.com/122770335">b/122770335</a></li> <li><code translate="no" dir="ltr">NavigationUI</code> now correctly sets the content description of the Up button. <a href="https://issuetracker.google.com/120395362">b/120395362</a></li> <li>Safe Args generated Directions classes now correctly handle global actions that have the same id as an action on a destination. <a href="https://issuetracker.google.com/122962504">b/122962504</a></li> <li>Safe Args generated <code translate="no" dir="ltr">NavDirections</code> classes now correctly have equal <code translate="no" dir="ltr">hashCode()</code> values when <code translate="no" dir="ltr">equals()</code> would return true. <a href="https://issuetracker.google.com/123043662">b/123043662</a></li> <li><code translate="no" dir="ltr">FragmentNavigator</code> now throws a better error message if you attempt to do custom <code translate="no" dir="ltr">FragmentTransactions</code> on the <code translate="no" dir="ltr">NavHostFragment</code>&#39;s <code translate="no" dir="ltr">FragmentManager</code>. You should always use <code translate="no" dir="ltr">getChildFragmentManager()</code>. <a href="https://issuetracker.google.com/112927148">b/112927148</a></li> </ul> <h3 id="1.0.0-alpha09" data-text="Version 1.0.0-alpha09" tabindex="-1">Version 1.0.0-alpha09</h3> <p>December 18, 2018</p> <p>This release contains breaking API changes; please see the <em>Breaking Changes</em> section below.</p> <p>We have chosen not to continue development of the <code translate="no" dir="ltr">android.arch.navigation:navigation-testing</code> artifact. While it has proven helpful for internal testing of <code translate="no" dir="ltr">NavController</code>, we strongly recommend alternate testing strategies, such as mocking the <code translate="no" dir="ltr">NavController</code> instance in order to verify that the correct <code translate="no" dir="ltr">navigate()</code> calls are being done. This approach is discussed in detail in the <a href="https://www.youtube.com/watch?v=2k8x8V77CrU">Single Activity talk at AndroidDevSummit 2018</a> and we&#39;ll be working on additional documentation specifically around testing with Navigation.</p> <p><strong>New Features</strong></p> <ul> <li><code translate="no" dir="ltr">MenuItem</code>s with <code translate="no" dir="ltr">menuCategory=&quot;secondary&quot;</code> will no longer pop the back stack when used with <code translate="no" dir="ltr">NavigationUI</code> methods. <a href="https://issuetracker.google.com/120104424">b/120104424</a></li> <li><code translate="no" dir="ltr">AppBarConfiguration</code> now allows you to set a fallback <a href="/reference/androidx/navigation/AppBarConfiguration.OnNavigateUpListener"><code translate="no" dir="ltr">OnNavigateUpListener</code></a> instance which will be called when <code translate="no" dir="ltr">navController.navigateUp()</code> returns <code translate="no" dir="ltr">false</code>. <a href="https://issuetracker.google.com/79993862">b/79993862</a> <a href="https://issuetracker.google.com/120690961">b/120690961</a></li> </ul> <p><strong>Breaking Changes</strong></p> <ul> <li>When using an <code translate="no" dir="ltr">&lt;argument&gt;</code> with an <code translate="no" dir="ltr">argType=&quot;reference&quot;</code>, Navigation no longer parses the reference, instead providing the raw resource ID itself. <a href="https://issuetracker.google.com/111736515">b/111736515</a></li> <li><a href="/reference/androidx/navigation/ui/NavigationUI#onNavDestinationSelected(android.view.MenuItem,%20androidx.navigation.NavController)"><code translate="no" dir="ltr">onNavDestinationSelected()</code></a> now pops back to the start destination of your navigation graph by default, making them consistent with the <code translate="no" dir="ltr">setup</code> methods. Add <code translate="no" dir="ltr">menuCategory=&quot;secondary&quot;</code> to your <code translate="no" dir="ltr">MenuItem</code> to avoid popping the back stack. <a href="https://android-review.googlesource.com/852869">aosp/852869</a></li> <li>The <code translate="no" dir="ltr">fromBundle()</code> methods of generated <code translate="no" dir="ltr">Args</code> classes now take a non-null <code translate="no" dir="ltr">Bundle</code> instead of a nullable <code translate="no" dir="ltr">Bundle</code> <a href="https://android-review.googlesource.com/845616">aosp/845616</a></li> </ul> <p><strong>Bug Fixes</strong></p> <ul> <li>Arguments are now properly parsed from deep links as the correct <code translate="no" dir="ltr">argType</code> instead of always as strings <a href="https://issuetracker.google.com/110273284">b/110273284</a></li> <li>Navigation now correctly exports its public resources <a href="https://issuetracker.google.com/121059552">b/121059552</a></li> <li>Safe Args is now compatible with Android Gradle Plugin 3.4 Canary 4 and higher <a href="https://issuetracker.google.com/119662045">b/119662045</a></li> </ul> <h3 id="1.0.0-alpha08" data-text="Version 1.0.0-alpha08" tabindex="-1">Version 1.0.0-alpha08</h3> <p>December 6, 2018</p> <p>This release contains breaking API changes; please see the <em>Breaking Changes</em> section below.</p> <p><strong>New Features</strong></p> <ul> <li>Destination labels, when used with <code translate="no" dir="ltr">NavigationUI</code> methods, will now automatically replace <code translate="no" dir="ltr">{argName}</code> instances in your <code translate="no" dir="ltr">android:label</code> with the correct argument <a href="https://issuetracker.google.com/80267266">b/80267266</a></li> <li>Navigation now depends on Support Library 28.0.0 <a href="https://issuetracker.google.com/120293333">b/120293333</a></li> </ul> <p><strong>Breaking Changes</strong></p> <ul> <li><code translate="no" dir="ltr">OnNavigatedListener</code> has been renamed to <code translate="no" dir="ltr">OnDestinationChangedListener</code> <a href="https://issuetracker.google.com/118670572">b/118670572</a></li> <li><code translate="no" dir="ltr">OnDestinationChangedListener</code> now also passes the <code translate="no" dir="ltr">Bundle</code> of arguments <a href="https://android-review.googlesource.com/837142">aosp/837142</a></li> <li>The <code translate="no" dir="ltr">app:clearTask</code> and <code translate="no" dir="ltr">app:launchDocument</code> attributes and their associated methods have been removed. Use <code translate="no" dir="ltr">app:popUpTo</code> with the root of your graph to remove all destinations from your back stack. <a href="https://issuetracker.google.com/119628354">b/119628354</a></li> <li><code translate="no" dir="ltr">ActivityNavigator.Extras</code> now uses a <code translate="no" dir="ltr">Builder</code> pattern and adds the ability to set any <code translate="no" dir="ltr">Intent.FLAG_ACTIVITY_</code> flags <a href="https://android-review.googlesource.com/828140">aosp/828140</a></li> <li><code translate="no" dir="ltr">NavController.onHandleDeepLink</code> has been renamed to <code translate="no" dir="ltr">handleDeepLink</code> <a href="https://android-review.googlesource.com/836063">aosp/836063</a></li> <li>Many classes and methods not meant for subclassing, such as <code translate="no" dir="ltr">NavOptions</code>, <code translate="no" dir="ltr">NavInflater</code>, <code translate="no" dir="ltr">NavDeepLinkBuilder</code>, and <code translate="no" dir="ltr">AppBarConfiguration</code>, have been made <code translate="no" dir="ltr">final</code> <a href="https://android-review.googlesource.com/835681">aosp/835681</a></li> <li>The deprecated <code translate="no" dir="ltr">NavHostFragment.setGraph()</code> method has been removed <a href="https://android-review.googlesource.com/835684">aosp/835684</a></li> <li>The deprecated <code translate="no" dir="ltr">NavigationUI.navigateUp(DrawerLayout, NavController)</code> method has been removed. <a href="https://android-review.googlesource.com/835684">aosp/835684</a></li> <li>Fragment creation has been moved to <code translate="no" dir="ltr">FragmentNavigator</code>, making it easier to delegate Fragment creation to a <code translate="no" dir="ltr">FragmentFactory</code>. <a href="https://issuetracker.google.com/119054429">b/119054429</a></li> <li>The constructor for <code translate="no" dir="ltr">NavGraphNavigator</code> no longer takes a <code translate="no" dir="ltr">Context</code> <a href="https://android-review.googlesource.com/835340">aosp/835340</a></li> <li><a href="/reference/androidx/navigation/NavigatorProvider">NavigatorProvider</a> is now a class, rather than an interface. The <code translate="no" dir="ltr">NavigatorProvider</code> returned by <a href="/reference/androidx/navigation/NavController#getNavigatorProvider()"><code translate="no" dir="ltr">getNavigatorProvider()</code></a> has not changed its functionality. <a href="https://android-review.googlesource.com/830660">aosp/830660</a></li> <li><code translate="no" dir="ltr">NavDestination.navigate()</code> has been removed. Call <code translate="no" dir="ltr">navigate()</code> on the <code translate="no" dir="ltr">Navigator</code> instead. <a href="https://android-review.googlesource.com/830663">aosp/830663</a></li> <li>Significant refactoring of <code translate="no" dir="ltr">Navigator</code>, removing the need for <code translate="no" dir="ltr">OnNavigatorNavigatedListener</code> and instead having <code translate="no" dir="ltr">navigate</code> return the <code translate="no" dir="ltr">NavDestination</code> that was navigated to.</li> <li><code translate="no" dir="ltr">Navigator</code> instances can no longer send pop events to the <code translate="no" dir="ltr">NavController</code>. Consider using a <a href="/reference/androidx/activity/OnBackPressedCallback"><code translate="no" dir="ltr">OnBackPressedCallback</code></a> to intercept back button presses and call <code translate="no" dir="ltr">navController.popBackStack()</code>. <a href="https://android-review.googlesource.com/833716">aosp/833716</a></li> </ul> <p><strong>Bug Fixes</strong></p> <ul> <li><code translate="no" dir="ltr">popUpTo</code> now works consistently when the destination is a <code translate="no" dir="ltr">&lt;navigation&gt;</code> element <a href="https://issuetracker.google.com/116831650">b/116831650</a></li> <li>Fixed a number of bugs that resulted in an <code translate="no" dir="ltr">IllegalArgumentException</code> when using nested graphs <a href="https://issuetracker.google.com/118713731">b/118713731</a> <a href="https://issuetracker.google.com/113611083">b/113611083</a> <a href="https://issuetracker.google.com/113346925">b/113346925</a> <a href="https://issuetracker.google.com/113305559">b/113305559</a></li> <li>The <code translate="no" dir="ltr">dataPattern</code> attribute of <code translate="no" dir="ltr">&lt;activity&gt;</code> destinations will now populate arguments from non-String arguments by calling <code translate="no" dir="ltr">toString()</code> <a href="https://issuetracker.google.com/120161365">b/120161365</a></li> </ul> <p><strong>Safe Args</strong></p> <ul> <li>Safe Args supports Serializable objects, including Enum values. Enum types can set a default value by using the enum literal without the class name (e.g. <code translate="no" dir="ltr">app:defaultValue=&quot;READ&quot;</code>) <a href="https://issuetracker.google.com/111316353">b/111316353</a></li> <li>Safe Args supports arrays of all supported types <a href="https://issuetracker.google.com/111487504">b/111487504</a></li> <li>Safe Args now ignores subfolders of resource directories <a href="https://issuetracker.google.com/117893516">b/117893516</a></li> <li>Safe Args adds <code translate="no" dir="ltr">@Override</code> annotations where appropriate <a href="https://issuetracker.google.com/117145301">b/117145301</a></li> </ul> <h3 id="1.0.0-alpha07" data-text="Version 1.0.0-alpha07" tabindex="-1">Version 1.0.0-alpha07</h3> <p>October 29, 2018</p> <p><strong>New Features</strong></p> <ul> <li>A new <a href="/reference/androidx/navigation/ui/AppBarConfiguration">AppBarConfiguration</a> class allows you to customize which destinations are considered <em>top-level</em> destinations. See the <a href="/topic/libraries/architecture/navigation/navigation-ui">updated documentation</a> for details. <a href="https://issuetracker.google.com/117333663">b/117333663</a></li> <li>You can now pass arguments to the start destination of your graph <a href="https://issuetracker.google.com/110300470">b/110300470</a></li> <li>Deep links now support custom schemes with periods, hyphens, and plus signs. <a href="https://issuetracker.google.com/112806402">b/112806402</a></li> </ul> <p><strong>Breaking Changes</strong></p> <ul> <li>The <code translate="no" dir="ltr">navigation-testing-ktx</code> module has been folded into the <code translate="no" dir="ltr">navigation-testing artifact</code> and will no longer be published.</li> <li>The <code translate="no" dir="ltr">navigation-testing</code> artifact now has a dependency on the Kotlin standard library. The API has been changed to be more consistent with Kotlin conventions, but you can continue to use it for tests written in Java.</li> <li>Metadata manifest registered navigation graphs are no longer supported. <a href="https://issuetracker.google.com/118355937">b/118355937</a></li> <li>Actions can no longer be attached to &lt;activity&gt; destinations. <a href="https://android-review.googlesource.com/c/platform/frameworks/support/+/785539">aosp/785539</a></li> </ul> <p><strong>Bug Fixes</strong></p> <ul> <li>Deep links now correctly parse query parameters. <a href="https://issuetracker.google.com/110057514">b/110057514</a></li> <li>Activity destinations now correctly apply all enter and exit animations. <a href="https://issuetracker.google.com/117145284">b/117145284</a></li> <li>Fixed crash that occurs after configuration changes when using custom Navigators. <a href="https://issuetracker.google.com/110763345">b/110763345</a></li> </ul> <p><strong>Safe Args</strong></p> <ul> <li>Safe args now have a fixed dependency on Android Gradle Plugin 3.2.1. <a href="https://issuetracker.google.com/113167627">b/113167627</a></li> <li>Directions can now be generated for inner classes. <a href="https://issuetracker.google.com/117407555">b/117407555</a></li> <li>Fixed an issue with generating Directions to an &lt;include&gt; graph. <a href="https://issuetracker.google.com/116542123">b/116542123</a></li> </ul> <h3 id="1.0.0-alpha06" data-text="Version 1.0.0-alpha06" tabindex="-1">Version 1.0.0-alpha06</h3> <p>September 20, 2018</p> <p><strong>New Features</strong></p> <ul> <li>Shared Element Transitions for Fragment and Activity destinations are now supported <a href="https://issuetracker.google.com/79665225">b/79665225</a>. For more information, see <a href="/topic/libraries/architecture/navigation/navigation-implementing#shared-element">Implement navigation with the Navigation Architecture Component</a></li> <li>Selecting an item in <code translate="no" dir="ltr">NavigationView</code> will now close any containing bottom sheet <a href="https://issuetracker.google.com/112158843">b/112158843</a></li> </ul> <p><strong>API Changes</strong></p> <ul> <li><strong>Breaking Change:</strong> The Navigator <code translate="no" dir="ltr">navigate()</code> method now takes a <code translate="no" dir="ltr">Navigator.Extras</code> parameter.</li> <li>NavController&#39;s <code translate="no" dir="ltr">getGraph()</code> method is now <code translate="no" dir="ltr">NonNull</code> <a href="https://issuetracker.google.com/112243286">b/112243286</a></li> </ul> <p><strong>Bug Fixes</strong></p> <ul> <li><code translate="no" dir="ltr">NavigationUI.setupWithNavController()</code> no longer leaks views if used with views from individual destinations <a href="https://issuetracker.google.com/111961977">b/111961977</a></li> <li>Navigator <code translate="no" dir="ltr">onSaveState()</code> is now only called once <a href="https://issuetracker.google.com/112627079">b/112627079</a></li> </ul> <p><strong>Safe Args</strong></p> <ul> <li>Navigation destination Directions classes now extend their parent&#39;s Directions class if it exists <a href="https://issuetracker.google.com/79871405">b/79871405</a></li> <li>Directions and Args classes now have a useful <code translate="no" dir="ltr">toString()</code> implementation <a href="https://issuetracker.google.com/111843389">b/111843389</a></li> </ul> <h3 id="1.0.0-alpha05" data-text="Version 1.0.0-alpha05" tabindex="-1">Version 1.0.0-alpha05</h3> <p>August 10, 2018</p> <p><strong>Bug Fixes</strong></p> <ul> <li>Fix a bug which cause incorrect backstack behavior. <a href="https://issuetracker.google.com/issues/111907708">b/111907708</a></li> <li>Fix a bug in <code translate="no" dir="ltr">equals()</code> of Generated Args classes. <a href="https://issuetracker.google.com/issues/111450897">b/111450897</a></li> <li>Fix a build failure in Safe Args. <a href="https://issuetracker.google.com/issues/109409713">b/109409713</a></li> <li>Fix a conversion from resource identifiers to java names <a href="https://issuetracker.google.com/issues/111602491">b/111602491</a></li> <li>Fix error messages about nullability in Safe Args plugin.</li> <li>Add missing nullability annotations.</li> </ul> <h3 id="1.0.0-alpha04" data-text="Version 1.0.0-alpha04" tabindex="-1">Version 1.0.0-alpha04</h3> <p>July 19, 2018</p> <p>Navigation <code translate="no" dir="ltr">1.0.0-alpha04</code> and the associated Safe Args gradle plugin contains a number of API changes, behavior changes, and bug fixes.</p> <p><strong>API / Behavior Changes</strong></p> <ul> <li>NavHostFragment will always set the current Fragment as the primary navigation fragment, ensuring that child fragment managers are popped before the outer NavController is popped <a href="https://issuetracker.google.com/issues/111345778">b/111345778</a></li> </ul> <p><strong>Safe Args</strong></p> <ul> <li><strong>Breaking Change:</strong> <code translate="no" dir="ltr">app:type</code> has been changed to <code translate="no" dir="ltr">app:argType</code> to avoid conflicts with other libraries such as ConstraintLayout 2.0.0-alpha1 <a href="https://issuetracker.google.com/issues/111110548">b/111110548</a></li> <li>Error messages from Safe Args are now clickable <a href="https://issuetracker.google.com/issues/111534438">b/111534438</a></li> <li>Args classes now confirms that <code translate="no" dir="ltr">NonNull</code> attributes are actually not null <a href="https://issuetracker.google.com/issues/111451769">b/111451769</a></li> <li>Additional <code translate="no" dir="ltr">NonNull</code> annotations have been added to NavDirections and Args generated classes <a href="https://issuetracker.google.com/issues/111455455">b/111455455</a> <a href="https://issuetracker.google.com/issues/111455456">b/111455456</a></li> </ul> <p><strong>Bug Fixes</strong></p> <ul> <li>Fixed an issue with the system back button after deep linking to a fragment destination <a href="https://issuetracker.google.com/issues/111515685">b/111515685</a></li> </ul> <h3 id="1.0.0-alpha03" data-text="Version 1.0.0-alpha03" tabindex="-1">Version 1.0.0-alpha03</h3> <p>July 12, 2018</p> <p>Navigation <code translate="no" dir="ltr">1.0.0-alpha03</code> and the associated Safe Args gradle plugin contains a number of API changes, behavior changes, and bug fixes.</p> <p><strong>API / Behavior Changes</strong></p> <ul> <li>A NavigationUI.setupWithNavController method for Toolbar has been added <a href="https://issuetracker.google.com/issues/109868820">b/109868820</a></li> <li>A NavigationUI.setupWithNavController method for CollapsingToolbarLayout has been added <a href="https://issuetracker.google.com/issues/110887183">b/110887183</a></li> <li>popBackStack() now returns false when the back stack is empty or when the given destination ID is not in the back stack <a href="https://issuetracker.google.com/issues/110893637">b/110893637</a></li> <li>FragmentNavigator now ignores navigation operations after FragmentManager has saved state, avoiding “Can not perform this action after onSaveInstanceState” exceptions <a href="https://issuetracker.google.com/issues/110987825">b/110987825</a></li> </ul> <p><strong>Safe Args</strong></p> <ul> <li><strong>Breaking Change:</strong> Non-alphanumeric characters in action and argument names will be replaced by camel casing in the respective NavDirections method names <ul> <li>E.g. <code translate="no" dir="ltr">DemoController.index</code> will become <code translate="no" dir="ltr">setDemoControllerIndex</code> <a href="https://issuetracker.google.com/issues/79995048">b/79995048</a></li> <li>E.g. <code translate="no" dir="ltr">action_show_settings</code> will become <code translate="no" dir="ltr">actionShowSettings</code> <a href="https://issuetracker.google.com/issues/79642240">b/79642240</a></li> </ul></li> <li><strong>Breaking Change:</strong> Arguments are now considered non-null by default. To allow null values on string and parcelable arguments, add <code translate="no" dir="ltr">app:nullable=&quot;true&quot;</code> <a href="https://issuetracker.google.com/issues/79642307">b/79642307</a></li> <li>You can now use <code translate="no" dir="ltr">app:type=&quot;long&quot;</code> with defaultValues in the form of “123L” <a href="https://issuetracker.google.com/issues/79563966">b/79563966</a></li> <li>Parcelable arguments are now supported, using a fully qualified class name for <code translate="no" dir="ltr">app:type</code>. The only default value supported is <code translate="no" dir="ltr">&quot;@null&quot;</code> <a href="https://issuetracker.google.com/issues/79563966">b/79563966</a></li> <li>Args classes now implement <code translate="no" dir="ltr">equals()</code> and <code translate="no" dir="ltr">hashCode()</code> <a href="https://issuetracker.google.com/issues/79642246">b/79642246</a></li> <li>The Safe Args plugin can now be applied to library projects <a href="https://issuetracker.google.com/issues/80036553">b/80036553</a></li> <li>The Safe Args plugin can now be applied to feature projects <a href="https://issuetracker.google.com/issues/110011752">b/110011752</a></li> </ul> <p><strong>Bug Fixes</strong></p> <ul> <li>Fixed issues when navigating during Fragment lifecycle methods <a href="https://issuetracker.google.com/issues/109916080">b/109916080</a></li> <li>Fixed issues when navigating through nested graphs multiple times <a href="https://issuetracker.google.com/issues/110178671">b/110178671</a></li> <li>Fixed issues when using <code translate="no" dir="ltr">setPopUpTo</code> with the first destination in the graph <a href="https://issuetracker.google.com/issues/109909461">b/109909461</a></li> <li>Fixed issue where all <code translate="no" dir="ltr">app:defaultValue</code> values were being passed as Strings <a href="https://issuetracker.google.com/issues/110710788">b/110710788</a></li> <li>aapt2 bundled with Android Gradle Plugin 3.2 Beta 01 now adds keep rules for every <code translate="no" dir="ltr">android:name</code> attribute in Navigation XML files <a href="https://issuetracker.google.com/issues/79874119">b/79874119</a></li> <li>Fixed memory leak when replacing the default FragmentNavigator <a href="https://issuetracker.google.com/issues/110900142">b/110900142</a></li> </ul> <h3 id="1.0.0-alpha02" data-text="Version 1.0.0-alpha02" tabindex="-1">Version 1.0.0-alpha02</h3> <p>June 7, 2018</p> <p><strong>Behavior Changes</strong></p> <ul> <li><p><code translate="no" dir="ltr">FragmentNavigator</code> now uses <code translate="no" dir="ltr">setReorderingAllowed(true)</code>. <a href="https://issuetracker.google.com/issues/109826220">b/109826220</a></p></li> <li><p>Navigation now URLDecodes arguments parsed from deep links URLs. <a href="https://issuetracker.google.com/issues/79982454">b/79982454</a></p></li> </ul> <p><strong>Bug Fixes</strong></p> <ul> <li><p>Fixed an <code translate="no" dir="ltr">IllegalStateException</code> when calling navigate from Fragment lifecycle methods. <a href="https://issuetracker.google.com/issues/79632233">b/79632233</a></p></li> <li><p>Navigation now depends on Support Library 27.1.1 to fix flickering when using animations. <a href="https://issuetracker.google.com/issues/80160903">b/80160903</a></p></li> <li><p>Fixed an <code translate="no" dir="ltr">IllegalArgumentException</code> when using defaultNavHost=&quot;true&quot; as a child fragment. <a href="https://issuetracker.google.com/issues/79656847">b/79656847</a></p></li> <li><p>Fixed a <code translate="no" dir="ltr">StackOverflowError</code> when using NavDeepLinkBuilder. <a href="https://issuetracker.google.com/issues/109653065">b/109653065</a></p></li> <li><p>Fixed an <code translate="no" dir="ltr">IllegalArgumentException</code> when navigating back to a nested graph. <a href="https://issuetracker.google.com/issues/80453447">b/80453447</a></p></li> <li><p>Fixed an issue with overlapping Fragments when using <code translate="no" dir="ltr">launchSingleTop</code>. <a href="https://issuetracker.google.com/issues/79407969">b/79407969</a></p></li> <li><p>Navigation now builds the correct synthetic back stack for nested graphs. <a href="https://issuetracker.google.com/issues/79734195">b/79734195</a></p></li> <li><p>NavigationUI will now highlight the correct item when using a nested graph as a <code translate="no" dir="ltr">MenuItem</code>. <a href="https://issuetracker.google.com/issues/109675998">b/109675998</a></p></li> </ul> <p><strong>API Changes</strong></p> <ul> <li><p>The <code translate="no" dir="ltr">clearTask</code> attribute for actions and the associated API in <code translate="no" dir="ltr">NavOptions</code> has been deprecated. <a href="https://issuetracker.google.com/issues/80338878">b/80338878</a></p></li> <li><p>The <code translate="no" dir="ltr">launchDocument</code> attribute for actions and the associated API in <code translate="no" dir="ltr">NavOptions</code> has been deprecated. <a href="https://issuetracker.google.com/issues/109806636">b/109806636</a></p></li> </ul> <h3 id="1.0.0-alpha01" data-text="Version 1.0.0-alpha01" tabindex="-1">Version 1.0.0-alpha01</h3> <p>May 8, 2018</p> <p><a href="/topic/libraries/architecture/navigation/navigation-implementing">Navigation</a> provides a framework for building in-app navigation. This initial release is <code translate="no" dir="ltr">1.0.0-alpha01</code>.</p> <devsite-hats-survey class="nocontent" hats-id="VxqvKSur40kxBYCLVTd0SSGykbno" listnr-id="5207477"></devsite-hats-survey> </div> <devsite-recommendations display="in-page" hidden yield> </devsite-recommendations> <devsite-thumb-rating position="footer"> </devsite-thumb-rating> <devsite-recommendations id="recommendations-link" yield></devsite-recommendations> <div class="devsite-floating-action-buttons"> </div> </article> <devsite-content-footer class="nocontent"> <p>Content and code samples on this page are subject to the licenses described in the <a href="/license">Content License</a>. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.</p> <p>Last updated 2024-11-13 UTC.</p> </devsite-content-footer> <devsite-notification > </devsite-notification> <div class="devsite-content-data"> <template class="devsite-content-data-template"> [[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-11-13 UTC."],[],[]] </template> </div> </devsite-content> </main> <devsite-footer-promos class="devsite-footer"> <nav class="devsite-footer-promos nocontent" aria-label="Promotions"> <ul class="devsite-footer-promos-list"> <li class="devsite-footer-promo"> <a href="//x.com/AndroidDev" class="devsite-footer-promo-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer X Promo" > <picture> <source class="devsite-dark-theme" srcset="https://developer.android.com/_static/android/images/logo-x_dt.svg" media="(prefers-color-scheme: dark)" loading="lazy" alt="X"> <img class="devsite-footer-promo-icon" src="/_static/android/images/logo-x.svg" loading="lazy" alt="X"> </picture> <span class="devsite-footer-promo-label"> X </span> </a> <div class="devsite-footer-promo-description">Follow @AndroidDev on X</div> </li> <li class="devsite-footer-promo"> <a href="//www.youtube.com/user/androiddevelopers" class="devsite-footer-promo-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer YouTube Promo" > <picture> <source class="devsite-dark-theme" srcset="https://developer.android.com/_static/android/images/logo-youtube_dt.svg" media="(prefers-color-scheme: dark)" loading="lazy" alt="YouTube"> <img class="devsite-footer-promo-icon" src="//www.gstatic.com/images/icons/material/product/2x/youtube_48dp.png" loading="lazy" alt="YouTube"> </picture> <span class="devsite-footer-promo-label"> YouTube </span> </a> <div class="devsite-footer-promo-description">Check out Android Developers on YouTube</div> </li> <li class="devsite-footer-promo"> <a href="//www.linkedin.com/showcase/androiddev" class="devsite-footer-promo-title gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer LinkedIn Promo" > <picture> <source class="devsite-dark-theme" srcset="https://developer.android.com/_static/android/images/logo-linkedin_dt.svg" media="(prefers-color-scheme: dark)" loading="lazy" alt="LinkedIn"> <img class="devsite-footer-promo-icon" src="/_static/android/images/logo-linkedin.svg" loading="lazy" alt="LinkedIn"> </picture> <span class="devsite-footer-promo-label"> LinkedIn </span> </a> <div class="devsite-footer-promo-description">Connect with the Android Developers community on LinkedIn</div> </li> </ul> </nav> </devsite-footer-promos> <devsite-footer-linkboxes class="devsite-footer"> <nav class="devsite-footer-linkboxes nocontent" aria-label="Footer links"> <ul class="devsite-footer-linkboxes-list"> <li class="devsite-footer-linkbox "> <h3 class="devsite-footer-linkbox-heading no-link">More Android</h3> <ul class="devsite-footer-linkbox-list"> <li class="devsite-footer-linkbox-item"> <a href="//www.android.com" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 1)" > Android </a> </li> <li class="devsite-footer-linkbox-item"> <a href="//www.android.com/enterprise/" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 2)" > Android for Enterprise </a> </li> <li class="devsite-footer-linkbox-item"> <a href="//www.android.com/security-center/" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 3)" > Security </a> </li> <li class="devsite-footer-linkbox-item"> <a href="//source.android.com" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 4)" > Source </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/news" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 5)" > News </a> </li> <li class="devsite-footer-linkbox-item"> <a href="//android-developers.googleblog.com/" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 6)" > Blog </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/podcasts" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 7)" > Podcasts </a> </li> </ul> </li> <li class="devsite-footer-linkbox "> <h3 class="devsite-footer-linkbox-heading no-link">Discover</h3> <ul class="devsite-footer-linkbox-list"> <li class="devsite-footer-linkbox-item"> <a href="/games" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 1)" > Gaming </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/ml" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 2)" > Machine Learning </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/health-and-fitness" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 3)" > Health & Fitness </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/media" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 4)" > Camera & Media </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/privacy" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 5)" > Privacy </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/training/connectivity/5g" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 6)" > 5G </a> </li> </ul> </li> <li class="devsite-footer-linkbox "> <h3 class="devsite-footer-linkbox-heading no-link">Android Devices</h3> <ul class="devsite-footer-linkbox-list"> <li class="devsite-footer-linkbox-item"> <a href="/large-screens" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 1)" > Large screens </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/wear" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 2)" > Wear OS </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/chrome-os" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 3)" > ChromeOS devices </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/cars" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 4)" > Android for cars </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/tv" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 5)" > Android TV </a> </li> </ul> </li> <li class="devsite-footer-linkbox "> <h3 class="devsite-footer-linkbox-heading no-link">Releases</h3> <ul class="devsite-footer-linkbox-list"> <li class="devsite-footer-linkbox-item"> <a href="/about/versions/15" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 1)" > Android 15 </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/about/versions/14" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 2)" > Android 14 </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/about/versions/13" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 3)" > Android 13 </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/about/versions/12" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 4)" > Android 12 </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/about/versions/11" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 5)" > Android 11 </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/about/versions/10" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 6)" > Android 10 </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/about/versions/pie" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 7)" > Pie </a> </li> </ul> </li> <li class="devsite-footer-linkbox "> <h3 class="devsite-footer-linkbox-heading no-link">Documentation and Downloads</h3> <ul class="devsite-footer-linkbox-list"> <li class="devsite-footer-linkbox-item"> <a href="/studio/intro" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 1)" > Android Studio guide </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/guide" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 2)" > Developers guides </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/reference" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 3)" > API reference </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/studio" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 4)" > Download Studio </a> </li> <li class="devsite-footer-linkbox-item"> <a href="/ndk" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 5)" > Android NDK </a> </li> </ul> </li> <li class="devsite-footer-linkbox "> <h3 class="devsite-footer-linkbox-heading no-link">Support</h3> <ul class="devsite-footer-linkbox-list"> <li class="devsite-footer-linkbox-item"> <a href="//issuetracker.google.com/issues/new?component=190923&amp;template=841312" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 1)" > Report platform bug </a> </li> <li class="devsite-footer-linkbox-item"> <a href="//issuetracker.google.com/issues/new?component=192697" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 2)" > Report documentation bug </a> </li> <li class="devsite-footer-linkbox-item"> <a href="//support.google.com/googleplay/android-developer" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 3)" > Google Play support </a> </li> <li class="devsite-footer-linkbox-item"> <a href="https://g.co/userresearch/androiddeveloperfooter" class="devsite-footer-linkbox-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Link (index 4)" > Join research studies </a> </li> </ul> </li> </ul> </nav> </devsite-footer-linkboxes> <devsite-footer-utility class="devsite-footer"> <div class="devsite-footer-utility nocontent"> <nav class="devsite-footer-sites" aria-label="Other Google Developers websites"> <a href="https://developers.google.com/" class="devsite-footer-sites-logo-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Google Developers Link"> <picture> <source srcset="https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/android/images/lockup-google-for-developers-dark-theme.svg" media="(prefers-color-scheme: none)" class="devsite-dark-theme" loading="lazy" alt="Google Developers"> <img class="devsite-footer-sites-logo" src="https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/android/images/lockup-google-for-developers.svg" loading="lazy" alt="Google Developers"> </picture> </a> <ul class="devsite-footer-sites-list"> <li class="devsite-footer-sites-item"> <a href="//developer.android.com" class="devsite-footer-sites-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Android Link" > Android </a> </li> <li class="devsite-footer-sites-item"> <a href="//developer.chrome.com/home" class="devsite-footer-sites-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Chrome Link" > Chrome </a> </li> <li class="devsite-footer-sites-item"> <a href="//firebase.google.com" class="devsite-footer-sites-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Firebase Link" > Firebase </a> </li> <li class="devsite-footer-sites-item"> <a href="//cloud.google.com" class="devsite-footer-sites-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer Google Cloud Platform Link" > Google Cloud Platform </a> </li> <li class="devsite-footer-sites-item"> <a href="//developers.google.com/products/" class="devsite-footer-sites-link gc-analytics-event" data-category="Site-Wide Custom Events" data-label="Footer All products Link" > All products </a> </li> </ul> </nav> <nav class="devsite-footer-utility-links" aria-label="Utility links"> <ul class="devsite-footer-utility-list"> <li class="devsite-footer-utility-item "> <a class="devsite-footer-utility-link gc-analytics-event" href="//policies.google.com/privacy" data-category="Site-Wide Custom Events" data-label="Footer Privacy link" > Privacy </a> </li> <li class="devsite-footer-utility-item "> <a class="devsite-footer-utility-link gc-analytics-event" href="/license" data-category="Site-Wide Custom Events" data-label="Footer License link" > License </a> </li> <li class="devsite-footer-utility-item "> <a class="devsite-footer-utility-link gc-analytics-event" href="/distribute/marketing-tools/brand-guidelines" data-category="Site-Wide Custom Events" data-label="Footer Brand guidelines link" > Brand guidelines </a> </li> <li class="devsite-footer-utility-item glue-cookie-notification-bar-control"> <a class="devsite-footer-utility-link gc-analytics-event" href="#" data-category="Site-Wide Custom Events" data-label="Footer Manage cookies link" aria-hidden="true" > Manage cookies </a> </li> <li class="devsite-footer-utility-item devsite-footer-utility-button"> <span class="devsite-footer-utility-description">Get news and tips by email</span> <a class="devsite-footer-utility-link gc-analytics-event" href="/updates" data-category="Site-Wide Custom Events" data-label="Footer Subscribe link" > Subscribe </a> </li> </ul> <devsite-language-selector> <ul role="presentation"> <li role="presentation"> <a role="menuitem" lang="en" >English</a> </li> <li role="presentation"> <a role="menuitem" lang="de" >Deutsch</a> </li> <li role="presentation"> <a role="menuitem" lang="es_419" >Español – América Latina</a> </li> <li role="presentation"> <a role="menuitem" lang="fr" >Français</a> </li> <li role="presentation"> <a role="menuitem" lang="id" >Indonesia</a> </li> <li role="presentation"> <a role="menuitem" lang="it" >Italiano</a> </li> <li role="presentation"> <a role="menuitem" lang="pl" >Polski</a> </li> <li role="presentation"> <a role="menuitem" lang="pt_br" >Português – Brasil</a> </li> <li role="presentation"> <a role="menuitem" lang="vi" >Tiếng Việt</a> </li> <li role="presentation"> <a role="menuitem" lang="tr" >Türkçe</a> </li> <li role="presentation"> <a role="menuitem" lang="ru" >Русский</a> </li> <li role="presentation"> <a role="menuitem" lang="he" >עברית</a> </li> <li role="presentation"> <a role="menuitem" lang="ar" >العربيّة</a> </li> <li role="presentation"> <a role="menuitem" lang="fa" >فارسی</a> </li> <li role="presentation"> <a role="menuitem" lang="hi" >हिंदी</a> </li> <li role="presentation"> <a role="menuitem" lang="bn" >বাংলা</a> </li> <li role="presentation"> <a role="menuitem" lang="th" >ภาษาไทย</a> </li> <li role="presentation"> <a role="menuitem" lang="zh_cn" >中文 – 简体</a> </li> <li role="presentation"> <a role="menuitem" lang="zh_tw" >中文 – 繁體</a> </li> <li role="presentation"> <a role="menuitem" lang="ja" >日本語</a> </li> <li role="presentation"> <a role="menuitem" lang="ko" >한국어</a> </li> </ul> </devsite-language-selector> </nav> </div> </devsite-footer-utility> <devsite-panel></devsite-panel> </section></section> <devsite-sitemask></devsite-sitemask> <devsite-snackbar></devsite-snackbar> <devsite-tooltip ></devsite-tooltip> <devsite-heading-link></devsite-heading-link> <devsite-analytics> <script type="application/json" analytics>[]</script> <script type="application/json" tag-management>{&#34;at&#34;: &#34;True&#34;, &#34;ga4&#34;: [{&#34;id&#34;: &#34;G-QFRN08RN6E&#34;, &#34;purpose&#34;: 0}], &#34;ga4p&#34;: [{&#34;id&#34;: &#34;G-QFRN08RN6E&#34;, &#34;purpose&#34;: 0}], &#34;gtm&#34;: [{&#34;id&#34;: &#34;GTM-KMSWPCJ&#34;, &#34;purpose&#34;: 0}], &#34;parameters&#34;: {&#34;internalUser&#34;: &#34;False&#34;, &#34;language&#34;: {&#34;machineTranslated&#34;: &#34;False&#34;, &#34;requested&#34;: &#34;en&#34;, &#34;served&#34;: &#34;en&#34;}, &#34;pageType&#34;: &#34;article&#34;, &#34;projectName&#34;: &#34;Jetpack&#34;, &#34;signedIn&#34;: &#34;False&#34;, &#34;tenant&#34;: &#34;android&#34;, &#34;recommendations&#34;: {&#34;sourcePage&#34;: &#34;&#34;, &#34;sourceType&#34;: 0, &#34;sourceRank&#34;: 0, &#34;sourceIdenticalDescriptions&#34;: 0, &#34;sourceTitleWords&#34;: 0, &#34;sourceDescriptionWords&#34;: 0, &#34;experiment&#34;: &#34;&#34;}, &#34;experiment&#34;: {&#34;ids&#34;: &#34;&#34;}}}</script> </devsite-analytics> <devsite-badger></devsite-badger> <android-fully-clickable target=" .android-case-study .devsite-landing-row-item, .android-grouped-resources .devsite-landing-row-item, .android-grouped-resources-primary .devsite-landing-row-item, .android-grouped-resources-secondary .devsite-landing-row-item, .android-guide-cards .devsite-landing-row-item, .android-illustrated-resources-index .devsite-landing-row-item, .android-illustrated-resources-primary .devsite-landing-row-item, .android-illustrated-resources-secondary .devsite-landing-row-item, .android-illustrated-resources-secondary-small .devsite-landing-row-item, .android-illustrated-resources-tertiary .devsite-landing-row-item, .android-illustrated-resources-tertiary-small .devsite-landing-row-item, .android-promo .devsite-landing-row-item, .android-quick-link, .android-samples .devsite-card-wrapper, .fully-clickable" watch=".android-samples, devsite-content"></android-fully-clickable> <script nonce="YfmipVpLYwRHv/G3hDLszGtlv9E/Os"> (function(d,e,v,s,i,t,E){d['GoogleDevelopersObject']=i; t=e.createElement(v);t.async=1;t.src=s;E=e.getElementsByTagName(v)[0]; E.parentNode.insertBefore(t,E);})(window, document, 'script', 'https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/android/js/app_loader.js', '[3,"en",null,"/js/devsite_app_module.js","https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625","https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/android","https://android-dot-devsite-v2-prod.appspot.com",null,null,["/_pwa/android/manifest.json","https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/images/video-placeholder.svg","https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/android/images/favicon.svg","https://www.gstatic.com/devrel-devsite/prod/v870e399c64f7c43c99a3043db4b3a74327bb93d0914e84a0c3dba90bbfd67625/android/images/lockup.svg","https://fonts.googleapis.com/css?family=Google+Sans:400,500,600,700|Google+Sans+Text:400,400italic,500,500italic,600,600italic,700,700italic|Roboto+Mono:400,500,700&display=swap"],1,null,[1,6,8,12,14,17,21,25,50,52,63,70,75,76,80,87,91,92,93,97,98,100,101,102,103,104,105,107,108,109,110,112,113,116,117,118,120,122,124,125,126,127,129,130,131,132,133,134,135,136,138,140,141,147,148,149,151,152,156,157,158,159,161,163,164,168,169,170,179,180,182,183,186,191,193,196],"AIzaSyAP-jjEJBzmIyKR4F-3XITp8yM9T1gEEI8","AIzaSyB6xiKGDR5O3Ak2okS4rLkauxGUG7XP0hg","developer.android.com","AIzaSyAQk0fBONSGUqCNznf6Krs82Ap1-NV6J4o","AIzaSyCCxcqdrZ_7QMeLCRY20bh_SXdAYqy70KY",null,null,null,["DevPro__enable_cloud_innovators_plus","Profiles__require_profile_eligibility_for_signin","Significatio__enable_by_tenant","Concierge__enable_pushui","Profiles__enable_release_notes_notifications","Cloud__enable_llm_concierge_chat","TpcFeatures__enable_mirror_tenant_redirects","EngEduTelemetry__enable_engedu_telemetry","Profiles__enable_page_saving","BookNav__enable_tenant_cache_key","TpcFeatures__enable_required_headers","Profiles__enable_complete_playlist_endpoint","MiscFeatureFlags__developers_footer_image","Cloud__enable_legacy_calculator_redirect","Cloud__enable_cloud_dlp_service","Profiles__enable_recognition_badges","Profiles__enable_developer_profiles_callout","Search__enable_ai_eligibility_checks","MiscFeatureFlags__emergency_css","Search__enable_dynamic_content_confidential_banner","MiscFeatureFlags__developers_footer_dark_image","Cloud__enable_cloud_shell","Profiles__enable_profile_collections","CloudShell__cloud_shell_button","Profiles__enable_awarding_url","MiscFeatureFlags__enable_view_transitions","Search__enable_ai_search_summaries","Cloud__enable_cloudx_ping","DevPro__enable_developer_subscriptions","Profiles__enable_public_developer_profiles","Cloud__enable_cloud_shell_fte_user_flow","MiscFeatureFlags__enable_dark_theme","Search__enable_page_map","Analytics__enable_clearcut_logging","MiscFeatureFlags__enable_variable_operator","MiscFeatureFlags__enable_explain_this_code","Cloud__enable_cloudx_experiment_ids","MiscFeatureFlags__enable_project_variables","Search__enable_suggestions_from_borg","MiscFeatureFlags__enable_firebase_utm","CloudShell__cloud_code_overflow_menu","Cloud__enable_cloud_facet_chat","Profiles__enable_dashboard_curated_recommendations","Profiles__enable_completecodelab_endpoint","Cloud__enable_free_trial_server_call","Experiments__reqs_query_experiments"],null,null,"AIzaSyBLEMok-5suZ67qRPzx0qUtbnLmyT_kCVE","https://developerscontentserving-pa.googleapis.com","AIzaSyCM4QpTRSqP5qI4Dvjt4OAScIN8sOUlO-k","https://developerscontentsearch-pa.googleapis.com",2,4,null,"https://developerprofiles-pa.googleapis.com",[3,"android","Android Developers","developer.android.com",null,"android-dot-devsite-v2-prod.appspot.com",null,null,[null,1,null,null,null,null,null,null,null,null,null,[1],null,null,null,null,null,null,[1],[1,null,null,[1,20],"/recommendations"],null,null,null,[1,null,1],[1,1,null,1,1]],null,[18,null,null,null,null,null,"/images/lockup.svg","/images/touchicon-180.png",null,null,null,null,null,null,null,null,null,null,null,null,null,1,null,null,null,"/images/lockup-dark-theme.svg",[]],[],null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,[6,1,14,15,20,22,23,28,29,37,43],null,[[null,null,1],[1,1]],[[null,null,null,null,null,null,null,[["G-QFRN08RN6E"],null,null,[["G-QFRN08RN6E",1]]],null,null,null,null,1],null,[[2,2],[1,1]]],null,4,null,null,null,null,null,null,null,null,null,null,null,null,null,"android.devsite.google"],null,"pk_live_5170syrHvgGVmSx9sBrnWtA5luvk9BwnVcvIi7HizpwauFG96WedXsuXh790rtij9AmGllqPtMLfhe2RSwD6Pn38V00uBCydV4m"]') </script> <devsite-a11y-announce></devsite-a11y-announce> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10