如何从对话框导航到导航组件中的片段?

mus*_*off 5 android android-fragments android-dialogfragment android-navigation android-architecture-navigation

我试图在导航组件中从导航DialogFragmentFragment,但是结果很奇怪。

在此处输入图片说明

当我从导航DialogFragment到时Fragment,背景片段会更改为目标片段,并在其顶部显示当前对话框,而不仅仅是移动到目标片段。

这是导航图。

<navigation
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/home"
    app:startDestination="@+id/titleScreen">

    <fragment
        android:id="@+id/titleScreen"
        android:name="com.example.android.navigationadvancedsample.homescreen.Title"
        android:label="@string/title_home"
        tools:layout="@layout/fragment_title">
        <action
            android:id="@+id/action_title_to_about"
            app:destination="@id/aboutScreen"/>
    </fragment>
    <dialog
        android:id="@+id/aboutScreen"
        android:name="com.example.android.navigationadvancedsample.homescreen.About"
        android:label="@string/title_about"
        tools:layout="@layout/fragment_about">
        <action
            android:id="@+id/action_aboutScreen_to_register"
            app:destination="@id/register" />
    </dialog>
    <fragment
        android:id="@+id/register"
        android:name="com.example.android.navigationadvancedsample.formscreen.Register"
        android:label="fragment_leaderboard"
        tools:layout="@layout/fragment_leaderboard" />
</navigation>
Run Code Online (Sandbox Code Playgroud)

为什么我会出现这种现象或如何解决?

修复是指正常的对话框行为。我说,我有一个对话框d上的一个分段的顶部一个,并移动到一个片段从一个按钮d,屏幕应该显示。当我从B弹出时,它应该转到A之上的D的前一阶段。