Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Wrong activity background blurring effect

See original GitHub issue

Please include:

  1. Library version: version-2.0.0
  2. Device and OS version: all API versions, tested on API 23 and 30
  3. Detailed steps to reproduce the issue
  • Added a new transparent fragment
  • Added a android:windowBackground attr
  • Checkout the blurring effect on topBlurView on transparent fragment
  1. XML layout and code for BlurView setup: Reproduce commit here

  2. Stacktrace in case of a crash: None

Expected: set android:background="@drawable/lines" in activity_main.xml could produce an expected result

Actual: using <item name="android:windowBackground">@drawable/lines</item> in AppTheme and .setFrameClearDrawable(windowBackground) set in MainActivity does not work properly.

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

Dimeziscommented, May 17, 2022

I tried to apply using getWindow().getDecorView() but it does not work.

Can you post a commit with this change? It works fine for me on your branch

Dimeziscommented, May 17, 2022

Apparently, there’s some weird bug with android:windowBackground as an image (BitmapDrawable). I’ll see what I can do about it, but be aware that even regardless of this bug, your Expected result is probably impossible with setFrameClearDrawable, because the drawable doesn’t have a trackable position on the screen.

That means, that even if I fix the bug, the bottom BlurView won’t be able to properly blur the bottom of this drawable.

To fix this, you can either pass the (ViewGroup) getWindow().getDecorView() as a rootView, or set the background in activity_main.xml as you did.

Read more comments on GitHub >

github_iconTop Results From Across the Web

blurry background of activity, without knowing what avtivity is ...
i want it's background to be blurry, so whatever activity should open after mine, would be blurry. But i can't know what activity...
Read more >
Free Online Blur Background: Blur Image with Fotor
Blurring the background of a photo to highlight the photo's subject and add depth of field. Use our different blur effects to get...
Read more >
How To Create a Blurred Background Image - W3Schools
How To Create a Blurry Background Image. Step 1) Add HTML: Example. <div class="bg-image"> ...
Read more >
Work with blur effects in XD - Adobe Support
Create a blur mask to blur anything visible underneath; Add background blur effect to selected objects to blur the entire object.
Read more >
Auto blur: blur background - Apps on Google Play
Auto blur background is fast and easy to use app to create amazing blur background effect pictures. --Features--- - Smart focus area selection...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found