Cube grid animation about the android.

Related tags

UI/UX CubeGrid
Overview

CubeGrid

Cube grid animation about the android.

The android implementation about the 9-cube-grid

Demo

test

Usage

Add dependency

allprojects {
	repositories {
		...
     mavenCentral()
	}
}
dependencies {
   compile 'com.lighters.cubegrid:cubegridlibray:1.2.4'
}

Step 1

  <com.lighters.cubegridlibrary.view.CubeGridImageView
      android:id="@+id/iv_cube_grid"
      android:layout_width="100dp"
      android:layout_height="100dp"
      android:padding="12dp"
      android:src="@drawable/ic_launcher"
      app:fillColor="#f00"
      app:loopCount="10"
      app:roundCornerSize="6dp"/>

  <com.lighters.cubegridlibrary.view.CubeGridFrameLayout
      android:id="@+id/fl_cube_grid"
      android:layout_width="80dp"
      android:layout_marginTop="100dp"
      android:layout_height="80dp"
      app:fillColor="#0f0"
      app:loopCount="10"
      app:roundCornerSize="6dp"/>

Step 2

public class MainActivity extends AppCompatActivity {

    public final static String TAG = MainActivity.class.getName();

    private CubeGridImageView mCubeGridImageView;
    private CubeGridFrameLayout mCubeGridFrameLayout;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        init();
    }

    private void init() {
        mCubeGridImageView = (CubeGridImageView) findViewById(R.id.iv_cube_grid);
        mCubeGridFrameLayout = (CubeGridFrameLayout) findViewById(R.id.fl_cube_grid);
        mCubeGridImageView.start(mImageAnimCallback);
        new Handler().postDelayed(new Runnable() {
            @Override
            public void run() {
                mCubeGridFrameLayout.start(mFrameLayoutAnimCallback);
            }
        }, 100);
        new Handler().postDelayed(new Runnable() {
            @Override
            public void run() {
                mCubeGridImageView.stop();
            }
        }, 5000);
    }

    private ICubeGridAnimCallback mImageAnimCallback = new ICubeGridAnimCallback() {
        @Override
        public void onAnimStart() {

        }

        @Override
        public void onAnimExecute(int curLoopCount) {
            Log.d(TAG, "image loop:" + curLoopCount);
        }

        @Override
        public void onAnimEnd() {
            Toast.makeText(MainActivity.this, "ImageAnimEnd", Toast.LENGTH_SHORT).show();
        }
    };

    private ICubeGridAnimCallback mFrameLayoutAnimCallback = new ICubeGridAnimCallback() {
        @Override
        public void onAnimStart() {

        }

        @Override
        public void onAnimExecute(int curLoopCount) {
            Log.d(TAG, "frame layout loop:" + curLoopCount);
        }

        @Override
        public void onAnimEnd() {
            Toast.makeText(MainActivity.this, "FrameAnimEnd", Toast.LENGTH_SHORT).show();
        }
    };

    @Override
    protected void onDestroy() {
        super.onDestroy();
        mCubeGridImageView.destory();
        mCubeGridFrameLayout.destroy();
    }
}

LICENSE

Copyright (C) 2016 david.wei (lighters)
 
 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.
 
You might also like...
A download progressbar with cool animation
A download progressbar with cool animation

FreshDownloadView ##About FreshDownloadView is a java library for Android,It's a good way to show download progress with a cool animtion.some inspirat

Android library used to create an awesome Android UI based on a draggable element similar to the last YouTube graphic component.
Android library used to create an awesome Android UI based on a draggable element similar to the last YouTube graphic component.

Draggable Panel DEPRECATED. This project is not maintained anymore. Draggable Panel is an Android library created to build a draggable user interface

TourGuide is an Android library that aims to provide an easy way to add pointers with animations over a desired Android View

TourGuide TourGuide is an Android library. It lets you add pointer, overlay and tooltip easily, guiding users on how to use your app. Refer to the exa

Bubbles for Android is an Android library to provide chat heads capabilities on your apps. With a fast way to integrate with your development.
Bubbles for Android is an Android library to provide chat heads capabilities on your apps. With a fast way to integrate with your development.

Bubbles for Android Bubbles for Android is an Android library to provide chat heads capabilities on your apps. With a fast way to integrate with your

View that imitates Ripple Effect on click which was introduced in Android L  (for Android 2.3+)
View that imitates Ripple Effect on click which was introduced in Android L (for Android 2.3+)

RippleView View that imitates Ripple Effect on click which was introduced in Android L. Usage For a working implementation, Have a look at the Sample

A new canvas drawing library for Android. Aims to be the Fabric.js for Android. Supports text, images, and hand/stylus drawing input. The library has a website and API docs, check it out

FabricView - A new canvas drawing library for Android. The library was born as part of a project in SD Hacks (www.sdhacks.io) on October 3rd. It is cu

MarkdownView is an Android webview with the capablity of loading Markdown text or file and display it as HTML, it uses MarkdownJ and extends Android webview.
MarkdownView is an Android webview with the capablity of loading Markdown text or file and display it as HTML, it uses MarkdownJ and extends Android webview.

About MarkdownView (Markdown For Android) is an Android library that helps you display Markdown text or files (local/remote) as formatted HTML, and st

SwipeBack for Android Activities to do pretty the same as the android
SwipeBack for Android Activities to do pretty the same as the android "back-button" will do, but in a really intuitive way by using a swipe gesture

SwipeBack SwipeBack is for Android Activities to do pretty the same as the android "back-button" will do, but in a really intuitive way by using a swi

A backport of the SwitchPreference component that was introduced on Android 4 (ICS / level 14). This port works on Android 2.1+ (Eclair MR1 / level 7).

Android Switch Preference Backport A backport of the SwitchPreference component that was introduced on Android 4 (ICS / level 14). This port works on

Releases(1.2.5)
Owner
alighters
Read the fucking source code.
alighters
An Android custom view to display digits rendered as dots in a grid, with a style like a 1970s LED clock.

#DotMatrixView This is an Android library project providing a custom view that can display things on a grid of dots. When the displayed value changes,

Mark Roberts 48 Apr 21, 2022
An Android application which visualizes some of the famous Algorithms for finding path from Source to Destination in a 2D grid.

Pathfinding-Visualizer An Android application which visualizes some of the famous Algorithms for finding path from Source to destination in a 2D grid.

Pranjal Mishra 37 Aug 8, 2022
The CustomCalendarView provides an easy and customizable calendar to create a Calendar. It dispaly the days of a month in a grid layout and allows to navigate between months

Custom-Calendar-View To use the CustomCalendarView in your application, you first need to add the library to your application. You can do this by eith

Nilanchala Panigrahy 113 Nov 29, 2022
This is a library to help creating expanding views with animation in Android

About the Library inspiration This library is strongly inspired in this concept from Hila Peleg in dribble. See it below Working example For more deta

Diego Bezerra 944 Dec 27, 2022
Android library for fluid tablayout animation as seen on Snapchat.

SnapTabLayout Show some ❤️ and star the repo to support the project This library is the implementation of TabLayout as seen on popular messaging app S

Niranjan Kurambhatti 714 Dec 25, 2022
Animation View to Highlight particular Views 🎯 for Android

TargetView Animation View to Highlight particular Views ?? for Android, it can be Used with Views that you see important (Like CountDownTimer), And al

Anas Altair 53 Aug 7, 2021
Implement a simple and funny Android animation —— the emoji rain in WeChat app.

中文版文档 Emoji Rain Hey, it's raining emoji! This is a really simple and funny animation for Android. You could find similar animations when sending "Hap

LoLo 615 Nov 21, 2022
A CirclerTimer with Animation and Timer

CircleTimer-Android A CirclerTimer with Animation and Timer Setup To use this library your minSdkVersion must be >= 21. In your build.gradle : allproj

jaeryo2357 17 Nov 7, 2022
FloatingView can make the target view floating above the anchor view with cool animation

FloatingView FloatingView can make the target view floating above the anchor view with cool animation Links 中文版 README Blog about FloatingView demo.ap

UFreedom 1.8k Dec 27, 2022
Pop animation with circular dust effect for any view updation

Popview-Android Pop animation with circular dust effect for any view updation Getting Started In your build.gradle dependencies { compile 'rb.popv

R B Krishna 489 Dec 28, 2022