React-native-blur: Blur a view

Created on 11 Jun 2017  路  10Comments  路  Source: Kureev/react-native-blur

Hi, I am trying to blur a view, it works on iOS but on android it doesn't work, is it possible to blur any view ?
here is my code

`

          <View style = {MainStyle.footer}>
                <TouchableHighlight style={MainStyle.bottomButtons}>
                    <Text style={MainStyle.footerText}>Accueil</Text>
                </TouchableHighlight>
                <TouchableHighlight style={MainStyle.bottomButtons}>
                    <Text style={MainStyle.footerText}>Livraison</Text>
                </TouchableHighlight>
                <TouchableHighlight style={MainStyle.bottomButtons}>
                    <Text style={MainStyle.footerText}>Mon Compte</Text>
                </TouchableHighlight>
            </View>
            <BlurView
                blurType = "light"
                blurAmount={7}
                viewRef = {this.state.viewRef}
                style={[MainStyle.blurView]} />
            <View style = {MainStyle.footerView}  >

`

Most helpful comment

until now the blur effect doesn't work on a view it works just on image

All 10 comments

Not sure if I see an assignment of viewRef here. You should store a ref the view you want to blur in this.state.viewRef in order this code to work:

<View ref={ref => this.setState({ viewRef: ref })} style={MainStyle.footer}>
  //...
</View>

@googl3r did found a solution?

@cinder92 no always have the same problem, @Kureev solution doesn't work

you are right its work on ios but no on android, this need to be fixed... somehow...

It works for image but not for a view, it's just a semi-transparent effect not blur effect.

@cinder92 Were you able to test the blur effect on a physical iOS device? I've found it work on the simulator, but the blur appears as an opaque black box on the device build.

until now the blur effect doesn't work on a view it works just on image

on ios it works perfect on View as well but not on Android

@googl3r Wouldn't that be mentioned in the limitations if that were the case?

Has anyone been able to blur Views on Android?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

myjbuilddream picture myjbuilddream  路  6Comments

brumm picture brumm  路  7Comments

schlaegerz picture schlaegerz  路  4Comments

minuitagency picture minuitagency  路  5Comments

leonskim picture leonskim  路  5Comments