I have a [PDFView][1]
as the direct child of a CoordinatorLayout
as in:
I tried to add app:layout_behavior="@string/appbar_scrolling_view_behavior"
to the PDFView
but it's not compatible so it isn't triggering any scroll behavior on the Toolbar
.
The Toolbar
has app:layout_scrollFlags="scroll|enterAlways|snap"
and I know it works because I already tested it with a NestedScrollView
instead of the PDFView
.
So I want to achieve this programatically, but I can't find any documentation on how to let the CoordinatorLayout
know there's a scroll going on and it should animate the Toolbar
going away.
How can I trigger this behavior programatically? The PDFView
has a ScrollListner
I just don't know how to connect it to the CoordinatorLayout
.