Make AppBarLayout respond to scrolling in WebView

前端 未结 2 1207
别跟我提以往
别跟我提以往 2021-02-01 08:17

In the design support Library (from I/O) Google introduced the AppBarLayout. I\'m trying to make the Toolbar animate out of the screen when the user scrolls through a website in

2条回答
  •  情深已故
    2021-02-01 08:58

    Thanks to @torque203 for providing this answer. I'm reposting this to gather more attention to it.

    You can extend webview and implement NestedScrollingChild. For example, you can use the NestedWebView object found in this Github project.

    From there on, you can act like it's a normal View that supports Nested Scrolling, like a RecyclerView:

    
    

    In my use case, this worked fine.

    Again, credits to @torque203 for finding this Github project.

提交回复
热议问题