Closed 000panther closed 5 years ago
O.K. I found both issues for my use case, but they are not yet ready for a pull request.
The random reset of the view was caused by the OrientationListener.onOrientationChanged event. This seems to be the wrong listener, it fires multiple times per second and returns the degrees instead of an Orientation. The correct listener seems to be the onConfigurationChanged Listener, but for my use case orientation changes do not matter so i did not yet implement this.
https://stackoverflow.com/questions/5726657/how-to-detect-orientation-change-in-layout-in-android
Additionally, In the onInterceptTouchEvent I added a try catch clause, but after the change on top, it did not seem to throw anymore.
Hey @000panther , I just had the chance to test this under Android 7.0 and Android 8.0 on the simulator and sadly I cannot simulate neither the crash nor the reset scroll. I've also added logging to the orientation change listener and I do not see it being called multiple times per second. It is fired couple of times when you rotate and then is being called when yous swipe through the images. So the event works as expected, and yes it receives the degrees which is ok.
Marking this with help wanted in case you or someone else can simulate this behavior and founds the root of it, I'm more than happy to accept PRs to fix whatever the problem is.
No further response so closing this one for now. In case you still have problems, please provide more details.
Same thing happening here on Samsung tablet with Android 7.0. It happens if you zoom in, then zoom out fast. I dont use any props but src. I am using Vue, Vue.registerElement('ImageZoom', () => require('nativescript-image-zoom').ImageZoom)
Foudn this thread https://github.com/chrisbanes/PhotoView/issues/31
When zooming into images, the image scroll does in more than half of the cases reset to 0,0. Additionally, the demo crashes after some zooming operations with this error message:
This happens in our integration, as well as in the current demo app.
Device: Nexus 6P Android Version: 8.0.0