Skip to content

tommybuonomo/slidingpuzzleloading

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sliding Puzzle Loading Animation

A pretty loading animation inspired by this post on UpLabs

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

How to

Gradle

dependencies {
    compile 'com.tbuonomo:slidingpuzzleloading:1.0.1'
}

In your XML layout

<com.tbuonomo.slidingpuzzleloading.SlidingPuzzleView
    android:id="@+id/sliding_puzzle"
    android:layout_width="150dp"
    android:layout_height="100dp"
    app:strokeWidth="1dp"
    app:animationDuration="500"
    app:cornerRadius="4dp"
    app:squaresColor="#2196F3"
    app:strokeColor="@android:color/white"
        />

In your Java code

SlidingPuzzleView slidingPuzzleView = (SlidingPuzzleView) findViewById(R.id.sliding_puzzle);
slidingPuzzleView.start();

Attributes

Attribute Description
squaresColor Color of the squares
cornerRadius Corner radius of the squares (by default 3dp)
strokeColor Color of the squares stroke line
strokeWidth Width of the squares stroke line (by default 2dp)
animationDuration Step duration of the animation in ms (by default 500)

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

    https://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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages