I was browsing internet some time ago and saved this
gif comparison of major sorting algorithms against each other and it really gives you a good grasp on their speed.
Here are some stats that I picked out from looking at this:
|Best All Around:
|Worst All Around:
I think “Few Unique” is in random order, but I am not sure. Anyways, I thought this was interesting and is definitely easier than memorizing Big(O) notation. Let me know if I made a mistake.
First, this is not a full comprehensive in-depth guide for the
SmoothScroller, but I hope this gives you a jumpstart on where you can begin customizing because I could not find any clear tutorials on this topic.
What is a
SmoothScroller you ask? A
SmoothScroller is exactly as it seems. It’s a
Class that helps a
View scroll to an item’s position smoothly to create a seamless transition as opposed to snapping to it abruptly. In this example I will be using its child
LinearSmoothScroller with the
We all know that to initialize a
RecylerView we need to set a
LayoutManager like so:
or else an error will occur during run-time. Well, the
LayoutManager is in charge of the smooth scrolling! Therefore, in order to customize the
SmoothScroller we need to create our own custom
Edit: Here a more accurate list provided by Google: https://design.google.com/devices/
When I was developing with the Genymotion emulator, I had trouble getting a sense of how big the actual devices actually were when choosing resolution size for debugging. So I did a little test to see what their smallest width was in
dp for each resolution.
dp is a density-independent pixel that corresponds to the physical size of a pixel at 160 dpi.
Now if I want to test out a resolution, I can just look at this chart and see it’s physical size.
I’ve also added annotations for which devices are small, not long, and long, because I feel those devices are the gotchas and need their own
dimens.xml file to make them look good.