Skip to content
Eudy Contreras edited this page Apr 13, 2020 · 8 revisions

Dev Site Banner

Android Developer Nation is a developer driven community dedicated to sharing high quality resources and libraries. At dev-nation the goal is to push the boundaries of the android platform and deliver top of the line and completely open source libraries and resources for the android community. If you can sing our anthem and would like to contribute, you are more than welcome. 🏆 "By developers for developers"

Release License: ISC

Welcome to the Bones wiki!


Bones is a highly adaptable and highly customisable library for generating skeleton drawables. This library can generate a drawable skeleton loader for any View or ViewGroup. Simply define the desired properties and the skeleton drawable will be generated for the ViewGroup and its children. It is that simple!

Bones provides you the freedom of creating concise skeletons that will fit your apps design seamlessly. The library works by creating a drawable based on some View or ViewGroup. The drawable can listen to a state using data-binding. When the state is true the skeleton loader drawable is shown and animated if it has any shimmers added to it. Each skeleton drawable has a skeleton object and a skeleton manager which is in charge for manipulating the skeleton, the bones and the shimmer rays. Same applies to BoneDrawables. The skeleton is visually created based on the ViewGroup/View that the drawable was bound to and then added as an overlay. The skeleton loader drawables are added as temporary foreground drawables. Once the state of the loader changes to false, the skeleton or bone drawable is removed and the original foreground is restored given that one was previously present.


Day Night

Features

  • Lightweight and easy to use
  • Non-invasive, No changes to existing code required.
  • No layout nor view wrapping which creates complex hierarchies
  • No mock layouts needed
  • Pixel perfect skeleton bone placing
  • Disposed when no longer needed
  • No boilerplate
  • Uses data binding
  • Highly performant
  • Extremely customizable
  • Code-free use

How to add it to your project?

Step 1

Add it in your root build.gradle at the end of repositories:

allprojects {
  repositories {
    maven { url 'https://jitpack.io' }
  }
}

Add as a dependency in you applications build.gradle.

dependencies {
  implementation 'com.github.EudyContreras:Skeleton-Bones:${lib_version}'
}