AutoSkeleton
Yet Another skeleton loading library provides an easy way to show skeleton loading like Facebook or Alipay Automatically aiming performance and extensibility
How to include
//check out the latest version at the download badge on the top
implementation 'github.hotstu.autoskeleton:autoskeleton:1.0.0'
Features
-
Extensibility
AutoSkeleton is code in the 'Delegate pattern' that means it's not limited to a specific type of ViewGroup
you can simply extend any ViewGroup to implement the skeleton loading ability by delegate some method to the
SkeletonDelegate
class -
Better performance
Unlike [ShimmerLayout][1] which traversal the view tree and draw all the child on a bitmap twice, AutoSkeleton does not call
super.dispatchDraw(canvas)
. -
custom drawing
AutoSkeleton is designed as a loose developers have the full control of the drawing steps such as
- control the traversal view tree depth
- Exclude some views by view depth & view properties
- custom animation
-
Kotlin
AutoSkeleton is written in pure kotlin except some java code to show interoperability with java
-
Preview in android studio
You can see the preview in layout editor directly in android studio