Single fling to uncollapse Android's CollapsingToolbarLayout

﹥>﹥吖頭↗ 提交于 2019-12-07 03:32:07

问题


I have implemented a CollapsingToolbarLayout with a parallax view.

When I scroll back up the RecyclerView in one continuous scroll it uncollapses the CollapsingToolbarLayout.

But when I issue a 'fling' the nested scroll view, it stops at the top of the nested scroll view. You have to fling again to uncollapse the CollapsingToolbarLayout,

The ScrollingActivity template in Android Studio 2.0 demonstrates this problem. And Chris Bain's Cheesecake project, in the detail view, demonstrates the same.

However, neither Google Play nor Spotify exhibit this problem in the 'view app' and 'playlist' views respectively. In a single fling, they will scroll to the top of the nested scroll view and uncollapse the toolbar.

Is this possible with the design library elements?

Edit: Ian has noted this reported bug. Please star it and post any work around you may have.


回答1:


Android Support Library 26.0.0-beta2 fixes this issue! See here. It tested it and it is working fine!




回答2:


It is a known issue, currently being worked on as mentioned in the comments on this Google+ post.



来源:https://stackoverflow.com/questions/35545301/single-fling-to-uncollapse-androids-collapsingtoolbarlayout

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!