一次猛击即可崩溃Android的CollapsingToolbarLayout

编程入门 行业动态 更新时间:2024-10-28 05:24:57
本文介绍了一次猛击即可崩溃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

本文发布于:2023-10-26 08:11:09,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1529594.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Android   CollapsingToolbarLayout

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!