Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Single fling to uncollapse Android's CollapsingToolbarLayout

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.

like image 987
mmm111mmm Avatar asked Feb 22 '16 03:02

mmm111mmm


Video Answer


2 Answers

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

like image 152
ianhanniballake Avatar answered Sep 30 '22 09:09

ianhanniballake


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

like image 39
riot Avatar answered Sep 30 '22 09:09

riot