Git Product home page Git Product logo

Comments (18)

johnjohndoe avatar johnjohndoe commented on June 20, 2024 1

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)

from eventfahrplan.

Noxmiles avatar Noxmiles commented on June 20, 2024

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

from eventfahrplan.

johnjohndoe avatar johnjohndoe commented on June 20, 2024

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.

from eventfahrplan.

eNBeWe avatar eNBeWe commented on June 20, 2024

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

from eventfahrplan.

johnjohndoe avatar johnjohndoe commented on June 20, 2024

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

from eventfahrplan.

eNBeWe avatar eNBeWe commented on June 20, 2024

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.

from eventfahrplan.

johnjohndoe avatar johnjohndoe commented on June 20, 2024

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

from eventfahrplan.

johnjohndoe avatar johnjohndoe commented on June 20, 2024

@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.

from eventfahrplan.

johnjohndoe avatar johnjohndoe commented on June 20, 2024

@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..

from eventfahrplan.

eNBeWe avatar eNBeWe commented on June 20, 2024

I am using LineageOS 14.1, resulting in Android 7.1.2

from eventfahrplan.

johnjohndoe avatar johnjohndoe commented on June 20, 2024

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

from eventfahrplan.

johnjohndoe avatar johnjohndoe commented on June 20, 2024

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

The cleanup branch has been merged here: 6753a52

from eventfahrplan.

Noxmiles avatar Noxmiles commented on June 20, 2024

@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.

from eventfahrplan.

johnjohndoe avatar johnjohndoe commented on June 20, 2024

@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.

from eventfahrplan.

johnjohndoe avatar johnjohndoe commented on June 20, 2024

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".

from eventfahrplan.

isiko avatar isiko commented on June 20, 2024
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.

from eventfahrplan.

johnjohndoe avatar johnjohndoe commented on June 20, 2024

@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)?

from eventfahrplan.

isiko avatar isiko commented on June 20, 2024

@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 πŸ‘

from eventfahrplan.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.