pouët.net

Detail wanking: Scrolling lists on touch screens.

category: code [glöplog]
yeah, that shows it. Actually i just experimented a little - the ipad does overscroll slightly when trying to switch past the last app, but also stretches, and has the 'bounce' animation (the oscillating type, not the standard 'bounce back and stop immediately"). I don't like that wobble, it's unnecessary and doesn't match the rest of the OS.

On OSX the same gesture works to switch between desktops (if you have a multi-touch trackpad). Swiping past the last desktop does the standard overscroll / bounce back animation - it's much better.

And now I've looked at both, the guy in that video is totally wrong :D If you look at it on OSX, it makes perfect sense: you have multiple desktops with different apps on them, some fullscreen, some not. By swiping you're just moving to the next desktop along, so a straight scroll animation is right. On the ipad, you have the same setup, but all apps are fullscreen.

The other reason it's wrong is this: you can drag the next screen on half-way, look at something, then drag back to where you were. You do that without lifting your fingers from the screen/trackpad. With the fancy animation he suggests, that's totally unnatural.
added on the 2013-06-06 11:01:31 by psonice psonice
Another thing you might want to look into. In Android's (stock) Gallery app, on thumbnail view, the tiles get some perspective when you try to go past the end of the list boundary (the list itself does an immediate stop). It's subtle but it works (for square thumbnails at least, your mileage may vary depending on what you are scrolling, but might be worth a try even for text)
added on the 2013-06-06 11:22:11 by Jcl Jcl
The effect is at 0:20 here: http://www.youtube.com/watch?v=TcwugmnQ6J4
added on the 2013-06-06 11:23:58 by Jcl Jcl
jesus, that's terrible. Not the 'tilt' effect (not sure on that - it works well and looks good, but it doesn't seem natural for the columns to tilt when pushed where they can't go).

It's just incredibly slow, unless it's running on really old hardware? Loading the thumbnails is visibly slow, loading the photo is slow, and you can see it redrawing at really low framerate when applying even the most trivial adjustments :/

The iphone gallery app doesn't do any editing as such, but there's zero noticable loading time for the thumbnail view and photo loading - they just appear. My own app has zero noticeable loading time too, and that has to convert the image data to a custom format, upload texture data, and run it through several shaders to render even the thumbnail view.
added on the 2013-06-06 11:39:10 by psonice psonice
Some random info: That's the Apple patent that Samsung has violated... it's basically talks about things mention here.
added on the 2013-06-06 11:49:49 by TLM TLM
TLM: useful... when you eventually find actual info in all that bullshit legalese ;)

Quote:
For example, the velocity vf of scrolling or translation one or more time intervals after breaking contact may be determined using
vf =vo +αΔt,
where vo is a current value of the velocity when the contact is broken, a is a current value of the acceleration when the contact is broken and Δt is an elapsed time, such as one time interval. The velocities and/or acceleration in such a calculation may be projected along an axis or direction of the scrolling or translation. In some embodiments, in subsequent time intervals following the determination of the velocity based on the acceleration and/or the velocity in one or more time intervals prior to the breaking of the contact, the velocity of the scrolling or translation may be tapered. For example, in each successive time interval the velocity may be decreased by 5%. When the velocity crosses a lower threshold, it may be set to zero.


That last part (decrease velocity by 5% in each time interval) is pretty much exactly what I arrived at:

Code:scrollVelocity *= 1. - frameDuration * 2.;


which I guess explains why it matches apple's scrolling :D

No sign of any detail of the overscroll bounce though. It mentioned it at the start, but skipping through I either missed the description, or there's no maths, which is a pity. Unless that's a different patent?
added on the 2013-06-06 12:01:12 by psonice psonice
psonice, yes, the gallery app has gone a bit downhill on Android on their latest versions (it doesn't seem to even cache the thumbnails now). It was much better on earlier versions.

There are better photo browsing apps for Android than the stock gallery though, was just portraying the perspective effect :-)
added on the 2013-06-06 12:05:41 by Jcl Jcl
yeah, it doesn't look like the thumbs are cached. Which is... pretty insane. I mean, it's not like it's something that hasn't been standard practice for years (it's been standard in windows since at least xp).

Surely the OS must be caching the thumbnails as photos are saved anyway? Otherwise every photo app would need its own thumbnail cache.
added on the 2013-06-06 12:13:28 by psonice psonice
I don't think so, I think every app does indeed use its own thumbnail cache actually (which yes, it's horrible). I personally use QuickPick which works fine, but yes, I agree having to use a different application just because the basics are not there in the stock one is pretty terrible :-)
added on the 2013-06-06 12:27:09 by Jcl Jcl
Actually, I'm happy with the situation. If the built-in stuff was any good us 3rd party app devs would be out on the street ;)
added on the 2013-06-06 12:42:58 by psonice psonice
Jcl: Meh. Hipster-coding is a disease, and tends to result in reimplementation-disaster.
added on the 2013-06-06 15:14:53 by kusma kusma
i thought hipster coding was all about iDevices (which have a mostly good* photo library handler)? But yeah, if the OS isn't managing the photo library + thumbnail cache, that's a surefire reimplementation disaster.

I know of people with iphones who have a hundred or so photography apps, and thousands of photos in the gallery. Imagine them all having their own caches. And consider how badly written a lot of them are, where the coder's decided to store raw bitmap data, possibly at 1000x1000 because that's the res the app works at and they're lazy and hey, it works, may as well just resize the once..

* iOS photo library is decent - it'll give you fast access to full res, screen-sized, and square or aspect correct thumbnail images, metadata, etc. Saving images is slower than it should be though, and there's no way to delete a photo from the library ;(
added on the 2013-06-06 15:29:27 by psonice psonice

login