You can now get the FAB behavior shown in this post as a library. Go to the project on github to see the source, read the gradle instructions or file an issue. Comments are also well-liked on reddit or Google+!
There are already enhancements in place over the code as shown originally:
No more performance penalty when using the behavior
Behavior corrects snackbar handling, so both play well together now
Near future plan is to include proper handling of AppBarLayouts that do not collapse completely.
Edit: The code from this post became a library and got significant enhancements. It’s open source, so just look it up on github for the source code and instructions on using it as a gradle dependency.
Picture a list view, with a Floating Action Button (FAB) sitting on it, like this:
The FAB needs to be able to move out of the way, so that all parts of all list items are actually reachable. Also, it is good form in this situation to have the app bar scroll out of the way, to maximise the viewport area dedicated to the list. There’s a well-knownready-madesolution for this; it looks like this
and has two disadvantages:
it does not visually sync up well with the leaving app bar - in contrast to the scrolling AppBarLayout, the animation is not linked to the actual scrolled distance, and to me, the hiding animation is distracting while I, as a user, am focused on scrolling the list
it does not sync up with the leaving app bar by implementation - this solution does its listening on nested scroll events and subsequent processing on its own. Together with the snapping behavior of the AppBarLayout, this can lead to states where the app bar is expanded, but the FAB hidden. This does not bode well for confused users having no idea where the FAB has gone.
Here’s how to get the FAB to move in sync with the app bar.
QuickFit now features a beautiful wide layout, for use on tablets in landscape mode. See:
A post or two on how to implement this fabulous FAB behavior is to follow.
This release also fixes a bug; scheduled activities do now really get cleared by clicking on the notification and will not reappear together with the next alert.
Taking screenshots for the play store is boring as hell: several locales, three form factors, setting up content data for the screenshots, possibly varying by locale… For the last release of QuickFit, I decided to automate.
What you get in this post
a complete step-by-step description
in a real project
how to automate taking play store screenshots
and simultanously increase your test coverage (or get started with some UI tests at all!)
And because UI tests are needed and a happy byproduct of the process, it comes with