https://kotlinlang.org logo
#android
Title
# android
d

Danil Novoselov

10/26/2019, 10:14 AM
Hi, guys!! I have got a trouble with our lovely system )) Imagine we have 3 fragments A -> B -> C. I need to go from C -> A using
fragmentManager.popBackStack()
. I did not put the B fragment to back stack, so I used
fragmentTransaction.replace(...).commit()
. BUT! when use
fragmentManager.popBackStack()
on fragment C I go to the fragment A, but fragment C is overdrawn over (or behind I do not understand) fragment A. Do we have a nice solution to manage this situation? I know, that we can use
popBackStack()
for specific transaction, but I do need to put fragment B to backstack
m

Mavya Soni

10/26/2019, 3:27 PM
I think, we could use Fragment B as a full screen dialg frgment. If we replaced the fragment B, might be overlapping issue come. I am not sure it is right solution or not.
e

ezorrio

10/27/2019, 8:52 PM
Make sure you are using getSupportFragmentManager and AndroidX fragments as well
d

Danil Novoselov

10/28/2019, 7:54 AM
@ezorrio That is exactly what I use 🙂
2 Views