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

[ANDROID] Blur applies to View only when it has backgroundColor

Open aleksandr-senichev opened this issue 9 years ago • 7 comments

<View 
     styles={{backgroundColor: 'transparent'}}
     ref={(item) => this.renderItem = findNodeHandle(item)}
>
     <Text>Blurring..</Text>
</View>
 <BlurView 
      style={styles.absolute}
      blurType="dark"
      blurAmount={5}
      viewRef={this.renderItem}
    />

This works, but if backgroundColor is missing on View it doesn't work.

aleksandr-senichev avatar Jun 28 '17 22:06 aleksandr-senichev

what version are u using? because i'm receiving this warning and not blurring nothing, (in ios works like a charm)

captura de pantalla 2017-07-06 a la s 16 09 09

ref={ref=>this.blurView = findNodeHandle(ref)}

cinder92 avatar Jul 06 '17 21:07 cinder92

@cinder92 Your blurring layout can't be parent for blurview and it should has background color like I said before.

"react-native": "0.44.0", "react-native-blur": "^3.0.0",

aleksandr-senichev avatar Jul 07 '17 09:07 aleksandr-senichev

@listatt ,

I'm trying to blur a view on Android, but what I've got is a semi-transparent background.

Here is my source code:

image

And this is result:

image

I tested with latest version and version 3.0.0 as you suggested above.

Any thought?

Thank you.

cuongtructran avatar Jul 09 '17 18:07 cuongtructran

@cuongtructran can u provide ur full code ? i am trying to blur a view but seem that it doesn't work, it only blur when there is an image

googl3r avatar Aug 21 '17 13:08 googl3r

Having the same issue as @cuongtructran. Could someone tell what is the deal with it please?

oleksandr-korin avatar Oct 06 '17 16:10 oleksandr-korin

@cuongtructran @oleksandr-korin I fixed the same issue by changing the background-color of BlurView from its default transparent to my app's background-color. (In my case to black).

evedal avatar Oct 14 '17 14:10 evedal

I also have same issue. react-native-blur blurs the view only when the view being blurred has a particular background color other than 'transparent'. In case of transparent background color, it gives effect like decreasing the opacity of the view, not blurs the view.

ajaykumar97 avatar Jun 06 '18 05:06 ajaykumar97