সেভ করা পৃষ্ঠা গুছিয়ে রাখতে 'সংগ্রহ' ব্যবহার করুন
আপনার পছন্দ অনুযায়ী কন্টেন্ট সেভ করুন ও সঠিক বিভাগে রাখুন।
এই দস্তাবেজটি রূপরেখা দেয় যে কীভাবে ডায়ালগ গন্তব্যগুলির ব্যবহার আপনাকে আপনার ব্যাক স্ট্যাক পরিচালনা করতে হবে তার জন্য অনন্য বিবেচনার পরিচয় দিতে পারে।
ওভারভিউ
এক বা একাধিক ডায়ালগ গন্তব্য শুধুমাত্র ব্যাক স্ট্যাকের উপরে থাকতে পারে। এর কারণ হল যখন ব্যবহারকারী একটি গন্তব্যে নেভিগেট করে যেটি একটি ডায়ালগ গন্তব্য নয়, তখন NavController স্বয়ংক্রিয়ভাবে স্ট্যাকের উপরের সমস্ত ডায়ালগ গন্তব্যগুলিকে পপ করে। এটি নিশ্চিত করে যে বর্তমান গন্তব্যটি পিছনের স্ট্যাকের অন্যান্য গন্তব্যগুলির উপর সর্বদা সম্পূর্ণরূপে দৃশ্যমান।
যদি ব্যাক স্ট্যাকটি শুধুমাত্র হোস্ট করা গন্তব্যগুলি নিয়ে থাকে যা নেভিগেশন হোস্টকে পূরণ করে এবং ব্যবহারকারী একটি ডায়ালগ গন্তব্যে নেভিগেট করে, তাহলে ব্যাক স্ট্যাকটি চিত্র 2 এর মতো দেখতে হতে পারে:
চিত্র 2. উপরে একটি ডায়ালগ গন্তব্য সহ একটি ব্যাক স্ট্যাক।
ব্যবহারকারী যদি তারপরে অন্য ডায়ালগ গন্তব্যে নেভিগেট করে, তাহলে এটি ব্যাক স্ট্যাকের শীর্ষে যোগ করা হয়, যেমন চিত্র 3 এ দেখানো হয়েছে:
চিত্র 3. উপরে দুটি Dialog গন্তব্য সহ একটি ব্যাক স্ট্যাক।
ব্যবহারকারী যদি একটি নন-ফ্লোটিং গন্তব্যে নেভিগেট করে, নতুন গন্তব্যে নেভিগেট করার আগে যে কোনও ডায়ালগ গন্তব্যগুলি প্রথমে পিছনের স্ট্যাকের শীর্ষ থেকে পপ করা হয়, যেমন চিত্র 4 এ দেখানো হয়েছে:
চিত্র 4.Dialog গন্তব্যগুলি পপ করা হয়েছে, এবং নতুন গন্তব্য যোগ করা হয়েছে৷
এই পৃষ্ঠার কন্টেন্ট ও কোডের নমুনাগুলি Content License-এ বর্ণিত লাইসেন্সের অধীনস্থ। Java এবং OpenJDK হল Oracle এবং/অথবা তার অ্যাফিলিয়েট সংস্থার রেজিস্টার্ড ট্রেডমার্ক।
2025-07-29 UTC-তে শেষবার আপডেট করা হয়েছে।
[[["সহজে বোঝা যায়","easyToUnderstand","thumb-up"],["আমার সমস্যার সমাধান হয়েছে","solvedMyProblem","thumb-up"],["অন্যান্য","otherUp","thumb-up"]],[["এতে আমার প্রয়োজনীয় তথ্য নেই","missingTheInformationINeed","thumb-down"],["খুব জটিল / অনেক ধাপ","tooComplicatedTooManySteps","thumb-down"],["পুরনো","outOfDate","thumb-down"],["অনুবাদ সংক্রান্ত সমস্যা","translationIssue","thumb-down"],["নমুনা / কোড সংক্রান্ত সমস্যা","samplesCodeIssue","thumb-down"],["অন্যান্য","otherDown","thumb-down"]],["2025-07-29 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."]]