Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
View issue level access limits(Press Alt + Right arrow for more information)
Unintended behavior
View staffing
Description
Component used: View Pager 2, Navigation Component Version used: 1.0.0, 2.3.5 Devices/Android versions reproduced on: Emulator/ R
Explanation
cannot navigate up when navigating to self fragment from nested fragment but when i try the same thing with viewpager it can navigate up and saving the state before navigating
Project Sample is in Attachment
screen shot and screen record will be attach soon.
Here is the exception
2021-10-29 22:53:24.136 16364-16364/com.onirutla.githubuser E/AndroidRuntime: FATAL EXCEPTION: main Process: com.onirutla.githubuser, PID: 16364 java.lang.IllegalArgumentException at androidx.core.util.Preconditions.checkArgument(Preconditions.java:38) at androidx.viewpager2.adapter.FragmentStateAdapter.onAttachedToRecyclerView(FragmentStateAdapter.java:140) at androidx.recyclerview.widget.RecyclerView.setAdapterInternal(RecyclerView.java:1243) at androidx.recyclerview.widget.RecyclerView.setAdapter(RecyclerView.java:1194) at androidx.viewpager2.widget.ViewPager2.setAdapter(ViewPager2.java:467) at com.onirutla.githubuser.ui.detail.DetailFragment.onViewCreated(DetailFragment.kt:55) at androidx.fragment.app.Fragment.performViewCreated(Fragment.java:2987) at androidx.fragment.app.FragmentStateManager.createView(FragmentStateManager.java:546) at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:282) at androidx.fragment.app.FragmentManager.executeOpsTogether(FragmentManager.java:2180) at androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute(FragmentManager.java:2106) at androidx.fragment.app.FragmentManager.execPendingActions(FragmentManager.java:2002) at androidx.fragment.app.FragmentManager$5.run(FragmentManager.java:524) at android.os.Handler.handleCallback(Handler.java:938) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:223) at android.app.ActivityThread.main(ActivityThread.java:7656) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)