[Android] Blur not working
See original GitHub issueI have been trying to get the blur effect to work on Android for a long time now, after finally getting rid of compile and ViewGroup issues, the blur view will not blur anything.
It worked right off the bat in iOS, and continues to work. I am blurring a Google map view under a popup window of sorts. Here’s an excerpt:
<View key={id} style={styles.placeItem}>
<BlurView blurType="light" blurAmount={5} style={styles.placeItemBlur}/>
<ScrollView contentContainerStyle={styles.placeItemContainer}>
<Text style={styles.placeTitleText}>{placeProps.name}</Text>
[...]
</ScrollView>
</View>
This view is itself a child of the map view, which is a child of a scrollable tab view.
As others have suggested, I tried setting backgroundColor: 'transparent'
on the ‘thing I want to blur’ (the map, and various other views), with no effect.
Am I missing something obvious? Thanks!
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:21 (6 by maintainers)
Top Results From Across the Web
Android library Blurry not working for me,blurring effects do not ...
i want to blur the background of the relative layout but instead it blurs the whole screen.How to blur just the bckground? –...
Read more >Blur not working android · Issue #322 · Kureev/react-native-blur
Try to add some background-color to view that you need to blur. I've spent so much time to figure out why it's not...
Read more >Window blurs | Android Open Source Project
Turn window blur on and off; Troubleshooting ... Window blurs, or cross-window blurs, are used to blur the screen behind the given window....
Read more >BlurView - Expo Documentation
A React component that blurs everything underneath the view. On iOS, it renders a native blur view. On Android, it falls back to...
Read more >Expo blur view not working on android any alternative ... - Reddit
Blur on Android isn't really common, most available libs are either buggy or have performance issues. I haven't seen a good blur library ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thanks guys, thats really helpful. I was working off the readme, which doesn’t include Android usage, nor does it specify being a purely iOS demonstration… I guess I should refer to examples instead.
So are we to understand that you can only blur a single view on Android, and not everything above the blur view, as with iOS? That’s kind of a bummer.
I still can’t get my map view to blur, even after adding the appropriate props and a
viewRef
. So I don’t know if this is a limitation of the Android lib or I should try something else? Here is my updated (cross platform) call:and somewhere outside the render() stack, setting state:
Still no blur 😞
I briefly looked around for Android blur views and there are numerous others besides 500px-android-blur… maybe one of them would have features more similar to iOS blur? Android Arsenal link
The obvious thing you’re missing is that you’re using the iOS props, however Android uses different ones.
iOS
Android
I’m having trouble doing this with anything besides blurring an Image however.