squaresandcirclesloading icon indicating copy to clipboard operation
squaresandcirclesloading copied to clipboard

Squares And Circles Loading Animation

A pretty loading animation inspired by this post on Dribble

ezgif com-crop ezgif com-crop 1 ezgif com-crop 2

How to

Gradle

dependencies {
    compile 'com.tbuonomo:squaresandcirclesloading:1.0.2'
}

In your XML layout

<com.tbuonomo.squaresandcirclesloading.SquaresAndCirclesLoadingView
      android:layout_width="100dp"
      android:layout_height="100dp"
      android:layout_centerInParent="true"
      app:backgroundColor="#0288D1"
      app:circlesColor="#FFF"
      app:interpolator="anticipate_overshoot"
      app:animationDuration="1400"/>

Attributes

Attribute Description
circlesColor Color of the circles
squareColor Color of the square (must be the same of the parent background)
interpolator The interpolator to use for the points animation (by default fastOutSlowIn)
animationDuration Step duration of the animation in ms (by default 800)

License

Copyright 2016 Tommy Buonomo

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.