boolder-org / boolder-android

Boolder Android app https://www.boolder.com/en/app
MIT License
28 stars 12 forks source link

Show full-screen mode topo photo with pinch-to-zoom #96

Closed Novmbrain closed 6 months ago

Novmbrain commented 7 months ago

This is a preview version for resolving #21

I split #21 into three small tasks. I have implemented the two first. The core challenge I'm facing is similar to the method used for displaying the topo photo in Topoview.kt, but I'm unsure how to adapt this approach for composing the problem's elements(circle and line) on the topo photo in full-screen mode. I would greatly appreciate it if you could review my code and provide insights or suggestions on how to proceed with this task.

wang-li commented 7 months ago

Hi @Novmbrain! The lines are managed by an overlay on top on the photo of the topo. This overlay is rendered in a compose view with the ProblemStartsLayer composable at its root. Maybe, this can be taken as an inspiration for the full screen view of the boulder problem. The main challenge will be to synchronise the zoom/pan between the image and the compose layer.

I do not know well the Zoomy library, but we might have to implement the pinch-to-zoom gesture ourselves if this library does not share its gesture state through any callback or observable.

I had a look to the current state of this PR, and here is my quick feedback:

wang-li commented 6 months ago

Thanks for your contribution and your interest for the Boolder project @Novmbrain! I close this PR as it is solved by https://github.com/boolder-org/boolder-android/pull/123