https://kotlinlang.org logo
#compose
Title
# compose
c

Chachako

05/02/2022, 8:18 PM
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

andrew

05/02/2022, 10:45 PM
I'm not sure where to start looking, but I'd love to see this in androidx upstream 😍😍
c

Chachako

05/03/2022, 5:08 AM
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

Colton Idle

05/03/2022, 6:48 AM
If you can somehow make this a modifier and a library I think it'd be a big hit!
c

Chachako

05/03/2022, 6:54 AM
Yeah, it will be a library, but first I think I need to get rid of some annoying bugs 😫
c

Colton Idle

05/03/2022, 6:55 AM
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

Chachako

05/03/2022, 6:57 AM
Interesting! maybe I’ll upload it to github today, but first I need to think of a name for the library 😁
c

Colton Idle

05/03/2022, 6:23 PM
Library naming is probably harder than creating the library itself. 😂 Good luck. Let me know.
😆 2
👌 1
a

andrew

05/03/2022, 6:25 PM
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

Chachako

05/05/2022, 8:03 PM
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

andrew

05/05/2022, 8:03 PM
Awesome sauce!
1
3 Views