0

I am facing an issue with bottom navigation when navigating through different fragments, There are 3 fragments as follows: List, Loading & Playing

When user taps on Lists, it has to go to loading and if everything goes well when loading, it moves to Playing fragment. I'm using app:popUpTo="@id/loadingFragment" app:popUpToInclusive="true" so it doesn't show when I come back from Playing to List fragment. The main problem is, whenever I click on any item from Listing after the first cycle(as mentioned above), it opens the Playing fragment directly and it doesn't show the intermediate loading fragment

<fragment
        android:id="@+id/loadingFragment"
        tools:layout="@layout/fragment_loading">
        <argument
            android:name="object_id"
            app:argType="string" />
        <argument
            android:name="object_name"
            app:argType="string" />
        <action
            android:id="@+id/loadingToPlaying"
            app:destination="@id/playingFragment"
            app:popUpTo="@id/loadingFragment"
            app:popUpToInclusive="true"/>
 </fragment>
 <fragment
        android:id="@+id/playingFragment"
        tools:layout="@layout/fragment_playing">
        <argument
            android:name="session_object_id"
            app:argType="string" />
        <argument
            android:name="session_name"
            app:argType="string" />
    </fragment>
h_malik
  • 167
  • 1
  • 8

0 Answers0