Code Monkey home page Code Monkey logo

skelly's Introduction

Skelly

Build Status Latest release

Skelly is a tiny library for displaying skeletons while the content itself is loading. All skeletons are completely synchronized across the whole application no matter how many of them visible on a screen at the moment.

Example GIF

Customization

  • Start color of gradient animation (0xFFCCCCCC by default)
  • End color of gradient animation (0xFF444444 by default)
  • Corner radius (half height by default)

The parameters from above can be set up both in xml-layout and source code.

How to use

Just add it to your xml-layout:

<com.dpforge.skelly.SkeletonView
    android:id="@+id/skeleton"
    android:layout_width="match_parent"
    android:layout_height="48dp" />

Keep in mind that SkeletonView has no size so wrap_content does not work properly.

Sample

Sample project will show you how to use skelly library in you Android application.

Automatic substitution with SkeletonView

There is an experimental feature called SkeletonLayoutFactory. It allows you to take any regular layout and replace all views with SkeletonView. Fully automated!

You can take any xml-layout and turn it into skeleton-layout:

SkeletonLayoutFactory.Default.inflateFrom(
    context = this,
    layoutId = R.layout.avatar_title_subtitle,
    parent = container,
    attachToRoot = true
)

For more information please have a look at factory sample.

Install

Add the following dependency to your build.gradle script:

dependencies {
    implementation 'com.dpforge:skelly:1.0.0'
}

License

Copyright (c) 2021 Daniil Popov

Licensed under the MIT License.

skelly's People

Contributors

int02h avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.