我刚刚更新到新的支持库版本 24.2.0,并在 CollapsingToolbarLayout
中遇到以下视差图像问题:
它在 24.1.1
上的样子
它现在在 24.2.0
上的样子
这个例子来自Cheesesquare除了支持库版本外,我没有修改的演示应用程序。 This是相关的布局文件。
看起来图像不再正确覆盖 CollapsingToolbarLayout
。
有人知道是什么原因造成的和/或如何解决吗?
编辑
自 24.2.1 起已修复。
最佳答案
它看起来像一个错误,已经被报告了https://code.google.com/p/android/issues/detail?id=220389
已编辑
根据 Chris Banes 的帖子
The issue is that the ImageView is receiving the standard View#fitSystemWindows padding. You can set the following on the ImageView for a quick workaround:
ViewCompat.setOnApplyWindowInsetsListener(this, OnApplyWindowInsetsListener() {
@Override
public WindowInsetsCompat onApplyWindowInsets(View v,
WindowInsetsCompat insets {
return insets.consumeSystemWindowInsets();
}
});
关于android - 视差图像在支持库 24.2.0 上未正确显示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39005778/