https://github.com/hotstu/autoskeleton
‘real’ skeleton loading library provides an easy way to show skeleton loading like Facebook or Alipay aiming performance and extensibility
https://github.com/hotstu/autoskeleton
skeleton-loading
Last synced: 8 months ago
JSON representation
‘real’ skeleton loading library provides an easy way to show skeleton loading like Facebook or Alipay aiming performance and extensibility
- Host: GitHub
- URL: https://github.com/hotstu/autoskeleton
- Owner: hotstu
- License: apache-2.0
- Created: 2019-07-18T09:22:46.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-04-01T01:24:47.000Z (almost 6 years ago)
- Last Synced: 2025-04-05T15:35:16.064Z (11 months ago)
- Topics: skeleton-loading
- Language: Kotlin
- Homepage:
- Size: 7.18 MB
- Stars: 83
- Watchers: 4
- Forks: 7
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/hotstu)
[ ](https://bintray.com/hglf/maven/AutoSkeleton/_latestVersion)
[](https://opensource.org/licenses/Apache-2.0)
AutoSkeleton
===============
Yet Another skeleton loading library provides an easy way to show skeleton loading like Facebook or Alipay **Automatically** aiming performance and extensibility
[中文](/README_CN.md)
![demo1][demo1] ![demo1][demo2]
### How to include
```groovy
//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
### Similar Libraries
* [ShimmerLayout][1]
* [Skeleton][2]
### Thanks
This library is inspired by [JakeWharton/scalpel](https://github.com/JakeWharton/scalpel)
[1]: https://github.com/team-supercharge/ShimmerLayout
[2]: https://github.com/ethanhua/Skeleton
[demo1]: /screenshots/demo1.gif
[demo2]: /screenshots/demo2.gif
[demo]: /screenshots/demo.gif