Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Very sensitive swiping in portrait mode #22

Open
eNBeWe opened this issue Dec 18, 2017 · 18 comments
Open

Very sensitive swiping in portrait mode #22

eNBeWe opened this issue Dec 18, 2017 · 18 comments
Labels
Help wanted You are invited to help. Please annouce it as a comment on the issue. Needs device Can only reproduced on a specific device. Schedule grid The tabular Fahrplan screen with all session. Scrolling UI interaction in list and grid views UX User experience, accessibility, screen readers, touch feedback, ...

Comments

@eNBeWe
Copy link

eNBeWe commented Dec 18, 2017

When using the app in portrait orientation the swiping gesture to move to the next/previous room is very slow. This leads to usually swiping too fast and switching all the way to the first/last room.

System:
Nexus 5X
LineageOS 14.1, Android 7.1.2

Version:
1.33.0

@johnjohndoe johnjohndoe added the UX User experience, accessibility, screen readers, touch feedback, ... label Dec 18, 2017
@Noxmiles
Copy link

Yes, this is a Problem. If you don't know it, it seems Like there are only 2 rooms.

@johnjohndoe
Copy link
Member

Thank you for reporting the issue. At the moment I cannot reproduce it - the problem does not occur on the device (Nexus 5, Android 6.0.1) I am using. I would love to try adjusting the SWIPE_MIN_DISTANCE and SWIPE_THRESHOLD_VELOCITY - but I cannot do that without the device. If you can compile the app yourself and try different values I would be interested in the values you come up with. The relevant constants can be found in HorizontalSnapScrollView.java.
Other then that I can offer that we met at 34C3 and try it out together.

@johnjohndoe johnjohndoe added the Needs device Can only reproduced on a specific device. label Dec 23, 2017
@eNBeWe
Copy link
Author

eNBeWe commented Dec 28, 2017

I didn't find direct contact Info for you @johnjohndoe You can reach me at DECT 2311, so we can have a look together.

@johnjohndoe
Copy link
Member

Can we meet around 17:30 at c-base assembly? I will try to call you.

@eNBeWe
Copy link
Author

eNBeWe commented Dec 28, 2017

A follow-up after our recent analysis: What do you think about splitting the function of the two constants:
Velocity: Select between fling or touch logic
Distance: Number of swiped columns if flinging
?

I would see if I can get a toolchain running and try that out if you like the idea.

@johnjohndoe
Copy link
Member

Sounds reasonable to investigate. I would certainly clean up the code before (variable names, formatting).

@johnjohndoe
Copy link
Member

johnjohndoe commented Dec 28, 2017

@eNBeWe I did a basic cleanup of the code in HorizontalSnapScrollView here - it would be nice if you could review it. Feel free to comment - the code changes are not final. Please have a look at the commits one by one since it makes it much more easy to consume them.

@johnjohndoe
Copy link
Member

johnjohndoe commented Jan 11, 2018

@eNBeWe Can you please specify above the Android version you are running on your Nexus 5X?
I tried multiple devices but could not reproduce the swiping behavior except for with your Nexus 5x and a Pixel 2 and @Noxmiles' Moto Z Play.

Swipes one column

  • Samsung S8, SM-G950F, Android 7.0: 1440 x 2960 pixels, 18.5:9 ratio (~570 ppi density)
  • Samsung S7, SM-G930F, Android 7.0: 1440 x 2560 pixels, 16:9 ratio (~577 ppi density)
  • Nexus 6, Android 5.1.1: 1440 x 2560 pixels, 16:9 ratio (~493 ppi density)
  • Nexus 5, Android 6.0.1: 1080 x 1920 pixels, 16:9 ratio (~445 ppi density)

Swipes multiple columns

  • Pixel 2, Android 8.1.0: 1080 x 1920 pixels, 16:9 ratio (~441 ppi density)
  • Nexus 5x, Android 7.1.2: 1080 x 1920 pixels, 16:9 ratio (~423 ppi density)
  • Moto Z Play, Android 7.1.1: 1080 x 1920 pixels, 16:9 ratio (~403 ppi density)

It might not just depend on the resolution/density of the display but also on the Android version..

@eNBeWe
Copy link
Author

eNBeWe commented Jan 11, 2018

I am using LineageOS 14.1, resulting in Android 7.1.2

@johnjohndoe
Copy link
Member

@Noxmiles Can you please post the specs of your device?

@johnjohndoe
Copy link
Member

... I did a basic cleanup of the code in HorizontalSnapScrollView ...

The cleanup branch has been merged here: 6753a52

@Noxmiles
Copy link

@johnjohndoe Moto Z Play. Android 7.1.1. 1920 x 1080 @ 5,5" 16:9 (~400ppi). I could make a video of the problem if you want.

@johnjohndoe
Copy link
Member

johnjohndoe commented Jan 21, 2018

@Noxmiles Thank you. The video is not needed since I can in general reproduce the behavior. I just have no access to the relevant devices myself. I update the list above to include your device.

@johnjohndoe johnjohndoe added the Help wanted You are invited to help. Please annouce it as a comment on the issue. label Jul 2, 2018
@johnjohndoe
Copy link
Member

Maybe of interest: What's New in ConstraintLayout mentions that with MotionLayout it is possible to track "your velocity of your finger and matches the velocity of the object you tag to it".

@johnjohndoe johnjohndoe added the Schedule grid The tabular Fahrplan screen with all session. label Dec 10, 2021
@johnjohndoe johnjohndoe added the Scrolling UI interaction in list and grid views label Apr 18, 2022
@isiko
Copy link
Contributor

isiko commented Apr 22, 2022

screen-20220423-004047.2.mp4

Here's a GIF of the Behavior I mentioned in #479. You can see that I'm flinging to the left, but after watching the GIF a few times, I think it is actually overshooting and then moving back.

A possible solution to this would be to switch from calculating the target column when starting the fling, to just snapping to the next column when the velocity is lower than a certain value, although I wouldn't know how to integrate that with the Android API.

@johnjohndoe
Copy link
Member

@isiko It is very hard to see when the overshot happens because the GIF replays all the time. Could you instead upload a video (which stops automatically or can be stopped)?

@isiko
Copy link
Contributor

isiko commented Apr 23, 2022

@isiko It is very hard to see when the overshot happens because the GIF replays all the time. Could you instead upload a video (which stops automatically or can be stopped)?

Updated the Video 👍

@johnjohndoe
Copy link
Member

Thank you. - I downloaded the video to playback frame by frame. What I see is:

  1. Scrolls fast rightwards to room "Stage" which is the ~32. column
  2. Scrolls leftwards to room "Eliza" which is the 5. column (4 columns have been scrolled in effect)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Help wanted You are invited to help. Please annouce it as a comment on the issue. Needs device Can only reproduced on a specific device. Schedule grid The tabular Fahrplan screen with all session. Scrolling UI interaction in list and grid views UX User experience, accessibility, screen readers, touch feedback, ...
Development

No branches or pull requests

4 participants