我在 AppBarLayout 中使用了 CollapsingToolbarLayout,用户可以使用 AppBarLayout 中的 setExpanded(boolean)
方法展开或折叠它。
问题是动画很慢而且不流畅。
我一直在搜索,似乎支持设计库有问题(请阅读 question )。但是我无法降级我的支持设计库,因为我正在使用 BottomSheetBehavior
并且我收到以下错误:
Error:(88) No resource identifier found for attribute 'behavior_hideable' in package...
Error:(88) No resource identifier found for attribute 'behavior_peekHeight' in package...
有什么提高 setExpand 速度的建议吗?
最佳答案
使用 appBarLayout.setExpanded(true,true);
而不是 setExpanded(boolean)
并且展开将是动画的
关于android - AppBarLayout setExpanded速度慢,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37889577/