视差图像在支持库 24.2.0 上未正确显示

Parallax image is not displayed properly on support lib 24.2.0

我刚刚更新到新的支持库版本 24.2.0,在 CollapsingToolbarLayout 中遇到了以下视差图像问题:

24.1.1

上的样子

它现在在 24.2.0

上的样子

这个例子来自Cheesesquare demo app which I did not modify apart from the support lib version. This是相关的布局文件。

看起来图像没有正确覆盖 CollapsingToolbarLayout

有人知道是什么原因造成的吗and/or如何解决?

编辑

自 24.2.1 起已修复。

它看起来像是一个错误,并且已经被报告了 https://code.google.com/p/android/issues/detail?id=220389

已编辑

根据克里斯·贝恩斯 post

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();
    }
});