facebook/fresco

Issue with status bar transparent

Open

#2,254 opened on Dec 7, 2018

View on GitHub
 (3 comments) (0 reactions) (0 assignees)Java (3,750 forks)batch import
good first issuehelp wantedstarter-task

Repository metrics

Stars
 (17,072 stars)
PR merge metrics
 (No merged PRs in 30d)

Description

Description

When the status bar is transparent, Fresco doesn't draw the image underneath it

Reproduction

Just run: https://github.com/omainegra/furry-octo-potato As an extra, you can toggle the commented code and see how it works with a regular ImageView

Issue

device-2018-12-10-101329

Expected

device-2018-12-10-101359

Update

After playing with it I found that redrawing after ViewCompat.setOnApplyWindowInsetsListener fixes the problem.

ViewCompat.setOnApplyWindowInsetsListener(findViewById<SimpleDraweeView>(R.id.draweeView)) { view, insetsCompat ->
    view.requestLayout()
    insetsCompat
} 

Additional Information

  • Fresco version: 1.11.0
  • Platform version: [{ Nexus 6P, Android 8.1 }, { Pixel 3, Android 9 }]

Contributor guide