ناوبری3

Navigation 3 یک کتابخانه ناوبری جدید است که برای کار با Compose طراحی شده است.
آخرین به‌روزرسانی انتشار پایدار کاندیدای انتشار انتشار بتا انتشار آلفا
۱۲ آگوست ۲۰۲۶ ۱.۱.۶ - - ۱.۲.۰-آلفا۰۷

اعلام وابستگی‌ها

برای افزودن وابستگی به navigation3، باید مخزن Google Maven را به پروژه خود اضافه کنید. برای اطلاعات بیشتر، مخزن Google's Maven را مطالعه کنید.

وابستگی‌های مربوط به مصنوعات مورد نیاز خود را در فایل build.gradle برای برنامه یا ماژول خود اضافه کنید:

Groovy

dependencies {
    implementation "androidx.navigation3:navigation3-runtime:1.2.0-alpha07"
    implementation "androidx.navigation3:navigation3-ui:1.2.0-alpha07"
}

Kotlin

dependencies {
    implementation("androidx.navigation3:navigation3-runtime:1.2.0-alpha07")
    implementation("androidx.navigation3:navigation3-ui:1.2.0-alpha07")
}

برای اطلاعات بیشتر در مورد وابستگی‌ها، به «افزودن وابستگی‌های ساخت» مراجعه کنید.

بازخورد

بازخورد شما به بهبود Jetpack کمک می‌کند. اگر مشکلات جدیدی کشف کردید یا ایده‌هایی برای بهبود این کتابخانه دارید، به ما اطلاع دهید. لطفاً قبل از ایجاد یک کتابخانه جدید، نگاهی به مشکلات موجود در این کتابخانه بیندازید. می‌توانید با کلیک بر روی دکمه ستاره، رأی خود را به یک مشکل موجود اضافه کنید.

ایجاد یک مسئله جدید

برای اطلاعات بیشتر به مستندات ردیاب مشکل مراجعه کنید.

هیچ یادداشت انتشاری برای این مصنوع وجود ندارد.

نسخه ۱.۲.۰-آلفا۰۷

۲۹ ژوئیه ۲۰۲۶

androidx.navigation3:navigation3-*:1.2.0-alpha07 منتشر شد. نسخه 1.2.0-alpha07 شامل این کامیت‌ها است.

تغییرات API

  • یک کلاس WrappedMatchResult انتزاعی برای پوشش دادن یک DeepLinkMatcher.MatchResult دیگر اضافه شد. این امکان را فراهم می‌کند که نتایج تطبیق سفارشی روی نتایج تطبیق دیگری لایه‌بندی شوند. ( I7d4dc ، b/470282247 )
  • کلاس جدید BackStackMatcher اضافه شده است که دو پارامتر می‌گیرد: یک نمونه تطبیق‌دهنده و یک لامبدا سازنده که نتیجه تطبیق تطبیق‌دهنده ورودی را ارائه می‌دهد و یک پشته پشتی برمی‌گرداند. پس از یک تطبیق موفق، BackStackMatcher یک BackStackMatchResult برمی‌گرداند که WrappedMatchResult که شامل نتیجه تطبیق اصلی به همراه پشته پشتی ساخته شده با لامبدا است، بسط می‌دهد. BackStackMatcher فقط می‌تواند با تابع افزونه جدید DeepLinkMatcher.withBackStack ایجاد شود. ( Ibf987 ، b/470282247 )

  • یک کلاس انتزاعی DeepLinkSerializer اضافه شده است که KSerializer برای رمزگذاری و رمزگشایی value : T به عنوان یک String می‌دهد. DeepLinkSerializer می‌تواند برای سریال‌سازی آرگومان‌های لینک عمیق غیراولیه استفاده شود. سازگار با rememberSaveable و rememberNavBackStack . ( Id3c9f ، b/470282247 )

  • DeepLinkMatcher یک پارامتر نوع دوم out R : DeepLinkMatcher.MatchResult<T> تا توسعه‌دهندگان بتوانند بدون تبدیل نوع، به ویژگی‌های MatchResult زیرکلاس‌شده‌ی برگردانده‌شده توسط DeepLinkMatcher.match() دسترسی داشته باشند. ( I693d3 , b/470282247 )

  • کران بالای T DeepLinkMatcher.MatchResult's از Any? به Any تغییر کرده است ( I6bf1a ).

  • فیلد uri در سازنده‌ی DeepLinkRequest اکنون به صورت پیش‌فرض null است. uriString در سازنده‌ی ثانویه به uri تغییر نام داده شده است. ( Ia0f14 , b/522194187 )

رفع اشکالات

  • ResultEffect اکنون از rememberUpdatedState برای ثبت آخرین لامبدا onResult استفاده می‌کند. ( I7d2a3 ، b/531709234 )
  • تطبیق لینک عمیق برای بخش‌های خالی مسیر اصلاح شد. اگر نوع آرگومان String باشد، مسیر خالی به عنوان یک مقدار رشته‌ای خالی در نظر گرفته می‌شود. در غیر این صورت، مسیر خالی به عنوان بدون مقدار ارائه شده در نظر گرفته می‌شود و به مقدار پیش‌فرض برمی‌گردد. اگر مقدار پیش‌فرضی وجود نداشته باشد، تطبیق با شکست مواجه می‌شود. ( I56575 ، b/535298128 )
  • پشتیبانی از مقادیر خالی کوئری در DeepLinkRequest.uri اضافه شد. اگر آرگومان از نوع String باشد، مقدار خالی به عنوان یک رشته خالی تحت‌اللفظی در نظر گرفته می‌شود. در غیر این صورت، مقدار خالی به عنوان بدون مقدار ارائه شده در نظر گرفته می‌شود و تطبیق سعی می‌کند به مقدار پیش‌فرض بازگردد. اگر مقدار پیش‌فرضی وجود نداشته باشد، تطبیق با شکست مواجه می‌شود. ( I30343 ، b/535127459 )
  • EntryProvider اکنون تطبیق بر اساس نمونه‌های کلید را بر انواع کلید اولویت‌بندی می‌کند. ( Ib5ec9 , b/533331924 )
  • SceneState اکنون صحنه‌های قبلی را از بالاترین صحنه غیرپوششی به درستی محاسبه می‌کند. ( I91915 ، b/513630541 )

نسخه ۱.۲.۰-alpha06

۱۵ ژوئیه ۲۰۲۶

androidx.navigation3:navigation3-*:1.2.0-alpha06 منتشر شد. نسخه 1.2.0-alpha06 شامل این کامیت‌ها است.

رفع اشکالات

  • مستندات UriDeepLinkMatcher در مورد قطعات uri اصلاح شد تا روشن شود که قطعات دارای کاراکترهای جایگزین (wildcards) با هر ورودی مطابقت دارند اما ورودی به عنوان آرگومان استخراج نمی‌شود. ( I5ad9b ، b/524677091 )
  • رفع مشکل عدم تطابق UriDeepLinkMatcher با درخواستی که الگوی uri آن شامل scheme نبود یا با دابل اسلش شروع نمی‌شد. برای مثال، www.example.com/home اکنون با http://www.example.com/home مطابقت خواهد داشت. ( Ia6b65 , b/522791926 )

نسخه ۱.۲.۰-آلفا۰۵

۱ ژوئیه ۲۰۲۶

androidx.navigation3:navigation3-*:1.2.0-alpha05 منتشر شد. نسخه 1.2.0-alpha05 شامل این کامیت‌ها است.

رابط برنامه‌نویسی کاربردی جدید

  • یک API rememberResultEventBus اضافه شده است که یک ResultEventBus برمی‌گرداند که می‌تواند به rememberResultEventBusNavEntryDecorator ارسال شود. این امکان را فراهم می‌کند که یک ResultEventBus خارج از ResultEventBusNavEntryDecorator قرار گیرد. ( Ia655b , b/516995400 )

درخواست لینک عمیق

  • دو سازنده سازگار با KMP اضافه شد - یکی که DeepLinkUri می‌گیرد و دیگری که یک uri رشته‌ای خام می‌گیرد. ( I3c088 ، b/513200887 ، b/522194187 )
  • (فقط اندروید) یک سازنده اضافه شده که یک Intent می‌گیرد. ( Ia0498 ، b/513200887 ، b/522194187 )
  • همه سازنده‌ها یک فیلد extras برای Map<String, Any> دارند تا اطلاعات درخواست اضافی را پیوست کنند. ( If81d5 , b/513200887 )
  • یک requestExtras dsl جدید به عنوان روشی ایمن برای ساخت نقشه‌ای از extraها اضافه شده است. dsl یک تابع put برای ذخیره جفت‌های RequestExtrasKey به Any ارائه می‌دهد. تابع افزونه Map<String, Any>.get(key) می‌تواند برای خواندن از نقشه با RequestExtrasKey ( I5091c , b/513200887 ) استفاده شود.
  • (فقط اندروید) یک تابع ActionExtrasKey و actionExtra برای ایجاد یک نقشه اضافی با ActionExtrasKey اضافه شد. ( Id0c90 , [b/513200887]
  • یک تابع MimeTypeExtrasKey و mimeTypeExtra برای ایجاد یک نقشه اضافی با MimeTypeExtrasKey اضافه شد. ( I85131 ، b/513200887 )

دیپ‌لینک‌ماچِر

  • توابع DeepLinkMatcher.mimeTypeFilter و DeepLinkMatcher.actionFilter برای ایجاد DeepLinkMatcher.Filters اضافه شده‌اند که DeepLinkRequest بر اساس mimeType یا action فیلتر می‌کنند (فقط اندروید). هر دو فیلتر بر اساس برابری رشته‌ها مطابقت دارند و به حروف کوچک و بزرگ حساس نیستند. ( Ie7e67 ، b/513191950 )

تغییرات API

درخواست لینک عمیق

  • تابع کارخانه‌ای fromAction حذف کنید. برای ایجاد درخواستی مرتبط با یک Action، از فیلد جدید DeepLinkRequest.extras استفاده کنید.( Id0c90 , b/513200887 )
  • از تابع کارخانه‌ای fromMimeType حذف شد. برای ایجاد درخواستی مرتبط با mimeType، از فیلد جدید DeepLinkRequest.extras استفاده کنید. ( I85131 ، b/513200887 )
  • (فقط اندروید) از تابع کارخانه‌ای fromIntent حذف شده است. با یک سازنده جدید جایگزین شده است که یک Intent و map مربوط به extras را می‌گیرد. ( Ia0498 , b/513200887 , b/522194187 )
  • توابع کارخانه‌ای fromUri و fromUriString حذف شدند. با سازنده‌های جدیدی جایگزین شدند که یا DeepLinkUri یا یک uri رشته خام را می‌گیرند. ( Id5b6f ، b/522194187 )
  • DeepLinkMatcher ، DeepLinkMatcher.MatchResult و زیرکلاس‌های آنها اکنون یک کوواریانت T (خروجی T) می‌گیرند تا کلیدهای سلسله مراتبی با استفاده از Matcherها نیازی به تبدیل نوع نداشته باشند. ( I1e453 ، b/525094876 )
  • پارامتر سازنده‌ی UriMatchResult برای آرگومان‌های map اکنون به طور پیش‌فرض روی یک map خالی تنظیم می‌شود. ( I3acdd )
  • کلاس انتزاعی DeepLinkMatcher.Filter اکنون یک رابط تابعی است. فیلد سازنده filter حذف شده و در عوض باید مستقیماً در زیرکلاس ارسال شود. ( I9eb7d , b/522194187 )

رفع اشکالات

  • مشکل ناپدید شدن فوری ورودی ظاهر شده هنگام نمایش به ورودی که دارای فراداده تو در تو حاوی مقادیر لامبدا است، برطرف شد ( Idb872 ، b/520494430 ).
  • مشکل UriDeepLinkMatcher برطرف شد، به طوری که در صورت عدم وجود آرگومان‌های مورد نیاز در طول تطبیق، به جای ارسال MissingFieldException ، مقدار تهی UriMatchResult برمی‌گرداند ( I5322f ، b/524663005 ).
  • یک UriDeeplinkMatcher حاوی uri با طرح https فقط می‌تواند با درخواست‌هایی که طرح https نیز دارند، مطابقت داده شود. ( Ibfe22 ، b/522304329 )
  • رفع مشکل UriDeepLinkMatcher برای شناسایی صحیح طرح http به عنوان یک تطابق مثبت با https هنگام تطبیق یک DeepLinkRequest با یک UriDeepLinkMatcher . ( I3a62b ، b/518804264 )
  • مقایسه‌گر DeepLinkMatcher.MatchResult اکنون به طور پیش‌فرض وقتی دو نتیجه برابر باشند، 0 را برمی‌گرداند. ( I48ddb ، b/518841353 )
  • UriDeepLinkMatcher اکنون به جای ارسال استثنا در صورت عدم موفقیت درخواست تطبیق به دلیل فقدان آرگومان‌های مورد نیاز، مقدار تهی UriMatchResult برمی‌گرداند. ( I669a7 ، b/470282247 ، b/512923412 )

نسخه ۱.۲.۰-آلفا۰۴

۳ ژوئن ۲۰۲۶

androidx.navigation3:navigation3-*:1.2.0-alpha04 منتشر شد. نسخه 1.2.0-alpha04 شامل این کامیت‌ها است.

رفع اشکالات

  • مشکل انیمیشن لایه‌های تو در تو مانند ModalBottomSheet که هنگام باز شدن لایه‌های بالای آن، به طور غیرمنتظره‌ای دوباره متحرک می‌شدند، برطرف شد. ( Ia2b9e ، b/502624496 )

نسخه ۱.۲.۰-آلفا۰۳

۱۹ مه ۲۰۲۶

androidx.navigation3:navigation3-*:1.2.0-alpha03 منتشر شد. نسخه 1.2.0-alpha03 شامل این کامیت‌ها است.

ویژگی‌های جدید

ناوبری ۳ اکنون از لینک‌های عمیق با DeepLinkRequest و DeepLinkMatcher پشتیبانی می‌کند:

  • DeepLinkRequest یک لینک عمیق درخواستی حاوی DeepLinkUri و یک mimeType یا action اختیاری (فقط اندروید) است. همراه با کلاس جدید، توابع همراهی برای ایجاد یک نمونه با uri ، mimeType یا action وجود دارد. پلتفرم اندروید همچنین دارای یک helper برای ساخت درخواست از یک Intent است. ( Iaaac9 ، b/470282247 )

    val uriOnlyRequest = DeepLinkRequest.fromUriString("https://sampledeeplink.com/home")
    val uriAndMimeRequest = DeepLinkRequest.fromUriString(
      "https://sampledeeplink.com/user/profile?id=123",
      "image/png"
    )
    
  • DeepLinkMatcher یک لینک عمیق را نشان می‌دهد که می‌تواند با یک DeepLinkRequest تطبیق داده شود. هر نمونه از matcher با کلید ناوبری که از این لینک عمیق پشتیبانی می‌کند، مرتبط است. یک کلید ناوبری می‌تواند با چندین matcher مرتبط باشد. فراخوانی DeepLinkMatcher.match یک MatchResult برمی‌گرداند که در صورت موفقیت آمیز بودن تطبیق، حاوی کلید ناوبری مرتبط است. دو پیاده‌سازی پیش‌فرض DeepLinkMatcher وجود دارد: UriDeepLinkMatcher برای تطبیق لینک‌های عمیق بر اساس Uri، و StaticKeyDeepLinkMatcher برای تطبیق لینک‌های عمیق فقط با DeepLinkMatcher.Filter که با یک Boolean تطبیق داده می‌شوند. ( I3798e ، b/470282247 )

  • UriDeepLinkMatcher یک پیاده‌سازی خودرأی از DeepLinkMatcher است که با تطبیق DeepLinkUri با یک کلید ناوبری Serializable، لینک عمیق را مدیریت می‌کند. این برنامه از آرگومان‌های لینک عمیق از انواع اولیه یا مجموعه‌ای از مقادیر اولیه مانند لیست‌ها، آرایه‌ها و مجموعه‌ها پشتیبانی می‌کند. ( I1520b ، b/470282247 )

    @Serializable
    data class UserKey(val id: Int): NavKey
    
    // declare a deep link supported by UserKey
    val userMatcher = UriDeepLinkMatcher(
      uriPattern = "www.sampledeeplink.com/user?userId={id}",
      serializer = serializer<UserKey>()
    )
    
    // handle a requested deep link with fallback key
    val key = userMatcher.match(deepLinkRequest)?.key ?: HomeKey
    
  • DeepLinkUri اضافه شد که یک نسخه kotlin-multplatform از android.net.Uri است ( Id4725 , b/470282247 )

تغییرات API

  • برای مطابقت با compileSdk مربوط به Compose، به compileSdk 37 تغییر یافت.

رفع اشکالات

  • خطای IllegalArgumentException مربوط به AnimatedBottomSheetSample هنگام نمایش چندین overlay برطرف شد. نمونه‌ی SceneStrategy اکنون آخرین صحنه‌ی غیر OverlayScene به درستی محاسبه کرده و آن را در زیر تمام صحنه‌های overlay نمایش می‌دهد. ( If2281 , b/506733412 )
  • وابستگی NavigationEvent به نسخه ۱.۱.۱ ارتقا داده شد که در حالت بازرسی، NavigationEventHandler بدون عملیات را حذف می‌کند تا Predictive Back در پیش‌نمایش‌های اندروید استودیو فعال شود. ( I487fd )

نسخه ۱.۲.۰-آلفا۰۲

۲۲ آوریل ۲۰۲۶

androidx.navigation3:navigation3-*:1.2.0-alpha02 منتشر شد. نسخه 1.2.0-alpha02 شامل این کامیت‌ها است.

تغییرات API

  • نام onBack به onBackCompleted تغییر دهید و onBackCancelled به NavigationBackHandler اضافه کنید تا از مدیریت حرکات برگشت لغو شده پشتیبانی کند. ( I92741 )
  • برای ساده‌سازی مدیریت حرکات برگشت به عقب و حرکات پیش‌بینی‌کننده برگشت هنگام استفاده از SceneState NavigationBackHandler را اضافه کنید. این به توسعه‌دهندگان اجازه می‌دهد تا راحت‌تر اجزای رابط کاربری سفارشی ایجاد کنند که از ناوبری استاندارد برگشت به عقب و حرکات پیش‌بینی‌کننده بدون محاسبه دستی دلتاهای پشته برگشت پشتیبانی می‌کنند. ( I6a055 )
  • برای ساده‌سازی اتصال SceneState با مدیریت بازگشتی پیش‌بینی‌کننده، rememberNavigationEventState را اضافه کنید. ( Iae49c )

ویژگی‌های جدید

  • یک API ResultEventBus اضافه شده است تا امکان انتقال نتایج بین NavEntries با LocalResultEventBus ارائه شده توسط ResultEventBusNavEntryDecorator جدید فراهم شود. نتایج ارسالی می‌توانند به عنوان یک وضعیت با ResultEventBus#conflateAsState یا به عنوان یک جریان از نتایج با ResultEffect ارزیابی شوند.

نسخه ۱.۲.۰-آلفا۰۱

۸ آوریل ۲۰۲۶

androidx.navigation3:navigation3-*:1.2.0-alpha01 منتشر شد. نسخه 1.2.0-alpha01 شامل این کامیت‌ها است.

رفع اشکالات

  • دسترسی به LocalNavAnimatedContentScope از یک OverlayScene باعث خطای IllegalStateException نمی‌شود، زیرا OverlayScenes اکنون با یک LocalAnimatedContentScope بدون عملیات ارائه می‌شوند. ( I2f00c ، b/486067688 )

نسخه ۱.۱.۶

۱۲ آگوست ۲۰۲۶

androidx.navigation3:navigation3-*:1.1.6 منتشر شد. نسخه ۱.۱.۶ شامل این کامیت‌ها است.

رفع اشکالات

  • NavEntry.contentKey اکنون به طور پیش‌فرض ترکیبی از key.toString() و key::class.toString() است. این تضمین می‌کند که اشیاء داده‌ای که نام یکسانی دارند اما رابط‌های مختلفی را پیاده‌سازی می‌کنند، دیگر contentKey یکسانی نخواهند داشت. با این حال، key::class پلتفرم JS فقط نام کلاس ساده را به جای نام کامل برمی‌گرداند، بنابراین پلتفرم JS همچنان باید contentKey سفارشی را برای اشیاء داده‌ای با نام‌های تکراری پیاده‌سازی کند. ( I1fbbb ، b/512534342 )
  • خطای IllegalArgumentException که توسط SaveableStateHolder برای استفاده مجدد از کلید، زمانی که چندین انتقال pop به دلیل pop شدن سریع از back stack به طور همزمان در حال انجام هستند، رخ می‌داد، برطرف شد. ( I4d728 ، b/516312097 )

نسخه ۱.۱.۵

۲۹ ژوئیه ۲۰۲۶

androidx.navigation3:navigation3-*:1.1.5 منتشر شد. نسخه ۱.۱.۵ شامل این کامیت‌ها است.

رفع اشکالات

  • DSL entryProvider اکنون NavEntry ساخته شده با یک نمونه کلید، برای مثال entry(key = userKey) { ... } را نسبت به NavEntry ساخته شده با یک کلاس کلید مانند entry<UserKey>{ ... } .( Ib5ec9 , b/533331924 ) در اولویت قرار می‌دهد.

نسخه ۱.۱.۴

۱ ژوئیه ۲۰۲۶

androidx.navigation3:navigation3-*:1.1.4 منتشر شد. نسخه ۱.۱.۴ شامل این کامیت‌ها است.

رفع اشکالات

  • مشکل ناپدید شدن فوری ورودی ظاهر شده هنگام نمایش به ورودی که دارای فراداده تو در تو حاوی مقادیر لامبدا است، برطرف شد ( Idb872 ، b/520494430 ).

نسخه ۱.۱.۳

۱۷ ژوئن ۲۰۲۶

androidx.navigation3:navigation3-*:1.1.3 منتشر شد. نسخه ۱.۱.۳ شامل این کامیت‌ها است.

رفع اشکالات

  • مشکل انیمیشن لایه‌های تو در تو مانند ModalBottomSheet که هنگام باز شدن لایه‌های بالای آن، به طور غیرمنتظره‌ای دوباره متحرک می‌شدند، برطرف شد. ( Ia2b9e ، b/502624496 )

  • وابستگی NavigationEvent به نسخه ۱.۱.۲ ارتقا یافت که در آن NavigationEventHandler بدون عملیات در حالت بازرسی حذف شد تا Predictive Back در پیش‌نمایش‌های اندروید استودیو فعال شود.

نسخه ۱.۱.۲

۱۹ مه ۲۰۲۶

androidx.navigation3:navigation3-*:1.1.2 منتشر شد. نسخه ۱.۱.۲ شامل این کامیت‌ها است.

رفع اشکالات

  • وابستگی NavigationEvent به نسخه ۱.۱.۱ ارتقا داده شد که در حالت بازرسی، NavigationEventHandler بدون عملیات را حذف کرد تا Predictive Back در پیش‌نمایش‌های اندروید استودیو فعال شود.

نسخه ۱.۱.۱

۲۲ آوریل ۲۰۲۶

androidx.navigation3:navigation3-*:1.1.1 منتشر شد. نسخه ۱.۱.۱ شامل این کامیت‌ها است.

رفع اشکالات

  • دسترسی به LocalNavAnimatedContentScope از یک OverlayScene باعث خطای IllegalStateException نمی‌شود، زیرا OverlayScenes اکنون با یک LocalAnimatedContentScope بدون عملیات ارائه می‌شوند. ( I2f00c ، b/486067688 )

نسخه ۱.۱.۰

۸ آوریل ۲۰۲۶

androidx.navigation3:navigation3-*:1.1.0 منتشر شد. نسخه ۱.۱.۰ شامل این کامیت‌ها است.

نسخه ۱.۱.۰ اکنون پایدار است!

تغییرات مهم از زمان ۱.۰.۰

عناصر مشترک بین صحنه‌ها - Navigation3 اکنون از پردازش صحنه‌ها به عنوان شیء عنصر مشترک پشتیبانی می‌کند. این بدان معناست که وقتی صحنه‌ها تغییر می‌کنند، می‌توان از انتقال روان آنها اطمینان حاصل کرد. می‌توانید این کار را با ارسال SharedTransitionScope به NavDisplay یا به rememberSceneState فعال کنید.

SceneDecoratorStrategy - معرفی SceneDecoratorStrategy برای پشتیبانی از مواردی مانند تزئین صحنه‌ها با اجزای رابط کاربری مشترک یا اشتراک‌گذاری حالت در صحنه‌ها.

NavMetadata DSL - Navigation3 اکنون یک DSL متادیتای جدید با قابلیت اطمینان از نوع داده (type-safe) ارائه می‌دهد. DSL از یک رابط MetadataKey جدید استفاده می‌کند که امکان تعریف انواع کلید و مقداری را که می‌خواهند به نقشه متادیتا ارائه دهند، فراهم می‌کند. این رابط همچنین NavMetadataKeys جدیدی را برای انتقال‌های NavDisplay اضافه کرده است تا بتوان از آنها با DSL متادیتای جدید برای افزودن انتقال‌ها به NavDisplay استفاده کرد.

انیمیشن‌های OverlayScene - رابط OverlayScene یک فراخوانی برگشتی جدید به onRemoved دارد که به حالت تعلیق درمی‌آید. این فراخوانی برگشتی پس از حذف کلید مرتبط با صحنه از backstack، اما قبل از ترک ترکیب، فراخوانی می‌شود. این امر به انیمیشن‌های خروجی که درون onRemoved فراخوانی می‌شوند، اجازه می‌دهد تا قبل از حذف صحنه overlay از ترکیب، تکمیل شوند.

تغییرات دیگر - NavDisplay و rememberSceneState اکنون به جای پارامتر تکی SceneStrategy قبلی که توسط میان‌وند then زنجیر شده بود، یک List<SceneStrategy> می‌گیرند. - اکنون می‌توانید به صورت پویا فراداده را با در نظر گرفتن کلید ورودی از طریق EntryProvider DSL اضافه کنید.

نسخه ۱.۱.۰-rc01

۲۵ مارس ۲۰۲۶

androidx.navigation3:navigation3-*:1.1.0-rc01 منتشر شد. نسخه 1.1.0-rc01 شامل این کامیت‌ها است.

رفع اشکالات

  • NavDisplay اکنون تضمین می‌کند که ورودی‌هایی که در زیر پوشش‌ها نمایش داده می‌شوند، Lifecycle به STARTED محدود شود. این امر تضمین می‌کند که APIهایی مانند dropUnlessResumed هنگام استفاده از دیالوگ‌ها به کار خود ادامه دهند. ( If209f ، b/483966071 )
  • مشکلی در NavDisplay که باعث می‌شد حرکت رفت و برگشتی بین صفحات مشابه و قطع انیمیشن‌های بین این دو صفحه، باعث نادرست شدن ترتیب z صفحات شود، برطرف شد. ( I4d491 ، b/459419800 )

نسخه ۱.۱.۰-بتا۰۱

۱۱ مارس ۲۰۲۶

androidx.navigation3:navigation3-*:1.1.0-beta01 منتشر شد. نسخه 1.1.0-beta01 شامل این کامیت‌ها است.

نسخه ۱.۱.۰-آلفا۰۵

۲۵ فوریه ۲۰۲۶

androidx.navigation3:navigation3-*:1.1.0-alpha05 منتشر شد. نسخه 1.1.0-alpha05 شامل این کامیت‌ها است.

تغییرات API

  • NavDisplay و rememberSceneState اکنون به جای پارامتر تکی SceneStrategy قبلی که توسط میان‌وند then زنجیر شده بود، یک List<SceneStrategy> می‌گیرند. این بیشتر با List<SceneDecoratorStrategy<T>> که هر دوی این APIها قبلاً می‌گیرند، همسو است. APIهای قبلی منسوخ شده‌اند. ( I78b2c , b/482108465 )
  • یک عملگر #contains برای بررسی اینکه آیا نقشه فراداده شامل NavMetadataKey داده شده است یا خیر، اضافه شده است ( Ic30db ، b/485311895 ).
  • DialogKey NavMetadataKey برای DialogSceneStrategy اضافه شد تا با Metadata DSL استفاده شود. ( Ic7a26 ، b/483388817 )

نسخه ۱.۱.۰-آلفا۰۴

۱۱ فوریه ۲۰۲۶

androidx.navigation3:navigation3-*:1.1.0-alpha04 منتشر شد. نسخه 1.1.0-alpha04 شامل این کامیت‌ها است.

ویژگی‌های جدید

  • Navigation3 اکنون یک DSL فراداده‌ی جدید با قابلیت اطمینان از نوع داده (type-safe) ارائه می‌دهد. DSL از یک رابط MetadataKey جدید استفاده می‌کند که امکان تعریف انواع کلید و مقداری را که می‌خواهند به نقشه‌ی فراداده ارائه دهند، فراهم می‌کند. این رابط همچنین NavMetadataKey های جدیدی را برای انتقال‌های NavDisplay اضافه کرده است تا بتوان از آنها با DSL metadata جدید برای افزودن انتقال‌ها به NavDisplay استفاده کرد. ( Ic10ef ، Ic049c ، b/476213928 )

تغییرات API

  • رابط OverlayScene یک فراخوانی برگشتی جدید به onRemoved دارد که صحنه را به حالت تعلیق در می‌آورد. این فراخوانی برگشتی پس از حذف کلید مرتبط با صحنه از پشته پشتی، اما قبل از ترک ترکیب، فراخوانی می‌شود. این امر به انیمیشن‌های خروجی که درون onRemoved فراخوانی می‌شوند، اجازه می‌دهد تا قبل از حذف صحنه overlay از ترکیب، تکمیل شوند. ( I29a72 , b/440558061 )
  • SceneStrategy تابع تزئین را به یک SceneDecoratorStrategy جدید تفکیک کرده است. این رابط جدید همان چیزی است که باید برای تزئین صحنه‌ها استفاده شود. APIهای جدیدی برای NavDisplay و rememberSceneState وجود دارد که امکان افزودن SceneDecoratorStrategies را فراهم می‌کند. ( If9385 , b/477669607 , b/477670333 )

رفع اشکالات

  • خطایی که باعث می‌شد ارسال SharedTransitionLayout به NavDisplay یا rememberSceneState و استفاده از هرگونه OverlayScene باعث خرابی شود، برطرف شد، زیرا استفاده از SharedTransitionLayout فقط با NavEntries که به عنوان بخشی از AnimatedContent رندر می‌شوند، کار می‌کند و OverlayScene به طور جداگانه در پنجره‌های خود رندر می‌شوند. ( I1bb76 ، b/478664101 )

به‌روزرسانی وابستگی

  • از Navigation3 1.0.1: Navigation3 اکنون به NavigationEvent 1.0.2 وابسته است. این مورد، خطای IllegalStateException ناشی از استفاده از NavDisplay در طول پیش‌نمایش‌های AndroidStudio را برطرف می‌کند. ( Id7212 ، b/477149762 )

نسخه ۱.۱.۰-آلفا۰۳

۲۸ ژانویه ۲۰۲۶

androidx.navigation3:navigation3-*:1.1.0-alpha03 منتشر شد. نسخه 1.1.0-alpha03 شامل این کامیت‌ها است.

ویژگی‌های جدید

  • اکنون می‌توانید به صورت پویا فراداده را با در نظر گرفتن کلید ورودی از طریق EntryProvider DSL اضافه کنید. ( I942fb ، b/474416976 )

نسخه ۱.۱.۰-آلفا۰۲

۱۴ ژانویه ۲۰۲۶

androidx.navigation3:navigation3-*:1.1.0-alpha02 منتشر شد. نسخه 1.1.0-alpha02 شامل این کامیت‌ها است.

ویژگی‌های جدید

  • SceneStrategy اکنون از طریق تابع جدید calculatedScene(Scene) از صحنه‌های تودرتو پشتیبانی می‌کند. این بدان معناست که SceneStrategy ها می‌توانند سفارشی‌سازی شوند تا قابلیت‌های بیشتری را برای صحنه‌های دیگر فراهم کنند. ( I5df7c ، b/440333896 )

نسخه ۱.۱.۰-آلفا۰۱

۳ دسامبر ۲۰۲۵

androidx.navigation3:navigation3-*:1.1.0-alpha01 منتشر شد. نسخه 1.1.0-alpha01 شامل این کامیت‌ها است.

تغییرات API

  • Navigation3 اکنون از پردازش صحنه‌ها به عنوان شیء عنصر مشترک پشتیبانی می‌کند. این بدان معناست که وقتی صحنه‌ها تغییر می‌کنند، می‌توان از انتقال روان آنها اطمینان حاصل کرد. می‌توانید این قابلیت را با ارسال SharedTransitionScope به NavDisplay یا به rememberSceneState فعال کنید. ( I15868 )

نسخه ۱.۰

نسخه ۱.۰.۱

۱۱ فوریه ۲۰۲۶

androidx.navigation3:navigation3-*:1.0.1 منتشر شد. نسخه 1.0.1 شامل این کامیت‌ها است.

به‌روزرسانی وابستگی

  • Navigation3 اکنون به NavigationEvent 1.0.2 وابسته است. این مورد، خطای IllegalStateException ناشی از استفاده از NavDisplay در طول پیش‌نمایش‌های AndroidStudio را برطرف می‌کند. ( Id7212 ، b/477149762 )

نسخه ۱.۰.۰

۱۹ نوامبر ۲۰۲۵

androidx.navigation3:navigation3-*:1.0.0 منتشر شد. نسخه 1.0.0 شامل این کامیت‌ها است.

معرفی Navigation3!

نسخه ۱.۰.۰-rc01

۵ نوامبر ۲۰۲۵

androidx.navigation3:navigation3-*:1.0.0-rc01 منتشر شد. نسخه 1.0.0-rc01 شامل این کامیت‌ها است.

رفع اشکالات

  • NavDisplay اکنون یک LocalLifecycleOwner در سطح Scene تنظیم می‌کند که به نویسندگان صحنه اجازه می‌دهد با بررسی اینکه Lifecycle.State RESUMED است، مشخص کنند که آیا همه انتقال‌ها به پایان رسیده‌اند یا خیر. رفتار LocalLifecycleOwner در سطح NavEntry بدون تغییر باقی می‌ماند: اگر یک انتقال در حال انجام باشد، همچنان در STARTED باقی می‌ماند و اگر NavEntry از پشته پشتی برداشته شده و در حال انیمیشن‌سازی باشد، علاوه بر این در CREATED نیز محدود می‌شود. ( I03113 ، b/454045829 )

نسخه ۱.۰.۰-بتا۰۱

۲۲ اکتبر ۲۰۲۵

androidx.navigation3:navigation3-*:1.0.0-beta01 منتشر شد. نسخه 1.0.0-beta01 شامل این کامیت‌ها است.

تغییرات API

  • SceneStrategyScope اکنون فقط یک سازنده عمومی بدون آرگومان دارد که برای آزمایش SceneStrategy و Scene برگشتی به صورت جداگانه مناسب است. برای موارد استفاده پیچیده‌تر، لطفاً از rememberSceneState() استفاده کنید. ( I8440c ، b/451679047 )

رفع اشکالات

  • مشکل حلقه بی‌نهایت هنگام زنجیره‌سازی SceneStrategy با then برطرف شد. ( Iba3f0 ، b/450323470 )
  • لرزش صفحه هنگام تعویض backStack ارسالی به NavDisplay و استفاده از انیمیشن‌ها برطرف شد. ( Ief7b5 ، b/450967248 )

نسخه ۱.۰.۰-آلفا۱۱

۸ اکتبر ۲۰۲۵

androidx.navigation3:navigation3-*:1.0.0-alpha11 منتشر شد. نسخه 1.0.0-alpha11 شامل این کامیت‌ها است.

تغییرات API

  • متد calculateScene در SceneStrategy دیگر @Composable نیست. در عوض، می‌توانید این کار را به ساخت متد SceneStrategy خود (یعنی در یک متد rememberMySceneStrategy() ) منتقل کنید که به شما امکان می‌دهد طول عمر هر مقدار rememberSaveable یا دستورات key remember را از مقادیر صحیح تعریف کنید. ( If1733 , b/448709506 )
  • پارامتر onBack برای SceneStrategy.calculateScene به محدوده گیرنده جدید SceneStrategyScope منتقل شده است تا واضح‌تر شود که این یک پارامتر اختیاری است و یک نقطه گسترش برای ویژگی‌های آینده Navigation3 فراهم می‌کند. ( I3aea3 ، b/448460407 )
  • لامبدا onBack که به NavDisplay و SceneStrategy شما ارسال می‌شود، دیگر پارامتر count: Int را برای نشان دادن زمان نمایش چندین ورودی ارائه نمی‌دهد. در عوض، لامبدا () -> Unit اکنون چندین بار پشت سر هم در موارد نادری که Scene شما درخواست نمایش چندین ورودی را می‌دهد، فراخوانی می‌شود. ( Idedb5 ، b/446989346 )
  • کلاس NavEntryWrapper حذف کنید و عملکرد آن را با یک کلاس NavEntry نهایی با یک سازنده ثانویه جدید که یک NavEntry با محتوای جدید می‌گیرد، جایگزین کنید. این کار امکان پشتیبانی مداوم از بسته‌بندی یک ورودی با محتوای جدید را فراهم می‌کند. ( I7da2a , b/444447130 )
  • تابع navEntryDecorator که یک NavEntryDecorator ایجاد و برمی‌گرداند، حذف شده و با کلاس NavEntryDecorator جایگزین شده است که اکنون عمومی شده و برای زیرکلاس‌سازی باز است. ( If81f8 , b/444447434 , b/447381176 )
  • SavedStateNavEntryDecorator به SaveableStateHolderNavEntryDecorator تغییر نام داده است، زیرا ورودی‌ها را با SaveableStateHolder تزئین می‌کند. این دکوراتور همچنین از یک تابع به یک کلاس تغییر یافته است، زیرا از نظر عملکردی یک factory برای NavEntryDecorator است. ( Ie6013 ، b/447381176 )
  • نمایشگرهای سفارشی که از SceneState به عنوان جایگزینی برای استفاده از NavDisplay استفاده می‌کنند، دیگر نیازی به استفاده از ترکیب LocalEntriesToRenderInCurrentScene محلی ندارند، که اکنون داخلی است. ( Ic40ef ، b/414668196 )
  • SceneSetupNavEntryDecorator و rememberSceneSetupNavEntryDecorator() از سطح API عمومی حذف شدند. این قابلیت اکنون به طور پیش‌فرض و بدون نیاز به وارد کردن دستی آن توسط شما، در دسترس است. ( Ieae42 , b/444479133 )
  • NavEntry ، DialogScene ، SinglePaneScene و SceneState اکنون همگی equals را پیاده‌سازی می‌کنند. ( I96121 )
  • رابط صحنه یک فیلد فراداده جدید برای الصاق فراداده‌های مختص صحنه به NavDisplay دارد. این به صحنه اجازه می‌دهد تا فراداده‌های موجود در NavDisplay را نادیده بگیرد، برای مثال با انتقال‌ها ( I1fd96 ، b/443955625 ).
  • با حذف پارامتر نوع عمومی زائد، امضای rememberNavBackStack را ساده کنید. این تابع اکنون vararg elements: NavKey . ( I03e45 )
  • انیمیشن‌های پیش‌فرض برای NavDisplay اکنون بخشی از API مشترک هستند که به آنها اجازه می‌دهد از همه پلتفرم‌ها فراخوانی شوند. ( I71af9 , b/447147159 )
  • نام EntryProviderBuilder به EntryProviderScope تغییر دهید تا دقیقاً نشان دهد که کلاس یک DSL کاتلین است که محدوده‌ای برای ساخت NavEntries ارائه می‌دهد. ( Ia7465 )

رفع اشکالات

  • rememberNavBackStack() اکنون سریال‌سازی چندریختی را برای NavKey اعمال می‌کند و به یک SavedStateConfiguration سفارشی نیاز دارد که برای اطمینان از بازیابی صحیح وضعیت پیکربندی شده باشد. KDoc به‌روزرسانی شده است تا الزام ثبت تمام زیرگروه‌های NavKey در SerializersModule ارائه شده را منعکس کند. ( I6de37 ، I782f2 ، b/446664383 )

نسخه ۱.۰.۰-آلفا۱۰

۲۴ سپتامبر ۲۰۲۵

androidx.navigation3:navigation3-*:1.0.0-alpha10 منتشر شد. نسخه 1.0.0-alpha10 شامل این کامیت‌ها است.

تغییرات API

  • یک سربارگذاری جدید NavDisplay اضافه کنید که لیستی از NavEntry<T> که توسط rememberDecoratedNavEntries تزئین شده است را دریافت کند. ( I4025b , b/441940314 )
  • DialogScene به یک بسته جدید منتقل شد. ( Ia5840 )
  • API عمومی DecorateNavEntry حذف کنید. در عوض از rememberDecoratedNavEntries برای قرار دادن یک NavEntry با لیستی از دکوراتورها استفاده کنید. ( Id8c09 )
  • رابط کاربری Navigation3 اکنون ویژگی‌های پیش‌فرض جدید transitionSpec ارائه می‌دهد. ( Ibcabd )
  • یک شیء SceneState جدید برای کمک به مدیریت صحنه‌ها اضافه شد. این شیء همچنین یک سربارگذاری جدید NavDisplay ارائه می‌دهد که SceneState و NavigationEventState را دریافت می‌کند. ( Idfb46 ، b/444479133 )
  • NavDisplay اکنون به شما امکان می‌دهد تا با نگاه کردن به currentState و targetState مربوط به Transition ، انتقال‌ها را بر اساس Scene که به آن می‌روید و از آن خارج می‌شوید، سفارشی کنید. ( I906cc ، b/443872322 )
  • NavigationEventInfo اکنون به جای یک interface یک abstract class است. تمام پیاده‌سازی‌های سفارشی را برای ارث‌بری از کلاس به‌روزرسانی کنید (مثلاً data class MyInfo : NavigationEventInfo() ). ( I1e59c , b/444734264 )
  • رابط‌های برنامه‌نویسی (API) مربوط به مدیریت‌کننده‌ی navigationevent-compose به‌روزرسانی شده‌اند. NavigationEventHandler و NavigationBackHandler (و انواع دیگر) اکنون از یک overload جدید پشتیبانی می‌کنند که یک NavigationEventState را که به صورت hoist شده است، می‌پذیرد. overloadهای ساده (با گرفتن currentInfo ) حفظ شده و اکنون از این مدل state جدید به صورت داخلی استفاده می‌کنند. ( Ic3251 ، b/444734264 )
  • تمام APIهای صحنه از navigation3-ui به navigation3-runtime منتقل شده‌اند. این بدان معناست که اکنون آنها در تمام پلتفرم‌های پشتیبانی شده توسط navigation3-runtime در دسترس هستند. ( I431d0 ، b/444449993 )
  • اضافه بار جدید rememberDecoratedNavEntries اضافه شد که لیستی از NavEntry را برای تزئین می‌گیرد. ورودی‌های ورودی می‌توانند از قبل با سایر دکوراتورهای ورودی تزئین شوند. ( I5a034 ، b/444230270 )
  • پارامترهای نوع wildcard مربوط به navigation3 را حذف کنید ( I02540 )
  • مدیریت ژنریک‌ها برای entryProvider DSL بهبود یافته است. اگر قبلاً androidx.navigation3.runtime.entry را وارد می‌کردید، دیگر نیازی به این کار نیست. ( I299fc )
  • محدود کردن سربارگذاری NavBackStackSerializer مبتنی بر بازتاب به اندروید. این کار با اعمال استفاده از سربارگذاری صریح SavedStateConfiguration در کد چند پلتفرمی، از شکست‌های سریال‌سازی ضمنی زمان اجرا در پلتفرم‌های غیر اندروید جلوگیری می‌کند. ( I73313 ، b/420443609 )
  • swipeEdge مربوط به NavigationEvent را به یک @IntDef تبدیل کنید ( Icee54 , b/443950342 )
  • سریال‌سازی NavBackStack به اندروید محدود کنید. این کار از خطاهای زمان اجرا در پلتفرم‌های غیر اندروید جلوگیری می‌کند. برای ذخیره وضعیت چند پلتفرمی، از overload rememberNavBackStack با یک SavedStateConfiguration صریح استفاده کنید. ( I1e418 , b/420443609 )

رفع اشکالات

  • رفع مشکل از کار افتادن برنامه هنگام فراخوانی پیش‌بینانه، زمانی که NavDisplay تو در تو دارای یک ورودی فرزند بود. ( I2cdc0 ، b/441933162 )

نسخه ۱.۰.۰-آلفا۰۹

۱۰ سپتامبر ۲۰۲۵

androidx.navigation3:navigation3-*:1.0.0-alpha09 منتشر شد. نسخه 1.0.0-alpha09 شامل این کامیت‌ها است.

تغییرات API

  • DecoratedNavEntryProvider با rememberDecoratedNavEntries جایگزین شده است که NavEntries را ایجاد کرده و با لیستی از دکوراتورهای ارائه شده ( I0fe1c ، b/441328236 ) تزئین می‌کند.
  • NavBackStack اکنون روی نوع NavKey عمومیت دارد. این به برنامه‌ها و کتابخانه‌ها اجازه می‌دهد تا انواع کلید سفارشی را برای پشته‌های پشتی خود تعریف کنند، نه اینکه محدود به NavKey باشند. ( I4d190 ، Iad2f4 ، b/420443609 )
  • NavBackStack اکنون @kotlinx.serialization.Serializable ‎ تبدیل شده است که امکان ذخیره و بازیابی وضعیت ناوبری را در طول مرگ فرآیند و تغییرات پیکربندی بدون کدهای تکراری اضافی فراهم می‌کند. ( I2c3cf ، b/420443609 )
  • RememberNavBackStack به commonMain منتقل شده است تا از ارائه آن در تمام پلتفرم‌های هدف اطمینان حاصل شود. ( Id69e7 ، b/420443609 )

رفع اشکالات

  • NavDisplay اکنون به درستی هر NavEntry به Lifecycle.State صحیح منتقل می‌کند. ( I30aac ، b/440145700 )
  • مشکلی که باعث می‌شد NavDisplay هر تنظیم تودرتوی NavigationEventDispatcherOwner را که از طریق LocalNavigationEventDispatcherOwner کتابخانه NavigationEvent تنظیم شده بود، نادیده بگیرد، برطرف شد. ( I6224a )

تغییرات وابستگی

نسخه ۱.۰.۰-آلفا۰۸

۲۷ آگوست ۲۰۲۵

androidx.navigation3:navigation3-*:1.0.0-alpha08 منتشر شد. نسخه 1.0.0-alpha08 شامل این کامیت‌ها است.

ویژگی‌های جدید

  • اهداف جدید Kotlin MultiPlatform (KMP) به مصنوعات Navigation3 Runtime اضافه شد. Navigation3 Runtime اکنون در مجموع از پلتفرم‌های زیر پشتیبانی می‌کند: JVM (اندروید و دسکتاپ)، Native (لینوکس، iOS، watchOS، macOS، MinGW) و وب (جاوااسکریپت، WasmJS). ( I55078 ، b/424410398 ، b/419294028 ، b/419046226 ). توجه: این اهداف KMP را برای مصنوع Navigation3 UI ارائه نمی‌دهد. در سایر پلتفرم‌ها، باید NavDisplay سفارشی خود را پیاده‌سازی کنید. اگر مایل به پشتیبانی از آن هستید، لطفاً در اینجا به موضوع Jetbrains رأی دهید و پیشرفت پشتیبانی بیشتر را در آنجا پیگیری کنید.
  • شیء NavDisplayInfo اکنون عمومی است و می‌تواند برای بازیابی لیست ورودی‌های قابل مشاهده از NavDisplay استفاده شود. ( Ibc91f )

تغییرات API

  • یک NavBackStackSerializer جدید اضافه شده است تا در رابطه با rememberNavBackStack برای انجام بازیابی وضعیت استفاده شود. rememberNavBackStack() اکنون یک SavedStateConfiguration نیز می‌گیرد که می‌تواند برای ارائه پیکربندی شخصی شما استفاده شود. ( I2f4d2 ، I4cd58 ، b/420443609 )

رفع اشکالات

  • مشکلی که باعث می‌شد پیمایش باعث ایجاد رویدادهای نادرست چرخه عمر شود، برطرف شد. ( I8bf6d ، b/425901162 ، b/434109022 )

مشکلات شناخته شده

  • یک اشکال توسط I8bf6d معرفی شده بود که باعث می‌شد Lifecycleها به جای ورودی‌های منفرد، بر اساس صحنه‌ها باشند، که این امر Lifecycle را برای هر موردی که key ارائه شده به NavEntry یک String نیست یا NavEntry شما contentKey بازنویسی نکرده و آن را برابر با key قرار نداده است، از کار می‌انداخت (توجه داشته باشید که انجام این کار مستلزم آن است که کلید شما بتواند در یک Bundle ذخیره شود). این مشکل در نسخه بعدی برطرف شده است. ( b/440145700 )

نسخه ۱.۰.۰-آلفا۰۷

۱۳ آگوست ۲۰۲۵

androidx.navigation3:navigation3-*:1.0.0-alpha07 منتشر شد. نسخه 1.0.0-alpha07 شامل این کامیت‌ها است.

به‌روزرسانی MinSDK

تغییرات API

  • SavedStateNavEntryDecorator اکنون از SaveableStateRegistry که در SaveableStateProvider تعبیه شده است برای ذخیره و بازیابی حالت‌ها استفاده می‌کند. ( If8d9a )
  • ویژگی predictivePopTransitionSpec اکنون لبه‌ی سوایپ را به عنوان پارامتر ارائه می‌دهد و به شما امکان می‌دهد تا انتقال را بر اساس لبه‌ای که کاربر حرکت Predictive Back را از آن شروع کرده است، سفارشی کنید. ( I753a8 )

رفع اشکالات

  • Fixed an issue that would cause custom scenes to be infinitely recalculated because the most recent scene was not being remembered. ( I7ba84 , b/418153031 )

Dependency update

Version 1.0.0-alpha06

۳۰ ژوئیه ۲۰۲۵

androidx.navigation3:navigation3-*:1.0.0-alpha06 is released. Version 1.0.0-alpha06 contains these commits .

Dependency Update

Version 1.0.0-alpha05

۲ ژوئیه ۲۰۲۵

androidx.navigation3:navigation3-*:1.0.0-alpha05 is released. Version 1.0.0-alpha05 contains these commits .

Behavior Changes

  • The NavEntry 's state is now strictly based on the current list of decorators passed to the NavDisplay . This means that decorators should be swapped along your back stacks in the case of multiple back stacks in order to preserve the state of the NavEntries on the back stack. Otherwise, the states will be cleared as if the entries were popped (instead of a swap). ( I7a759 , b/428033667 )

Version 1.0.0-alpha04

۱۸ ژوئن ۲۰۲۵

androidx.navigation3:navigation3-*:1.0.0-alpha04 is released. Version 1.0.0-alpha04 contains these commits .

API Changes

  • NavEntry.content is now private. To invoke NavEntry content, call the new NavEntry.Content() api which no longer requires a key parameter to invoke. ( Icd0fd , b/420991203 )
  • NavEntry.key is now a private field. The NavEntry and its relevant states should be identified by the new contentKey field which is generated from the new contentKeyFactory lambda and defaults to a saveable hash generated from NavEntry.key ( I81a6c , b/422001357 , b/420991203 I2d7d4 , b/420991203 , b/422841812 )

Dependency Changes

  • Navigation3 now depends on the new androidx.navigationevent.compose artifact.

Version 1.0.0-alpha03

۴ ژوئن ۲۰۲۵

androidx.navigation3:navigation3-*:1.0.0-alpha03 is released. Version 1.0.0-alpha03 contains these commits .

رفع اشکالات

  • Navigation3 will no longer clear decorator states for backStacks that have been swapped out and replaced with another backStack instance. ( I28a42 , b/415076044 )

Version 1.0.0-alpha02

۲۳ مه ۲۰۲۵

androidx.navigation3:navigation3-*:1.0.0-alpha02 is released. Version 1.0.0-alpha02 contains these commits .

رفع اشکالات

  • Fixed an issue with the SavedStateNavEntryDecorator which caused collisions for different data classes with the same property values. ( b/418070648 , Iff4775 )
  • Fixed a missing class issue that would cause crashes when running without declaring explicit dependencies. ( b/419049149 , I4b4ed )

Version 1.0.0-alpha01

۲۰ مه ۲۰۲۵

androidx.navigation3:navigation3-*:1.0.0-alpha01 is released. Version 1.0.0-alpha01 contains these commits .

ویژگی‌های جدید

Navigation3 is a new navigation library built specifically to handle Jetpack Compose in-app navigation. The androidx.navigation3.runtime artifact provides the building blocks, while the androidx.navigation3.ui artifact provides the UI layer via the NavDisplay API. Developers can provide their own state directly to the NavDisplay composable function, which changes the content based on changes in the developer state.

@Serialiable object Home : NavKey
@Serialiable object Chat : NavKey

val backStack = rememberNavBackStack(Home)

NavDisplay(backStack, entryProvider = entryProvider {
  entry<Home> {
    Column {
      Text(Home)
      Button(onClick = { backStack.add(Chat) } ) {
        Text(Go to Chat)
      } 
    }
  }
  entry<Chat> { /* My Composable Content */ }
})

For more information, see the Navigation3 guide .

،

navigation3

Navigation 3 is a new navigation library designed to work with Compose.
آخرین به‌روزرسانی Stable Release Release Candidate انتشار بتا Alpha Release
۱۲ آگوست ۲۰۲۶ ۱.۱.۶ - - 1.2.0-alpha07

Declaring dependencies

To add a dependency on navigation3, you must add the Google Maven repository to your project. Read Google's Maven repository for more information.

Add the dependencies for the artifacts you need in the build.gradle file for your app or module:

Groovy

dependencies {
    implementation "androidx.navigation3:navigation3-runtime:1.2.0-alpha07"
    implementation "androidx.navigation3:navigation3-ui:1.2.0-alpha07"
}

Kotlin

dependencies {
    implementation("androidx.navigation3:navigation3-runtime:1.2.0-alpha07")
    implementation("androidx.navigation3:navigation3-ui:1.2.0-alpha07")
}

For more information about dependencies, see Add build dependencies .

بازخورد

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 existing issues in this library before you create a new one. You can add your vote to an existing issue by clicking the star button.

ایجاد یک مسئله جدید

See the Issue Tracker documentation for more information.

There are no release notes for this artifact.

Version 1.2.0-alpha07

۲۹ ژوئیه ۲۰۲۶

androidx.navigation3:navigation3-*:1.2.0-alpha07 is released. Version 1.2.0-alpha07 contains these commits .

API Changes

  • Added an abstract WrappedMatchResult class to wrap another DeepLinkMatcher.MatchResult . This allows customized match results layered on top of another one. ( I7d4dc , b/470282247 )
  • Added new BackStackMatcher class which takes two parameters: a matcher instance, and a builder lambda that provides the input matcher's match result and returns a back stack. Upon a successful match, BackStackMatcher returns a BackStackMatchResult which extends WrappedMatchResult containing the original match result along with the back stack built with the lambda. The BackStackMatcher can only be created with the new DeepLinkMatcher.withBackStack extension function. ( Ibf987 , b/470282247 )

  • Added an abstract DeepLinkSerializer class that extends KSerializer to encode and decode value : T as a String . DeepLinkSerializer can be used to serialize non-primitive deep link arguments. Compatible with rememberSaveable and rememberNavBackStack . ( Id3c9f , b/470282247 )

  • DeepLinkMatcher has added a second type parameter out R : DeepLinkMatcher.MatchResult<T> so that developers can access the properties of the subclassed MatchResult returned by DeepLinkMatcher.match() without type casting. ( I693d3 , b/470282247 )

  • DeepLinkMatcher.MatchResult's T upper bound has changed from Any? to Any . ( I6bf1a )

  • DeepLinkRequest constructor field uri now defaults to null. The secondary constructor's uriString has been renamed to uri . ( Ia0f14 , b/522194187 )

رفع اشکالات

  • ResultEffect now uses rememberUpdatedState to capture the latest onResult lambda. ( I7d2a3 , b/531709234 )
  • Fixed deep link matching for empty path segments. If the argument type is String, the empty path will be treated as an empty string value. Otherwise, the empty path is treated as no value provided and will fall back to defautl value. If there is no defautl value, matching will fail. ( I56575 , b/535298128 )
  • Added support for empty query values in DeepLinkRequest.uri . If the argument is of String type, the empty value will be treated as a literal empty string. Otherwise, the empty value is treated as no value provided and matching will attempt to fallback to default value. If there is no default value, matching will fail. ( I30343 , b/535127459 )
  • EntryProvider now prioritizes matching based on key instances over key types. ( Ib5ec9 , b/533331924 )
  • SceneState now correctly calculates previous scenes starting from the top-most non-overlay scene. ( I91915 , b/513630541 )

Version 1.2.0-alpha06

۱۵ ژوئیه ۲۰۲۶

androidx.navigation3:navigation3-*:1.2.0-alpha06 is released. Version 1.2.0-alpha06 contains these commits .

رفع اشکالات

  • Fixed UriDeepLinkMatcher documentation on uri fragments to clarify that fragments with wildcards will match any input but the input does not get extracted as arguments. ( I5ad9b , b/524677091 )
  • Fixed UriDeepLinkMatcher failing to match with a request if the uri pattern does not contain a scheme or does not start with double slash. For example, www.example.com/home will now match with http://www.example.com/home . ( Ia6b65 , b/522791926 )

Version 1.2.0-alpha05

۱ ژوئیه ۲۰۲۶

androidx.navigation3:navigation3-*:1.2.0-alpha05 is released. Version 1.2.0-alpha05 contains these commits .

رابط برنامه‌نویسی کاربردی جدید

  • Added a rememberResultEventBus api which returns a ResultEventBus that can be passed to rememberResultEventBusNavEntryDecorator . This allows hoisting a ResultEventBus outside the ResultEventBusNavEntryDecorator . ( Ia655b , b/516995400 )

DeepLinkRequest

  • Added two KMP-compatible constructors - one that takes a DeepLinkUri and one that takes a raw string uri. ( I3c088 , b/513200887 , b/522194187 )
  • (Android only) Added a constructor that takes an Intent . ( Ia0498 , b/513200887 , b/522194187 )
  • All constructors have an additional extras field for a Map<String, Any> to attach additional request information. ( If81d5 , b/513200887 )
  • A new requestExtras dsl is added as a type safe way to build a map of extras. The dsl provides a put function to store pairs of RequestExtrasKey to Any . The Map<String, Any>.get(key) extension function can be used to read from the map with a RequestExtrasKey ( I5091c , b/513200887 )
  • (Android only) Added an ActionExtrasKey and actionExtra function to create an extras map with ActionExtrasKey . ( Id0c90 , [b/513200887]
  • Added a MimeTypeExtrasKey and mimeTypeExtra function to create an extras map with MimeTypeExtrasKey . ( I85131 , b/513200887 )

DeepLinkMatcher

  • Added DeepLinkMatcher.mimeTypeFilter and DeepLinkMatcher.actionFilter functions to create DeepLinkMatcher.Filters that filter DeepLinkRequest by mimeType or action (Android only). Both filters match by string equality and is case-insensitive. ( Ie7e67 , b/513191950 )

API Changes

DeepLinkRequest

  • Remove fromAction factory function. To create a request associated with an Action, use the new DeepLinkRequest.extras field.( Id0c90 , b/513200887 )
  • Removed fromMimeType factory function. To create a request associated with a mimeType, use the new DeepLinkRequest.extras field. ( I85131 , b/513200887 )
  • (Android-only) Removed fromIntent factory function. Replaced by a new constructor that takes an Intent and extras map. ( Ia0498 , b/513200887 , b/522194187 )
  • Removed factory functions fromUri and fromUriString . Replaced by new constructors that either take a DeepLinkUri or a raw string uri. ( Id5b6f , b/522194187 )
  • DeepLinkMatcher , DeepLinkMatcher.MatchResult and their subclasses now take a covariant T (out T) so that hierarchical keys will not need type casting with used with Matchers. ( I1e453 , b/525094876 )
  • The UriMatchResult constructor param for arguments map now defaults to an empty map. ( I3acdd )
  • DeepLinkMatcher.Filter abstract class is now a functional interface. The filter constructor field is removed and instead should be passed directly in the subclass. ( I9eb7d , b/522194187 )

رفع اشکالات

  • Fixed popped entry disappearing immediately when popping to an entry that has a nested metadata containing lambda values. ( Idb872 , b/520494430 )
  • Fixed UriDeepLinkMatcher so that it will return a null UriMatchResult instead of throwing MissingFieldException when required arguments are missing during matching. ( I5322f , b/524663005 )
  • A UriDeeplinkMatcher containing uri with https scheme can only be matched with requests that also have https scheme. ( Ibfe22 , b/522304329 )
  • Fix UriDeepLinkMatcher to correctly identify http scheme as a positive match with https when matching a DeepLinkRequest to a UriDeepLinkMatcher . ( I3a62b , b/518804264 )
  • DeepLinkMatcher.MatchResult comparator now returns 0 by default when two results are equal. ( I48ddb , b/518841353 )
  • UriDeepLinkMatcher will now return a null UriMatchResult instead of throwing an exception when match request fails due to missing required arguments. ( I669a7 , b/470282247 , b/512923412 )

Version 1.2.0-alpha04

۳ ژوئن ۲۰۲۶

androidx.navigation3:navigation3-*:1.2.0-alpha04 is released. Version 1.2.0-alpha04 contains these commits .

رفع اشکالات

  • Fixed overlay animation issue where nested overlays such as ModalBottomSheet are re-aniamting unexpectedly when the overlays above it are popped. ( Ia2b9e , b/502624496 )

Version 1.2.0-alpha03

۱۹ مه ۲۰۲۶

androidx.navigation3:navigation3-*:1.2.0-alpha03 is released. Version 1.2.0-alpha03 contains these commits .

ویژگی‌های جدید

Navigation 3 now supports deep links with DeepLinkRequest and DeepLinkMatcher :

  • DeepLinkRequest a requested deep link containing a DeepLinkUri and an optional mimeType or action(Android only). Along with the new class are companion functions to create an instance with either a uri , a mimeType , or an action . The android platform also has a helper to build a request from an Intent. ( Iaaac9 , b/470282247 )

    val uriOnlyRequest = DeepLinkRequest.fromUriString("https://sampledeeplink.com/home")
    val uriAndMimeRequest = DeepLinkRequest.fromUriString(
      "https://sampledeeplink.com/user/profile?id=123",
      "image/png"
    )
    
  • DeepLinkMatcher represents a deep link that can be matched with a DeepLinkRequest . Each matcher instance is associated with the navigation key that supports this deep link. A navigation key can be associated with multiple matchers. Calling DeepLinkMatcher.match will return a MatchResult that contains the associated navigation key if match succeeds. There are two default DeepLinkMatcher implementations: UriDeepLinkMatcher for matching deep links based on Uri, and StaticKeyDeepLinkMatcher for matching deep links with only DeepLinkMatcher.Filter that match by a Boolean . ( I3798e , b/470282247 )

  • UriDeepLinkMatcher an opinionated implementation of DeepLinkMatcher that handles deep link by matching DeepLinkUri to a Serializable navigation key. It supports deep link arguments of Primitive types or Collection of primitives such as Lists, Arrays, and Sets. ( I1520b , b/470282247 )

    @Serializable
    data class UserKey(val id: Int): NavKey
    
    // declare a deep link supported by UserKey
    val userMatcher = UriDeepLinkMatcher(
      uriPattern = "www.sampledeeplink.com/user?userId={id}",
      serializer = serializer<UserKey>()
    )
    
    // handle a requested deep link with fallback key
    val key = userMatcher.match(deepLinkRequest)?.key ?: HomeKey
    
  • Added DeepLinkUri which is a kotlin-multiplatform version of android.net.Uri ( Id4725 , b/470282247 )

Api Changes

  • Bumped to compileSdk 37 to match Compose's compileSdk

رفع اشکالات

  • Fixed AnimatedBottomSheetSample 's IllegalArgumentException when displaying multiple overlays. The sample SceneStrategy will now correctly calculate the last non- OverlayScene and display it under all the overlay scenes. ( If2281 , b/506733412 )
  • Bumped NavigationEvent dependency to 1.1.1 which removes the no-op NavigationEventHandler when in inspection mode to enable Predictive Back in Android Studio Previews. ( I487fd )

Version 1.2.0-alpha02

۲۲ آوریل ۲۰۲۶

androidx.navigation3:navigation3-*:1.2.0-alpha02 is released. Version 1.2.0-alpha02 contains these commits .

API Changes

  • Rename onBack to onBackCompleted and add onBackCancelled to NavigationBackHandler to support handling cancelled back gestures. ( I92741 )
  • Add NavigationBackHandler to simplify handling back gestures and predictive back when using SceneState . This allows developers to more easily create custom UI components that support standard back navigation and predictive gestures without manually calculating back stack deltas. ( I6a055 )
  • Add rememberNavigationEventState to simplify connecting SceneState with predictive back handling. ( Iae49c )

ویژگی‌های جدید

  • Added a ResultEventBus API to allow for passing results between NavEntries with the LocalResultEventBus provided by the new ResultEventBusNavEntryDecorator . Passed in results can be assessed as a state with ResultEventBus#conflateAsState or as a flow of results with ResultEffect .

Version 1.2.0-alpha01

۸ آوریل ۲۰۲۶

androidx.navigation3:navigation3-*:1.2.0-alpha01 is released. Version 1.2.0-alpha01 contains these commits .

رفع اشکالات

  • Accessing LocalNavAnimatedContentScope from an OverlayScene will no longer cause an IllegalStateException as OverlayScenes are now provided with a no-op LocalAnimatedContentScope . ( I2f00c , b/486067688 )

Version 1.1.6

۱۲ آگوست ۲۰۲۶

androidx.navigation3:navigation3-*:1.1.6 is released. Version 1.1.6 contains these commits .

رفع اشکالات

  • NavEntry.contentKey now defaults to a composite of key.toString() and key::class.toString() . This ensures that data objects that share the same name but implement different interfaces will no longer have the same contentKey . However, JS platform's key::class only returns simple class name instead of fully qualified name, so JS platform should still implement custom contentKey for data objects with duplicate names. ( I1fbbb , b/512534342 )
  • Fixed IllegalArgumentException thrown by SaveableStateHolder for key reuse when multiple pop transitions are in-flight simulatenously due to rapid popping from the back stack. ( I4d728 , b/516312097 )

Version 1.1.5

۲۹ ژوئیه ۲۰۲۶

androidx.navigation3:navigation3-*:1.1.5 is released. Version 1.1.5 contains these commits .

رفع اشکالات

  • The entryProvider DSL now prioritizes NavEntry built with a key instance, for example entry(key = userKey) { ... } over NavEntry built with a key class such as entry<UserKey>{ ... } .( Ib5ec9 , b/533331924 )

نسخه ۱.۱.۴

۱ ژوئیه ۲۰۲۶

androidx.navigation3:navigation3-*:1.1.4 is released. Version 1.1.4 contains these commits .

رفع اشکالات

  • Fixed popped entry disappearing immediately when popping to an entry that has a nested metadata containing lambda values. ( Idb872 , b/520494430 )

Version 1.1.3

۱۷ ژوئن ۲۰۲۶

androidx.navigation3:navigation3-*:1.1.3 is released. Version 1.1.3 contains these commits .

رفع اشکالات

  • Fixed overlay animation issue where nested overlays such as ModalBottomSheet are re-aniamting unexpectedly when the overlays above it are popped. ( Ia2b9e , b/502624496 )

  • Bumped NavigationEvent dependency to 1.1.2 which removed the no-op NavigationEventHandler when in inspection mode to enable Predictive Back in Android Studio Previews.

نسخه ۱.۱.۲

۱۹ مه ۲۰۲۶

androidx.navigation3:navigation3-*:1.1.2 is released. Version 1.1.2 contains these commits .

رفع اشکالات

  • Bumped NavigationEvent dependency to 1.1.1 which removed the no-op NavigationEventHandler when in inspection mode to enable Predictive Back in Android Studio Previews.

نسخه ۱.۱.۱

۲۲ آوریل ۲۰۲۶

androidx.navigation3:navigation3-*:1.1.1 is released. Version 1.1.1 contains these commits .

رفع اشکالات

  • Accessing LocalNavAnimatedContentScope from an OverlayScene will no longer cause an IllegalStateException as OverlayScenes are now provided with a no-op LocalAnimatedContentScope . ( I2f00c , b/486067688 )

نسخه ۱.۱.۰

۸ آوریل ۲۰۲۶

androidx.navigation3:navigation3-*:1.1.0 is released. Version 1.1.0 contains these commits .

1.1.0 is now stable!

Important changes since 1.0.0

Shared Elements between Scenes - Navigation3 now supports treating scenes as shared element object. This means that when the scenes change, it is possible to ensure they have a smooth transition. You can enable this by passing a SharedTransitionScope to either the NavDisplay or to rememberSceneState .

SceneDecoratorStrategy - Introduction of SceneDecoratorStrategy to support uses cases such as decorating scenes with common UI components or sharing state across scenes.

NavMetadata DSL - Navigation3 now provides a new type-safe metadata DSL. The DSL uses a new MetadataKey interface that allows for defining the key and value types that they wish to provide to the metadata map. This also added new NavMetadataKeys for NavDisplay transitions so that they can be used with the new metadata DSL to add transitions to NavDisplay .

OverlayScene Animations - The OverlayScene interface has a new onRemoved suspending callback. This callback is invoked after a key associated with the scene is removed from the backstack, but before it leaves composition. This allows exit animations called within onRemoved to complete before the overlay scene is removed from composition.

Other Changes - NavDisplay and rememberSceneState now take a List<SceneStrategy> instead of the previous single SceneStrategy parameter that was chained by the then infix. - You can now dynamically add metadata with consideration for the entry key via the EntryProvider DSL.

Version 1.1.0-rc01

۲۵ مارس ۲۰۲۶

androidx.navigation3:navigation3-*:1.1.0-rc01 is released. Version 1.1.0-rc01 contains these commits .

رفع اشکالات

  • NavDisplay now ensures that entries that are displayed underneath overlays have their Lifecycle capped at STARTED . This ensures APIs like dropUnlessResumed continue to work when using dialogs. ( If209f , b/483966071 )
  • Fixed an issue in NavDisplay where navigating back and forth between the same screens and interrupting the animations between the two could cause the z-order of the screens to be incorrect. ( I4d491 , b/459419800 )

Version 1.1.0-beta01

۱۱ مارس ۲۰۲۶

androidx.navigation3:navigation3-*:1.1.0-beta01 is released. Version 1.1.0-beta01 contains these commits .

Version 1.1.0-alpha05

۲۵ فوریه ۲۰۲۶

androidx.navigation3:navigation3-*:1.1.0-alpha05 is released. Version 1.1.0-alpha05 contains these commits .

API Changes

  • NavDisplay and rememberSceneState now take a List<SceneStrategy> instead of the previous single SceneStrategy parameter that was chained by the then infix. This more closely aligns with the List<SceneDecoratorStrategy<T>> that both of these APIs already take. The previous APIs have been deprecated. ( I78b2c , b/482108465 )
  • Added a metadata #contains operator to check if the metadata map contains the given NavMetadataKey . ( Ic30db , b/485311895 )
  • Added NavMetadataKey DialogKey for DialogSceneStrategy to use with Metadata DSL. ( Ic7a26 , b/483388817 )

Version 1.1.0-alpha04

۱۱ فوریه ۲۰۲۶

androidx.navigation3:navigation3-*:1.1.0-alpha04 is released. Version 1.1.0-alpha04 contains these commits .

ویژگی‌های جدید

  • Navigation3 now provides a new type-safe metadata DSL. The DSL uses a new MetadataKey interface that allows for defining the key and value types that they wish to provide to the metadata map. This also added new NavMetadataKey s for NavDisplay transitions so that they can be used with the new metadata DSL to add transitions to NavDisplay . ( Ic10ef , Ic049c , b/476213928 )

API Changes

  • The OverlayScene interface has a new onRemoved suspending callback. This callback is invoked after a key associated with the scene is removed from the backstack, but before it leaves composition. This allows exit animations called within onRemoved to complete before the overlay scene is removed from composition. ( I29a72 , b/440558061 )
  • SceneStrategy has separated the decoration function into a new SceneDecoratorStrategy . This new interface is what is should be used to decorate scenes. There are new APIs for NavDisplay and rememberSceneState to allow the addition of SceneDecoratorStrategies . ( If9385 , b/477669607 , b/477670333 )

رفع اشکالات

  • Fixed an error where passing a SharedTransitionLayout into either the NavDisplay or rememberSceneState and using any OverlayScene would cause a crash because using SharedTransitionLayout only works with NavEntries that are rendered as part of the AnimatedContent and OverlayScene are rendered in their own windows separately. ( I1bb76 , b/478664101 )

Dependency Update

  • From Navigation3 1.0.1: Navigation3 now depends on NavigationEvent 1.0.2. This fixes an IllegalStateException caused by using NavDisplay during AndroidStudio Previews. ( Id7212 , b/477149762 )

Version 1.1.0-alpha03

۲۸ ژانویه ۲۰۲۶

androidx.navigation3:navigation3-*:1.1.0-alpha03 is released. Version 1.1.0-alpha03 contains these commits .

ویژگی‌های جدید

  • You can now dynamically add metadata with consideration for the entry key via the EntryProvider DSL. ( I942fb , b/474416976 )

Version 1.1.0-alpha02

۱۴ ژانویه ۲۰۲۶

androidx.navigation3:navigation3-*:1.1.0-alpha02 is released. Version 1.1.0-alpha02 contains these commits .

ویژگی‌های جدید

  • SceneStrategy now supports nesting scenes via a new calculatedScene(Scene) function. This means that SceneStrategy 's can be customized to provide additional functionality to other scenes. ( I5df7c , b/440333896 )

Version 1.1.0-alpha01

December 03, 2025

androidx.navigation3:navigation3-*:1.1.0-alpha01 is released. Version 1.1.0-alpha01 contains these commits .

API Changes

  • Navigation3 now supports treating scenes as shared element object. This means that when the scenes change, it is possible to ensure they have a smooth transition. You can enable this by passing a SharedTransitionScope to either the NavDisplay or to rememberSceneState . ( I15868 )

نسخه ۱.۰

Version 1.0.1

۱۱ فوریه ۲۰۲۶

androidx.navigation3:navigation3-*:1.0.1 is released. Version 1.0.1 contains these commits .

Dependency Update

  • Navigation3 now depends on NavigationEvent 1.0.2. This fixes an IllegalStateException caused by using NavDisplay during AndroidStudio Previews. ( Id7212 , b/477149762 )

نسخه ۱.۰.۰

۱۹ نوامبر ۲۰۲۵

androidx.navigation3:navigation3-*:1.0.0 is released. Version 1.0.0 contains these commits .

Introducing Navigation3!

Version 1.0.0-rc01

۵ نوامبر ۲۰۲۵

androidx.navigation3:navigation3-*:1.0.0-rc01 is released. Version 1.0.0-rc01 contains these commits .

رفع اشکالات

  • NavDisplay now sets a LocalLifecycleOwner at the Scene level that allows scene authors to determine whether all transitions have finished by checking that the Lifecycle.State is RESUMED . The behavior of the LocalLifecycleOwner at the NavEntry level is unchanged: it also remains capped at STARTED if a transition is in progress and is additionally capped at CREATED if that NavEntry has been popped from the back stack and is in the process of animating out. ( I03113 , b/454045829 )

Version 1.0.0-beta01

۲۲ اکتبر ۲۰۲۵

androidx.navigation3:navigation3-*:1.0.0-beta01 is released. Version 1.0.0-beta01 contains these commits .

API Changes

  • SceneStrategyScope now only has a no argument public constructor, suitable for testing your SceneStrategy and the returned Scene in isolation. For more complex use cases, please use rememberSceneState() . ( I8440c , b/451679047 )

رفع اشکالات

  • Fixed infinite loop when chaining SceneStrategy with then . ( Iba3f0 , b/450323470 )
  • Fixed screen flicker when swapping the backStack passed to NavDisplay and using animations. ( Ief7b5 , b/450967248 )

Version 1.0.0-alpha11

October 08, 2025

androidx.navigation3:navigation3-*:1.0.0-alpha11 is released. Version 1.0.0-alpha11 contains these commits .

API Changes

  • The calculateScene method on SceneStrategy is no longer @Composable . Instead, consider moving this work to the construction of your SceneStrategy method (ie, in a rememberMySceneStrategy() method) that fully allows you to define the lifetime of any rememberSaveable values or key remember statements off of the correct values. ( If1733 , b/448709506 )
  • The onBack parameter for SceneStrategy.calculateScene has been moved into the new receiver scope of SceneStrategyScope to make it more clear that this is an optional parameter and provide an extension point for future Navigation3 features. ( I3aea3 , b/448460407 )
  • The onBack lambda passed into NavDisplay and to your SceneStrategy no longer provides a count: Int parameter to indicate when multiple entries should be popped. Instead, the () -> Unit lambda will now be called multiple times in a row in the rare case where your Scene requests popping multiple entries. ( Idedb5 , b/446989346 )
  • Remove the NavEntryWrapper class and replace its functionality with a final NavEntry class with a new secondary constructor that takes a NavEntry with new content. This will allow continued support for wrapping an entry with new content. ( I7da2a , b/444447130 )
  • The navEntryDecorator function which creates and returns a NavEntryDecorator has been removed and replaced by the NavEntryDecorator class which is now made public and open for subclassing. ( If81f8 , b/444447434 , b/447381176 )
  • SavedStateNavEntryDecorator has been renamed to SaveableStateHolderNavEntryDecorator since it decorates entries with a SaveableStateHolder . The decorator has also been refactored from a function to a class since it is functionally a factory for NavEntryDecorator . ( Ie6013 , b/447381176 )
  • Custom displays using SceneState as an alternative to using NavDisplay no longer are required to use the LocalEntriesToRenderInCurrentScene composition local, which is now internal. ( Ic40ef , b/414668196 )
  • Removed SceneSetupNavEntryDecorator and rememberSceneSetupNavEntryDecorator() from the public API surface. This functionality now is included by default without requiring you to manually include it. ( Ieae42 , b/444479133 )
  • NavEntry , DialogScene , SinglePaneScene , and SceneState now all implement equals. ( I96121 )
  • Scene interface has a new metadata field to attach scene-specific metadata for NavDisplay. This allows a Scene to override the metadata on the NavDisplay , for instance with transitions. ( I1fd96 , b/443955625 )
  • Simplify rememberNavBackStack signature by removing the redundant generic type parameter. The function now accepts vararg elements: NavKey . ( I03e45 )
  • The default animations for NavDisplay are now part of the common API which allows them to be called from all platforms. ( I71af9 , b/447147159 )
  • Rename EntryProviderBuilder to EntryProviderScope to accurately reflect that the class is a Kotlin DSL providing a scope to build NavEntries . ( Ia7465 )

رفع اشکالات

  • rememberNavBackStack() now enforces polymorphic serialization for NavKey and requires a custom SavedStateConfiguration that is configured to ensure correct state restoration. KDoc have been updated to reflect the requirement that all NavKey subtypes must be registered in the provided SerializersModule. ( I6de37 , I782f2 , b/446664383 )

Version 1.0.0-alpha10

۲۴ سپتامبر ۲۰۲۵

androidx.navigation3:navigation3-*:1.0.0-alpha10 is released. Version 1.0.0-alpha10 contains these commits .

API Changes

  • Add new NavDisplay overload that takes a list of NavEntry<T> that has been decorated by rememberDecoratedNavEntries . ( I4025b , b/441940314 )
  • Moved DialogScene to a new package. ( Ia5840 )
  • Remove public API DecorateNavEntry . Instead use rememberDecoratedNavEntries to wrap a NavEntry with a list of decorators. ( Id8c09 )
  • Navigation3 UI now provides new default transitionSpec properties. ( Ibcabd )
  • Added a new SceneState object to help manage scenes. This also provides a new NavDisplay overload that takes the SceneState and the NavigationEventState . ( Idfb46 , b/444479133 )
  • NavDisplay now allows you to customize the transitions based on what Scene you are going to and from by looking at the Transition 's currentState and targetState . ( I906cc , b/443872322 )
  • NavigationEventInfo is now an abstract class instead of an interface . Update all custom implementations to inherit from the class (e..g, data class MyInfo : NavigationEventInfo() ). ( I1e59c , b/444734264 )
  • The navigationevent-compose handler APIs are updated. NavigationEventHandler and NavigationBackHandler (and variants) now support a new overload that accepts a hoisted NavigationEventState s. The simple overloads (taking currentInfo ) are preserved and now use this new state model internally. ( Ic3251 , b/444734264 )
  • All of the Scene APIs have been moved out of navigation3-ui to navigation3-runtime. This means they are now available on all platforms supported by navigation3-runtime. ( I431d0 , b/444449993 )
  • Added new rememberDecoratedNavEntries overload that takes a list of NavEntry to decorate. The input entries can be already decorated with other entry decorators. ( I5a034 , b/444230270 )
  • Remove navigation3 wildcard type parameters ( I02540 )
  • Improved the handling of generics for the entryProvider DSL. If you were previously importing androidx.navigation3.runtime.entry , this is no longer required. ( I299fc )
  • Restrict the reflection-based NavBackStackSerializer overload to Android. This prevents implicit runtime serialization failures on non-Android platforms by enforcing the use of the explicit SavedStateConfiguration overload in multiplatform code. ( I73313 , b/420443609 )
  • Make NavigationEvent 's swipeEdge an @IntDef ( Icee54 , b/443950342 )
  • Restrict NavBackStack serialization to Android. This prevents runtime failures on non-Android platforms. For multiplatform state saving, use the rememberNavBackStack overload with an explicit SavedStateConfiguration . ( I1e418 , b/420443609 )

رفع اشکالات

  • Fix crash during predictive back when nested NavDisplay has a single child entry. ( I2cdc0 , b/441933162 )

Version 1.0.0-alpha09

۱۰ سپتامبر ۲۰۲۵

androidx.navigation3:navigation3-*:1.0.0-alpha09 is released. Version 1.0.0-alpha09 contains these commits .

API Changes

  • The DecoratedNavEntryProvider has been replaced with rememberDecoratedNavEntries that creates and return NavEntries decorated with the list of provided decorators ( I0fe1c , b/441328236 )
  • NavBackStack is now generic over the NavKey type. This allows apps and libraries to define custom key types for their back stacks, rather than being restricted to NavKey . ( I4d190 , Iad2f4 , b/420443609 )
  • NavBackStack is now @kotlinx.serialization.Serializable , making it possible to save and restore navigation state across process death and configuration changes without extra boilerplate. ( I2c3cf , b/420443609 )
  • RememberNavBackStack has been moved to commonMain to ensure it is provided on all platform targets. ( Id69e7 , b/420443609 )

رفع اشکالات

  • NavDisplay now correctly moves each individual NavEntry to the correct Lifecycle.State . ( I30aac , b/440145700 )
  • Fixed an issue where NavDisplay would ignore any nested NavigationEventDispatcherOwner set via the NavigationEvent library's LocalNavigationEventDispatcherOwner . ( I6224a )

Dependency Changes

Version 1.0.0-alpha08

۲۷ آگوست ۲۰۲۵

androidx.navigation3:navigation3-*:1.0.0-alpha08 is released. Version 1.0.0-alpha08 contains these commits .

ویژگی‌های جدید

  • Added new Kotlin MultiPlatform (KMP) targets to Navigation3 Runtime artifacts. Navigation3 Runtime now supports the following platforms in total: JVM (Android and Desktop), Native (Linux, iOS, watchOS, macOS, MinGW), and Web (JavaScript, WasmJS). ( I55078 , b/424410398 , b/419294028 , b/419046226 ). Note: This does not provide KMP targets for Navigation3 UI artifact. On other platforms, you will need to implement your own custom NavDisplay . If you would like to see it supported, please vote on the Jetbrains issue here and track the progress for additional support there.
  • The NavDisplayInfo object is now public and can be used to retrieve the list of visible entries from the NavDisplay . ( Ibc91f )

API Changes

  • Added a new NavBackStackSerializer to be used in conjunction with rememberNavBackStack to perform state restoration. rememberNavBackStack() now also takes a SavedStateConfiguration that can be used to provide your own configuration. ( I2f4d2 , I4cd58 , b/420443609 )

رفع اشکالات

مشکلات شناخته شده

  • There was a bug introduced by I8bf6d that caused Lifecycles to be based on scenes instead of individual entries, which broke Lifecycle for any cases where the key provided to the NavEntry is not a String or your NavEntry has not overridden the contentKey and set it equal to the key (note that doing this enforces that your key can be saved into a Bundle ). This has been fixed for the next release. ( b/440145700 )

Version 1.0.0-alpha07

۱۳ آگوست ۲۰۲۵

androidx.navigation3:navigation3-*:1.0.0-alpha07 is released. Version 1.0.0-alpha07 contains these commits .

MinSdk Update

API Changes

  • SavedStateNavEntryDecorator now uses the SaveableStateRegistry built into SaveableStateProvider to save and restore states. ( If8d9a )
  • The predictivePopTransitionSpec is now provided the swipe edge as a parameter, allowing you to customize the transition based on what edge the user started the Predictive Back gesture from. ( I753a8 )

رفع اشکالات

  • Fixed an issue that would cause custom scenes to be infinitely recalculated because the most recent scene was not being remembered. ( I7ba84 , b/418153031 )

Dependency update

Version 1.0.0-alpha06

۳۰ ژوئیه ۲۰۲۵

androidx.navigation3:navigation3-*:1.0.0-alpha06 is released. Version 1.0.0-alpha06 contains these commits .

Dependency Update

Version 1.0.0-alpha05

۲ ژوئیه ۲۰۲۵

androidx.navigation3:navigation3-*:1.0.0-alpha05 is released. Version 1.0.0-alpha05 contains these commits .

Behavior Changes

  • The NavEntry 's state is now strictly based on the current list of decorators passed to the NavDisplay . This means that decorators should be swapped along your back stacks in the case of multiple back stacks in order to preserve the state of the NavEntries on the back stack. Otherwise, the states will be cleared as if the entries were popped (instead of a swap). ( I7a759 , b/428033667 )

Version 1.0.0-alpha04

۱۸ ژوئن ۲۰۲۵

androidx.navigation3:navigation3-*:1.0.0-alpha04 is released. Version 1.0.0-alpha04 contains these commits .

API Changes

  • NavEntry.content is now private. To invoke NavEntry content, call the new NavEntry.Content() api which no longer requires a key parameter to invoke. ( Icd0fd , b/420991203 )
  • NavEntry.key is now a private field. The NavEntry and its relevant states should be identified by the new contentKey field which is generated from the new contentKeyFactory lambda and defaults to a saveable hash generated from NavEntry.key ( I81a6c , b/422001357 , b/420991203 I2d7d4 , b/420991203 , b/422841812 )

Dependency Changes

  • Navigation3 now depends on the new androidx.navigationevent.compose artifact.

Version 1.0.0-alpha03

۴ ژوئن ۲۰۲۵

androidx.navigation3:navigation3-*:1.0.0-alpha03 is released. Version 1.0.0-alpha03 contains these commits .

رفع اشکالات

  • Navigation3 will no longer clear decorator states for backStacks that have been swapped out and replaced with another backStack instance. ( I28a42 , b/415076044 )

Version 1.0.0-alpha02

۲۳ مه ۲۰۲۵

androidx.navigation3:navigation3-*:1.0.0-alpha02 is released. Version 1.0.0-alpha02 contains these commits .

رفع اشکالات

  • Fixed an issue with the SavedStateNavEntryDecorator which caused collisions for different data classes with the same property values. ( b/418070648 , Iff4775 )
  • Fixed a missing class issue that would cause crashes when running without declaring explicit dependencies. ( b/419049149 , I4b4ed )

Version 1.0.0-alpha01

۲۰ مه ۲۰۲۵

androidx.navigation3:navigation3-*:1.0.0-alpha01 is released. Version 1.0.0-alpha01 contains these commits .

ویژگی‌های جدید

Navigation3 is a new navigation library built specifically to handle Jetpack Compose in-app navigation. The androidx.navigation3.runtime artifact provides the building blocks, while the androidx.navigation3.ui artifact provides the UI layer via the NavDisplay API. Developers can provide their own state directly to the NavDisplay composable function, which changes the content based on changes in the developer state.

@Serialiable object Home : NavKey
@Serialiable object Chat : NavKey

val backStack = rememberNavBackStack(Home)

NavDisplay(backStack, entryProvider = entryProvider {
  entry<Home> {
    Column {
      Text(Home)
      Button(onClick = { backStack.add(Chat) } ) {
        Text(Go to Chat)
      } 
    }
  }
  entry<Chat> { /* My Composable Content */ }
})

For more information, see the Navigation3 guide .