0

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?

Shyam
  • 871
  • 6
  • 15
  • 30

2 Answers2

0

Set this flag to your ToolBar.

 app:layout_scrollFlags="scroll|enterAlways"

How to hide ToolBar when i scrolling content up in android

it may help you

Lokik Soni
  • 602
  • 1
  • 5
  • 25
0

Moved the bottom sheet also to the main activity's layout, solved the issue.

Shyam
  • 871
  • 6
  • 15
  • 30