RubenGees RubenGees - 1 year ago 92
Android Question

Parallax image is not displayed properly on support lib 24.2.0

I just updated to the new support lib version 24.2.0 and experienced the following problem with parallax images in a



How it looked like on


How it now looks like on

This examples are from the Cheesesquare demo app which I did not modify apart from the support lib version. This is the relevant layout file.

It looks like the image is not properly overlaying the

Does anybody know what is causing this and/or how to fix it?

Answer Source

It looks like a bug and it was already reported


According to Chris Banes 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() {
    public WindowInsetsCompat onApplyWindowInsets(View v,
            WindowInsetsCompat insets {
        return insets.consumeSystemWindowInsets();
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download