NestedScrollView wont't scroll to the end when used with CollapsingToolbarLayout

前端 未结 7 2244
青春惊慌失措
青春惊慌失措 2020-12-30 02:59

I want to use NestedScrollView with CollapsingToolbarLayout. In NestedScrollView there is really long content. Unfortunately I can\'t scroll to the end. Some of this long co

7条回答
  •  梦毁少年i
    2020-12-30 03:16

    What causes this for me is "exitUntilCollapsed" line in my CollapsingToolbarLayout: app:layout_scrollFlags="scroll|exitUntilCollapsed">

    It causes problem when used with "scroll". I couldn't also use marginBottom because I have an instant translate option which refreshes the TextViews with new content, and when that happens it mysteriously decides to scroll even further more, which ends up in a really bad looking empty space at the bottom.

    I solved it using "enterAlwaysCollapsed" instead and moved my toolbar to the very top, outside the collapse. It's not exactly what I want but so far I couldn't find a solution.

提交回复
热议问题