The AdvancedRecyclerView Library is incredible. It has support for so many niceties, it’s almost indispensable. Unfortunately, documentation is sparse.
I wrote a quick demo for the draggable and swipable functions of the library that may be perused below. I plan to add support for the expandable items in the future. So, if you happen to need some documentation for the library, click the link below.
Android’s SwipeRefreshLayout is pretty useful for internet based apps that need to notify a user when a pull to refresh action has occurred. However, if you have a complex view hierarchy that uses a FrameLayout to draw certain items over another, say for example a contextual toolbar, the circular ProgressBar drawn by the SwipeRefreshLayout is obscured and hidden from the user.
A way to fix this is to create a class that extends the SwipeRefreshLayout, and Override the OnTouchEvent. Once overridden, call on the superclass to make sure the widget performs as intended, keep the boolean it returns in a local variable, and handle the motion events which will in turn fire off an interface callback when certain conditions are met.
It’s not complicated when presented in code form. The extended class is shown in it’s entirety below
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters