[android] expo-blur upgrade to BlurView V3 #37905
Replies: 2 comments · 1 reply
-
@hannojg If the new API works well and people are happy with it we would consider to making it a default in a future version 🤔 Let me know if you want to move forward with implementation. If you don't have time for that I'll add it to my todo list 😄 |
Beta Was this translation helpful? Give feedback.
-
Hey guys, I was looking for ways to update my own BlurView library and came across this discussion. @hannojg suggested this idea of creating a I will merge the change into my library as soon as I have time, I will take the opportunity to mention this discussions there, maybe it can help you in a future implementation. Thank you! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
for android in expo-blur we use:
which recently released a new version V3. This adds new performant way for android API 12+ (API 31).
However, the API of it has changed a bit. We now need to wrap the content we want to blur with a
<BlurTarget>
view:I want to discuss if expo has any plans to change over to that new version / would accept community PRs?
There is one very important aspect to why I think this API is better: I just created a PR that fixes issues with expo-blur when using react-native-screens. The problem is that we need to provide a root from where the blur should start. And right now we pick by default the very app root.
So my improved API proposal would be to:
<BlurTarget>
component, that is optional to not break the current API<BlurTarget id="1"/> .. <BlurView targetId="1" />
<BlurTarget>
we can pick BlurTarget as rootI am not sure about how nice
<BlurTarget>
would play though with the iOS api? I think it's not needed there, right ? (haven't had time to look into it). Would that be fine to be an android only Component? We could explain that users should use that to get much better performance on Android 12+Beta Was this translation helpful? Give feedback.
All reactions