一次猛击即可崩溃Android的CollapsingToolbarLayout [英] Single fling to uncollapse Android's CollapsingToolbarLayout

查看:138
本文介绍了一次猛击即可崩溃Android的CollapsingToolbarLayout的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经实现了具有视差视图的CollapsingToolbarLayout.

I have implemented a CollapsingToolbarLayout with a parallax view.

当我连续滚动向上滚动RecyclerView时,它将取消折叠CollapsingToolbarLayout.

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

但是,当我发出附加"嵌套滚动视图时,它停在嵌套滚动视图的顶部.您必须再次逃避才能取消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,

Android Studio 2.0中的ScrollingActivity模板演示了此问题.在详细视图中,克里斯·贝恩(Chris Bain)的 Cheesecake项目进行了演示.

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

但是,Google Play和Spotify均未分别在视图应用"和播放列表"视图中出现此问题.在一次浏览中,它们将滚动到嵌套滚动视图的顶部,并取消折叠工具栏.

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.

设计库元素有可能吗?

Ian注意到了此报告的错误.请加注星标,然后发布您周围可能有的任何作品.

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

推荐答案

Android支持库26.0.0-beta2修复了此问题!请参见此处. 它测试了它,并且工作正常!

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

这篇关于一次猛击即可崩溃Android的CollapsingToolbarLayout的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆