I am implementing a low version of the real-time b...
# compose
c
I am implementing a low version of the real-time blur effect and it works well in most cases? But currently, I’m having problems with the coordinates on the
Pager
, as shown in the video, when a page is moved to the edge of the screen the image cuts out, after troubleshooting this seems to be caused by
onGloballyPositioned
returning the coordinates of a second pager...
👍 1
👏 1
😯 2
Left & right coordinate changes: • Initial left, right:
175, 1265
• To the left edge:
0, 1089
• First-page overflows to left and second-page shows:
1439, 1440
This is confusing me, how should I make
onGloballyPositioned
return only the coordinates of its own page? This is probably the biggest bug at the moment, there are a few minor bugs, once they are solved this should complement the missing blur library in the compose ecology, so any help would be appreciated! cheers
a
I'm not sure where to start looking, but I'd love to see this in androidx upstream 😍😍
c
I think so too, but unfortunately the Compose team doesn't seem to want to adapt to the lower versions 😔, there is a ticket left over: https://issuetracker.google.com/issues/166927547
c
If you can somehow make this a modifier and a library I think it'd be a big hit!
c
Yeah, it will be a library, but first I think I need to get rid of some annoying bugs 😫
c
Good luck. I'm more than happy to try it out if you have a gist or something. 😄 I'm also willing to become a contributor on github if you get this going. This would solve a lot of design issues for my team. 😅
c
Interesting! maybe I’ll upload it to github today, but first I need to think of a name for the library 😁
c
Library naming is probably harder than creating the library itself. 😂 Good luck. Let me know.
😆 2
👌 1
a
Keep it simple, call it something compose-blur or something of the sort
🙌 2
Easy for discovery when people are searching for something like this
And in terms of upstreaming, if it's performant enough, I'd hope it could be a possibility
I think that was the main reasoning from what I gather
Any luck getting a gh link up?
💯 1
☝️ 2
1
c
Coming soon, after cleaning up the code I’ll upload it, unfortunately it still has many issues left to fix 😔 I’ll paste the link here once it’s uploaded
a
Awesome sauce!
1