Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
Bu dokümanda, iletişim hedeflerinin kullanımının, arka yığınınızı nasıl yönetmeniz gerektiği konusunda dikkat edilmesi gereken benzersiz noktaları nasıl ortaya çıkarabileceği açıklanmaktadır.
Genel bakış
Bir veya daha fazla iletişim kutusu hedefi yalnızca arka yığının en üstünde olabilir.
Bunun nedeni, kullanıcı iletişim kutusu hedefi olmayan bir hedefe gittiğinde NavController, tüm iletişim kutusu hedeflerini otomatik olarak yığının üst kısmından çıkarmasıdır. Bu, geçerli hedefin her zaman arka yığındaki diğer hedefler üzerinde tamamen görünür olmasını sağlar.
Geri yığın, yalnızca gezinme ana makinesini dolduran barındırılan hedeflerden oluşuyorsa ve kullanıcı bir iletişim kutusu hedefine gidiyorsa arka yığın, şekil 2'ye benzer görünebilir:
Şekil 2. En üstte iletişim kutusu hedefi olan bir arka yığın.
Kullanıcı daha sonra başka bir iletişim kutusu hedefine giderse bu öğe, Şekil 3'te gösterildiği gibi arka yığının en üstüne eklenir:
Şekil 3. En üstte iki Dialog hedefi olan bir arka yığın.
Kullanıcı daha sonra kayan olmayan bir hedefe giderse iletişim kutusu hedefleri, yeni hedefe gitmeden önce Şekil 4'te gösterildiği gibi ilk olarak geri yığınının tepesinden çıkarılır:
Şekil 4.Dialog hedefleri açılır ve yeni hedef eklenir.
Bu sayfadaki içerik ve kod örnekleri, İçerik Lisansı sayfasında açıklanan lisanslara tabidir. Java ve OpenJDK, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2025-07-27 UTC.
[[["Anlaması kolay","easyToUnderstand","thumb-up"],["Sorunumu çözdü","solvedMyProblem","thumb-up"],["Diğer","otherUp","thumb-up"]],[["İhtiyacım olan bilgiler yok","missingTheInformationINeed","thumb-down"],["Çok karmaşık / çok fazla adım var","tooComplicatedTooManySteps","thumb-down"],["Güncel değil","outOfDate","thumb-down"],["Çeviri sorunu","translationIssue","thumb-down"],["Örnek veya kod sorunu","samplesCodeIssue","thumb-down"],["Diğer","otherDown","thumb-down"]],["Son güncelleme tarihi: 2025-07-27 UTC."],[],[],null,["# Dialog destinations\n\nThis document outlines how the use of [dialog destinations](/guide/navigation/design) can introduce\nunique considerations for how you need to manage your back stack.\n\nOverview\n--------\n\nOne or more dialog destinations can only exist on the top of the back stack.\nThis is because when the user navigates to a destination that is not a dialog\ndestination, the `NavController` automatically pops all dialog destinations off\nthe top of the stack. This ensures that the current destination is always fully\nvisible over other destinations on the back stack.\n\nDestinations can be either [hosted destinations](/guide/navigation/design), [activity\ndestinations](/guide/navigation/design/activity-destinations), or [dialog destination](/guide/navigation/design/dialog-destinations).\n| **Note:** Dialog destinations implement the [`FloatingWindow`](/reference/androidx/navigation/FloatingWindow) interface. As such, they overlay other destinations on the back stack.\n\nExample\n-------\n\nIf the back stack consists solely of [hosted destinations](/guide/navigation/design)\nthat fill the navigation host, and the user navigates to a dialog destination,\nthen the back stack might look similar to figure 2:\n**Figure 2.** A back stack with a dialog destination on top.\n\nIf the user then navigates to another dialog destination, it is then added to\nthe top of the back stack, as shown in figure 3:\n**Figure 3.** A back stack with two `Dialog` destinations on top.\n\nIf the user then navigates to a non-floating destination, any dialog\ndestinations are first popped from the top of the back stack before navigating\nto the new destination, as shown in figure 4:\n**Figure 4.** The `Dialog` destinations are popped, and the new destination is added."]]