Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dragging gesture is consumed when used in scrollable composable #818

Open
haluzpav opened this issue Feb 23, 2022 · 5 comments
Open

Dragging gesture is consumed when used in scrollable composable #818

haluzpav opened this issue Feb 23, 2022 · 5 comments

Comments

@haluzpav
Copy link

🐛 Bug Report

When the PhotoView is used in a scrollable composable, the PhotoView and Compose don't communicate the dragging events properly, and so the composable doesn't scroll as it should. When dragging some other part of the composable, scrolling works.

TBH, this sounds like a Compose issue, so I also made a ticket for them: https://issuetracker.google.com/issues/220919265

Expected behavior

When dragging on PhotoView which is in scrollable composable, the composable can be scrolled.

Reproduction steps

You can checkout this minimal repo.

The problem lies in this:

Column(modifier = Modifier.verticalScroll(...)) {
     AndroidView(factory = { context -> PhotoView(context) })
}

Also, a video. The problematic Compose behavior starts at 0:16. Before that, you can see the expected behavior in Views.

device-2022-02-23-184007.mp4

Configuration

Version: 2.3.0

Platform: 🤖 Android 11

@Hessam-Emami
Copy link

I've exactly got the same problem

@Hessam-Emami
Copy link

@haluzpav have you found a workaround for this? or maybe other libraries that work better with compose?

@haluzpav
Copy link
Author

haluzpav commented Apr 7, 2022

@Hessam-Emami nope, but TBH I did not try very much. I just don't use Compose in the Activity where I need the PhotoView. 🤷‍♂️

@minas1
Copy link

minas1 commented Oct 20, 2022

Please fix this issue!

@haluzpav
Copy link
Author

haluzpav commented Jun 6, 2023

Since this doesn't get any attention and probably never will, I'll mention that there's now Compose implementation of basically the same thing to PhotoView - https://saket.github.io/telephoto/. It has no scrolling issues, even when used inside of scrolling Views.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants