react-native-image-zoom icon indicating copy to clipboard operation
react-native-image-zoom copied to clipboard

android scroll is not smoth?

Open ios-dev-newbie opened this issue 6 years ago • 12 comments

I have a flat list. Inside of that flat list I have added the image zoom view. This is working perfectly in iOS. where as in android when I tried to swipe the page to view the next image the view get stuck.

I have to do lot of swipe to actually swipe the image. I feel that in android the scroll is not smooth.

Please let me know how to add the smooth scroll to view.

ios-dev-newbie avatar Apr 03 '18 12:04 ios-dev-newbie

@ios-dev-newbie Did you find any solution for this issue ?

mohammedibrahim avatar Jun 09 '18 14:06 mohammedibrahim

I'm using Animated.View to make smooth scroll, but it seems not perfect in android. Can anyone help?

ascoders avatar Jun 10 '18 02:06 ascoders

@mohammedibrahim Sorry, I didn't get time to do research on it. But feel free to look at this solutions. https://github.com/facebook/react-native/issues/9836#issuecomment-379043158. I hope it works for you. Let me know if you find anything else.

ios-dev-newbie avatar Jun 11 '18 03:06 ios-dev-newbie

face the same problem, if anyone have solutions, please at me

yurnery avatar Jun 22 '18 07:06 yurnery

setting renderToHardwareTextureAndroid={true} on the Animated.View (here: https://github.com/ascoders/react-native-image-zoom/blob/master/src/image-zoom/image-zoom.component.tsx#L672) fixed performance on android.

tested in release mode on a low-end device.

no PR, sorry..

marconett avatar Aug 12 '18 16:08 marconett

@marconett that's great! And i just released a new version 2.2.15.

ascoders avatar Aug 13 '18 02:08 ascoders

react-native-image-zoom-viewer 2.2.15

react-native-image-pan-zoom 2.1.8

ascoders avatar Aug 13 '18 02:08 ascoders

Hi @ascoders , I am still facing this issue in Android, I have a home screen like Instagram, when I scroll down the list it works well in iOS, but in Android when I scroll the list specially, the image on which I am using your code, list does not scroll. I am using the latest version of your package "react-native-image-pan-zoom": "^2.1.11",

renderToHardwareTextureAndroid is already there in your file mentioned above by @marconett . But no help.

Please assist me.

hanishcodebrew avatar Oct 23 '18 07:10 hanishcodebrew

FYI, setting renderToHardwareTextureAndroid={true} causes Android 6 and Android 7 devices to crash. My image was 2500px by 3000px so maybe that was too much for the GPU to hold in memory in these older phones.

joshuagish avatar Jul 14 '19 19:07 joshuagish

I'm using Animated.View to make smooth scroll, but it seems not perfect in android. Can anyone help?

How did you manage to do with Animated.View

aibrahim3546 avatar Sep 20 '19 07:09 aibrahim3546

Thanks for the suggestion @marconett, but adding the prop renderToHardwareTextureAndroid={true} didn't solve the problem. Images zoom and scroll perfectly in a FlatList on IOS but when I put my fingers on the image to scroll on Android, it's not working...

Any suggestions, please?

ahmadAlMezaal avatar Jan 06 '21 16:01 ahmadAlMezaal

I'm using ImageZoom inside a FlatList and I couldn't scroll images on android but working fine on ios. Is their any suggestions please. I changed renderToHardwareTextureAndroid={true} but didnt work fine

rahmanharoon avatar Jun 21 '21 07:06 rahmanharoon