react-native-blur icon indicating copy to clipboard operation
react-native-blur copied to clipboard

Strange blur on Android platform

Open kvlknctk opened this issue 2 years ago • 5 comments

I'm having a strange issue for Android although no issues for iOS. While Blur should process the image below it, it does the same for the View above it, and this creates an ugly image.

Android: Ekran Resmi 2022-08-29 22 50 28

iOS Ekran Resmi 2022-08-29 23 13 10

I couldn't understand why Android created such a problem. I've read the document over and over, but can't find any clues.

kvlknctk avatar Aug 29 '22 20:08 kvlknctk

plus one for this

taras-doloshytskyi avatar Sep 01 '22 18:09 taras-doloshytskyi

You can wrap BlurView as a parent for all views that you don't want to have blur. Like this:

<BlurView>
{Views that you don't want to have that blur}
</BlurView>

adembacajmemmo avatar Sep 07 '22 12:09 adembacajmemmo

You can wrap BlurView as a parent for all views that you don't want to have blur. Like this:

<BlurView>
{Views that you don't want to have that blur}
</BlurView>

The strange blur appears if I put BlurView style as absolute like below:

<View>
   {View that you don't want to blur}
   <BlurView style={StyleSheet.absoluteFill}/>

   {Views that you want to have that blur}
</View>

SaphiraNgocThuy avatar Nov 04 '22 04:11 SaphiraNgocThuy

take a look at my solution: https://gist.github.com/dutradotdev/50c82763fc621ab3c1bd5ba02180ce0d

dutradotdev avatar Feb 09 '23 22:02 dutradotdev

@dutradotdev as I understand correctly, your solution introduces a web view, which his not ideal imho.

@SaphiraNgocThuy Weird, my experience is the exact opposite of yours! Your comment brought me on the idea to absolute-fill a separate BlurView inside of a regular View and it fixed the problem 🤔

JasperH8g avatar May 03 '23 10:05 JasperH8g