-
Notifications
You must be signed in to change notification settings - Fork 553
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
com.fivehundredpx.android.blur.BlurringView cannot be cast to android.view.ViewGroup #99
Comments
Also having this issue |
same here |
+1 rn 0.37, Nexus 6 |
+1 |
+1 :-( |
You're going to have to make the BlurView not have any children and absolutely position its sibling ontop of it :-/ |
+1 do it youself.... change it to extends viewgroup |
can you take a look, @cmcewen ? |
could anyone with this problem post some sample code? |
I had the problem when I embedded child views inside a BlurView. After removing the children the problem was gone. <BlurView>
<View ... />
<View ... />
</BlurView> |
anyone find workaround for this issue? |
I guess, as @IjzerenHein mentioned above, this issue is because |
@connected-mgosbee I did what you asked, like so:
... basically, removed children from Although I don't get the error, I don't see any blurring effect either. Any explanations, or am I doing it the wrong way? |
Well, <View style={{ flex: 1 }}>
<Image style={{ position: 'absolute', top: 150, width: 100, height: 100 }} source={{ uri }} />
<BlurView blurType="light" blurAmount={10} style={{ width: 200, height: 200 }} />
</View> This looks like what you want, @anubhav756 |
@Kureev Yep, tried that, but it didn't work. However, it DID worked for me when I passed |
Oh, sorry, idk why I wrote my last comment. It's completely wrong. const { BlurView } = require('react-native-blur');
const Menu = React.createClass({
render() {
return (
<Image source={{uri}} style={styles.menu}>
<BlurView blurType="light" blurAmount={10} style={styles.blur}>
<Text>Hi, I am a tiny menu item</Text>
</BlurView>
</Image>
);
}
}); |
Hopefully this should be a native prop and not a UI prop — text color animates after I call `addWhitelistedNativeProps({ color: true })` Closes Kureev#99
Hi, I have the same problem with Android, registering the library on MainApplication causes an exception to be thrown
java.lang.ClassCastException: com.fivehundredpx.android.blur.BlurringView cannot be cast to android.view.ViewGroup
Therefore on iOS it works
tested on rn 0.34, Nexus 5
The text was updated successfully, but these errors were encountered: