Dimezis / BlurView

Dynamic iOS-like blur of underlying Views for Android
Apache License 2.0
3.48k stars 331 forks source link

Make some things public to support react-native #201

Closed stemyke closed 1 year ago

stemyke commented 1 year ago

There is a react-native-community plugin that utilizes this library to make blur effect in react-native projects. However the problem is that this lib only works properly when using child Views inside BlurView. What I want to achieve to create a custom BlurView implementation for react-native which does exactly the same as BlurView in here, but instead of extending FrameLayout it can extend from ReactViewGroup class to utilize fancy flexbox like positioning.

Dimezis commented 1 year ago

👍 I'm fine with these changes except that maven publishing

stemyke commented 1 year ago

@Dimezis Now I removed the publishing part. Can you please merge it then, and release a new version?

Dimezis commented 1 year ago

I have a question though, what's the point of introducing another BlurView based on ReactViewGroup, if you can just put ReactViewGroup into the BlurView as a child and position everything inside as you like?

stemyke commented 1 year ago

@Dimezis Thats a good question about the mentioned point (positioning), but ReactViewGroup does other things very well, for example border radiuses with custom drawables, which we could not achieve if we wrap it in the BlurView unless we implement it again in our custom view manager. Another thing to mention is that react-native uses these view managers to inject children into other ViewGroups where we dont know anything about the parent View, so we could only inject the child view in JavaScript which would make the lib more complex.

Dimezis commented 1 year ago

It should be accessible on Jitpack soon https://github.com/Dimezis/BlurView/releases/tag/version-2.0.4

stemyke commented 1 year ago

It should be accessible on Jitpack soon https://github.com/Dimezis/BlurView/releases/tag/version-2.0.4

@Dimezis Thank you very much!