I have noticed that on some devices the counter-orientation-direction operations does not work.
After short debugging I have noticed that dx and dy are equal to 0 at the beginning of dragging on these devices and therefore it's not triggering the Math.abs(dx) > Math.abs(dy) condition. In order to fix this issue I have added zero check on dx and dy.
Tested on Samsung Galaxy S8, Samsung Galaxy S20+, Samsung Galaxy A6, Sony Xperia Z2, Huawei P40 Lite and Google Pixel 4. Problem occured only on last two of them. Now it works good on all these devices.
I have noticed that on some devices the counter-orientation-direction operations does not work. After short debugging I have noticed that
dx
anddy
are equal to 0 at the beginning of dragging on these devices and therefore it's not triggering theMath.abs(dx) > Math.abs(dy)
condition. In order to fix this issue I have added zero check ondx
anddy
.Tested on Samsung Galaxy S8, Samsung Galaxy S20+, Samsung Galaxy A6, Sony Xperia Z2, Huawei P40 Lite and Google Pixel 4. Problem occured only on last two of them. Now it works good on all these devices.