I have a Main Activity with a Fragment inside it. The layout of the main activity is having the FrameLayout to hold the fragment. I have set the ScrollingViewBehavior to the Framelayout of main activity, inorder to achieve the auto hide property of toolbar on scrolling. The layout of the Fragment is having a NestedScrollView with the BottomSheetBehavior added to it. Toolbar is seem to be fixed and not working as expected on scrolling. Guess, it might be due to the app:layout_behavior set to both the main layout and fragment layout.
Could someone help me in fixing this?