natario1 / ZoomLayout

2D zoom and pan behavior for View hierarchies, images, video streams, and much more, written in Kotlin for Android.
https://natario1.github.io/ZoomLayout
Apache License 2.0
1.03k stars 148 forks source link

Jetpack Compose Support ? #208

Open wakaztahir opened 2 years ago

wakaztahir commented 2 years ago

Problem to be addressed

Since jetpack compose is now stable , I was wondering if zoom layout will support jetpack compose Since jetpack compose supports interoperability , compose offers easy access to the motion event There are other libraries but zoom layout supports many features and I am sure zoom engine could be easily integrated with jetpack compose

Describe the solution you'd like

An extension library or compose version or maybe a simple composable modifier or composable that uses zoom engine to provide zoom layout features to Composables

Additional context

There are other libraries but since so much functionality has already been implemented in zoom engine , it could offer a better solution to zoom problems

markusressel commented 2 years ago

I don't have much experience with compose (yet), but I don't see why we couldn't support this. If you are interested in coming up with a proposal I would be happy to review and make suggestions.

wakaztahir commented 2 years ago

I'll try but I am not good at library creation

markusressel commented 1 year ago

Since I wanted to recreate my KodeEditor pet project in compose, I had to come up with a solution to this myself. While I have not used the ZoomEngine, I did create a composable (with the ZoomLayout name) here:

https://github.com/markusressel/KodeEditor/pull/48/files#diff-e81ecc609625566ec53d936054354ed0da07d1eed4cf3e2ce5097a0b43a13325

Maybe we can use this as a starting point to integrate the ZoomApi?

wakaztahir commented 1 year ago

I have created a code editor in jetpack compose https://github.com/Qawaz/compose-code-editor

Jetpack compose has still this issue https://issuetracker.google.com/issues/135556699 blocking multiline styling

I think Jetpack compose could use the mature zoom engine