I want to create an application with bottom navbar with the possibility of swipe right and left to change fragment. After implementing these features, I noticed that the swipe works by changing the corresponding fragment on the navbar. But a second instance of fragment is present in parallel corresponding to the click on the various items of the navbar. So I have two fragments that appear in parallel on the screen, one linked to the swipe and the other linked to the navbar. So I will know how to link the same instance of each fragment to the swipe and navbar.
At the start of my application, I took the activity with the bottom navbar as a main activity.
Here is a screen to illustrate:
I tried to manipulate the fragments for added them to the items of the navbar but I failed to know how to do with the nav host fragment.