PeterStaev / nativescript-image-swipe

A NativeScript widget to easily :point_up_2: and :mag: through a list of images
Apache License 2.0
35 stars 21 forks source link

Update onOrientationChanged for Android to identify the 4 main orientations. #34

Closed socalrunner closed 5 years ago

socalrunner commented 5 years ago

I am suggesting 2 changes.

  1. preloadedImageView assignment looks like it was duplicated, I removed the duplicate.
  2. onOrientationChanged is resetting the zoomImageView every time the device is moved 1 degree in either axis. Orientation is changing by the degree, but actual orientation change should be detected more coarsely. My suggested change is to capture the actual orientation change based on 4 preset orientations, portrait, landscape, portrait-reversed, landscape-reversed and only reset the zoomImageView on those captured changes.

In the future, may we can add image rotation using this methodology.

Please let me know if you have any questions or suggestions.

Thank you!

Justin

socalrunner commented 5 years ago

Hi @PeterStaev, I hope you are doing well. I was just checking in to find out when you plan to merge this PR so that I can plan to update it on our side. Thanks again for you prompt attention.

datanotion commented 5 years ago

Hey there! Yeah I'm interested in this too - it affecting us as well. Thank you both for your help!

PeterStaev commented 5 years ago

I will try to merge it sometime this week.

datanotion commented 5 years ago

Awesome, thanks!

PeterStaev commented 5 years ago

New version is now on NPM. Thank you for your contribution!

socalrunner commented 5 years ago

My pleasure. Thank you for pushing it out so quickly!

On Tue, Feb 26, 2019 at 2:35 PM Peter Staev notifications@github.com wrote:

New version is now on NPM. Thank you for your contribution!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/PeterStaev/nativescript-image-swipe/pull/34#issuecomment-467642941, or mute the thread https://github.com/notifications/unsubscribe-auth/AoU5-FEdVCBgXXTnIWcQ94_EBilgZsneks5vRba_gaJpZM4bGBEv .