Closed IacobIonut01 closed 9 months ago
I've noticed that the zoomable gesture handler is not as good as the previous solution I've used (https://github.com/usuiat/Zoomable) specially when used with lots of gesture (swipe up vertically, horizontal pager scroll etc)
Can you share a video of the issues you're seeing? It's difficult to visualize otherwise.
For Horizontal Pager even with the scroll disabled, it still conflicts with the other gesutres (swipe up)
Same question. I'm not sure what's conflicting and a video will help.
ZoomableImage(
modifier = modifier.fillMaxSize()
.combinedClickable(
interactionSource = remember { MutableInteractionSource() },
indication = null,
onDoubleClick = {},
onClick = onItemClick
),
state = state,
image = ZoomableImageSource.coil3(
model = ImageRequest.Builder(LocalPlatformContext.current)
.data(media.uri)
.placeholderMemoryCacheKey(media.toString())
.build()
),
contentScale = ContentScale.Fit,
contentDescription = media.label
)
The issue happening at 0:05
in the video looks strange. I wonder if it's happening because the image hasn't fully loaded yet. Are you using placeholder images? If so, can you add a loading indicator to verify if the gestures start working only after the image has fully loaded?
Btw, it'd be best if you can share a reproducer for me to investigate instead of going back and forth with questions. Your app looks very cool, I'd love to support it.
Here is the app with the subsampling image applied (I've also made a custom source for coil3 (alpha)
For placeholder I'm using the coil's prebuilt memory cache key to get the lower quality image that was previously loaded in a grid view
https://github.com/IacobIonut01/Gallery/tree/0c3fac0b3246f5d82fb4b77ce54d267f2ac7d701
@IacobIonut01 I haven't gotten a chance to check out your project yet, but can you try out 0.8.0-SNAPSHOT
? I made a small improvement to consume gestures immediately if multiple fingers/pointers are detected in https://github.com/saket/telephoto/commit/4c9118e1680efafc2c6b7b33319f2e281dfc7532.
Sure, but I couldn't find it on maven
You'll need to add the snapshot repository to your project for accessing snapshot versions:
maven {
url 'https://oss.sonatype.org/content/repositories/snapshots/'
}
Yeah it's better now
Glad to hear! Are there any remaining improvements you need?
Glad to hear! Are there any remaining improvements you need?
The only feature that is missing is progressive zoom (double tap 2x, another double tap 5x, another double tap max zoom for example)
Cool, tracking that in https://github.com/saket/telephoto/issues/32
I've tried your libray for subsampling in my Gallery app and I've noticed that the zoomable gesture handler is not as good as the previous solution I've used (https://github.com/usuiat/Zoomable) specially when used with lots of gesture (swipe up vertically, horizontal pager scroll etc)
Would be great if you can look into that library or allow the use of it because it would make the solution much better for Gallery/Media Viewer usescases
For Horizontal Pager even with the scroll disabled, it still conflicts with the other gesutres (swipe up)
Thanks!