• Stars
    star
    244
  • Rank 160,799 (Top 4 %)
  • Language
    Java
  • License
    MIT License
  • Created over 8 years ago
  • Updated about 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Android Marshmallow Boot Animation View

Implementation of Android Marshmallow Boot Animation.

Demo image

To use LoadingAnimationView first add dependency to your project:

dependencies {
    compile 'com.cleveroad:androidmanimation:0.9.1'
}

Then you can declare it in your layout file like this:

    <com.cleveroad.androidmanimation.LoadingAnimationView
        xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:app="http://schemas.android.com/apk/res-auto"
        android:id="@+id/animation"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:padding="16dp"
        app:lav_backgroundColor="@android:color/black"
        app:lav_firstColor="@color/google_red"
        app:lav_secondColor="@color/google_green"
        app:lav_thirdColor="@color/google_blue"
        app:lav_fourthColor="@color/google_yellow"
        app:lav_speedCoefficient="1.0"
        />

Pay attention that you need to manually start/pause/stop animation.

    private LoadingAnimationView animation;
    
    ...
    
    @Override
    protected void onResume() {
        super.onResume();
        // user interacts with screen, start animation
        animation.startAnimation();
    }

    @Override
    protected void onPause() {
        // user stops interacting with screen, pause animation, save your battery!
        animation.pauseAnimation();
        super.onPause();
    }

    @Override
    protected void onDestroy() {
        // user leaves screen. Clean up everything. 
        animation.stopAnimation();
        super.onDestroy();
    }

Another way to display loading animation is to use builder and display a dialog:

    AnimationDialogFragment fragment = new AnimationDialogFragment.Builder()
            .setBackgroundColor(Color.WHITE)
            .setFirstColor(getResources().getColor(R.color.google_red))
            .setSecondColor(getResources().getColor(R.color.google_green))
            .setThirdColor(getResources().getColor(R.color.google_blue))
            .setFourthColor(getResources().getColor(R.color.google_yellow))
            .setSpeedCoefficient(1.0f)
            .build();
    fragment.show(getSupportFragmentManager(), "Animation");

Changelog

Version Changes
v.0.9.1 Replaced Timer with ValueAnimator
v.0.9.0 First public release

Migrations from v.0.9.0 to v.0.9.1

  • LoadingAnimationView.getState() was replaced with LoadingAnimationView.isRunning() method.
  • All resources marked as private, prefix lav_ added to their names.
  • Minimum SDK version set to 12

#### Support #### * * * If you have any other questions regarding the use of this library, please contact us for support at [email protected] (email subject: "Android loading animation view. Support request.") or

Use our contacts:


#### License #### * * * The MIT License (MIT)
Copyright (c) 2016 Cleveroad Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

More Repositories

1

SlidingTutorial-Android

Android Library for making animated tutorials inside your app
Java
2,485
star
2

FanLayoutManager

Using Fan Layout Manager you can implement the horizontal list, the items of which move like fan blades
Java
2,057
star
3

AdaptiveTableLayout

Library that makes it possible to read, edit and write CSV files
Java
1,903
star
4

WaveInApp

Live Audio Equalizer with wave effect
Java
1,768
star
5

MusicBobber

Awesome Audio Widget for any Android Music App
Java
881
star
6

LoopBar

Tap Bar with infinite scrolling. Make the navigation menu right at fingerprints, in a tab bar.
Java
741
star
7

CRNetworkButton

Send Button for iOS
Swift
654
star
8

FireworkyPullToRefresh

Let's try to refresh your data with our library!
Java
640
star
9

BubbleAnimationLayout

You donโ€™t want your apps look and feel boring, do you? Add some bubbles!
Java
577
star
10

CycleMenu

Custom LayoutManager for the inner RecyclerView
Java
574
star
11

CRPageViewController

While a standard page view allows you to navigate between pages by using simple gestures, our component goes further
Objective-C
394
star
12

PlayWidget

Break the monotony and make your music player unique!
Java
367
star
13

Bitutorial

Crumbling tutorial for Android Apps
Java
357
star
14

CRParticleEffect

A CocoaPod that simplifies creation of the particle effects.
Objective-C
348
star
15

DroidArt

Android library that allows perform manipulations with text and easily combine it with images.
Kotlin
209
star
16

BlurTutorial

Library for creating blur effects under Android UI elements
Kotlin
155
star
17

flutter_sliding_tutorial

User onboarding library with smooth animation of objects and background colors
Dart
128
star
18

CRRulerControl

Customizable component, created by Cleveroad iOS developers, is aimed at turning a simple ruler into a handy and smart instrument
Objective-C
112
star
19

ARFaceDetection

AR-based library for Android which is capable of detecting faces and overlaying images above the userโ€™s head
Kotlin
51
star
20

slidingtutorial-ios

iOS Library for making animated tutorials inside your app
Objective-C
49
star
21

Bootstrap

This set of libraries is designed to help developers accomplish various tasks easier and faster
Kotlin
40
star
22

CRRollingLabel

Objective-C
30
star
23

CRCellCollectionView

With this component, pictures in your apps collection view will look like honeycomb instead of the boring standard variant
Objective-C
28
star
24

cr_calendar

Highly customizable, feature-packed calendar widget for Flutter.
Dart
27
star
25

ColorDetection

ColorDetection is an app built with OpenCV and using computer vision at its core. Itโ€™s able to detect and change colors of objects using a camera of iOS devices.
Objective-C++
21
star
26

cr_logger

Dart
13
star
27

cr_file_saver

Kotlin
3
star
28

CRRefreshControl

2
star
29

CRPlotView

1
star
30

CRPinCodeControl

1
star
31

cr_json_widget

Dart
1
star
32

cr_mentions

Dart
1
star