All Projects → liuwei1993 → Androidanimationtools

liuwei1993 / Androidanimationtools

Licence: apache-2.0
复杂组合动效可扩展轻量级实现方案

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Androidanimationtools

ProminentColor
Android Library to get average/prominent color of bitmap/drawable
Stars: ✭ 23 (-77%)
Mutual labels:  drawable
Spedittool
An efficient and scalable library for inputing and displaying gif or @mention on graph-text mixed TextView/EditText
Stars: ✭ 292 (+192%)
Mutual labels:  drawable
Slice
Android drawable that allows you custom round rect position.
Stars: ✭ 605 (+505%)
Mutual labels:  drawable
dynamic-utils
Utility functions to perform dynamic operations on Android.
Stars: ✭ 86 (-14%)
Mutual labels:  drawable
Backgroundlibrary
A framework for directly generating shape through Tags, no need to write shape.xml again(通过标签直接生成shape,无需再写shape.xml)
Stars: ✭ 3,179 (+3079%)
Mutual labels:  drawable
Appcompat Extension Library
A library that builds on the AppCompat Design Library and provides additional common components such as AccountHeaderView, FloatingActionMenu, CircleImageView, Picker Dialogs, FlexibleToolbarLayout, Delightful Detail Drawables and TypefaceCompat.
Stars: ✭ 307 (+207%)
Mutual labels:  drawable
svg-non-stop
SVG import "Gradient has no stop info" fix
Stars: ✭ 65 (-35%)
Mutual labels:  drawable
Ariana
Provide Multiple Gradients in ImageViews and Texts. Integrate with ViewPager to change colors dynamically.
Stars: ✭ 74 (-26%)
Mutual labels:  drawable
Editdrawabletext
EditDrawableText - An EditText which makes your Drawable Clickable
Stars: ✭ 288 (+188%)
Mutual labels:  drawable
Nodrawable
一个旨在减少99%的drawable.xml文件的库,可直接在布局文件中对任意View声明drawable属性。
Stars: ✭ 551 (+451%)
Mutual labels:  drawable
ApngDrawable
ApngDrawable for android, high efficiency, low memory
Stars: ✭ 32 (-68%)
Mutual labels:  drawable
Uilibrary
平时项目开发中写的自定义Drawable、View和Shape
Stars: ✭ 260 (+160%)
Mutual labels:  drawable
Gradientdrawabletuner
🕹️ See how the properties of Android's "shape" affect the Drawable's appearance, intuitively.
Stars: ✭ 343 (+243%)
Mutual labels:  drawable
svg2vector
Online batch converter of SVG images to Android vector drawable XML resource files
Stars: ✭ 39 (-61%)
Mutual labels:  drawable
Android Toy
不积跬步 无以至千里
Stars: ✭ 54 (-46%)
Mutual labels:  drawable
Extract-Color-Palette-Api
Create gradient drawable by extracting prominent colors from image⚫⚪
Stars: ✭ 16 (-84%)
Mutual labels:  drawable
Onedrawable
✏️ Use only one image to set a background with a click effect for the View
Stars: ✭ 298 (+198%)
Mutual labels:  drawable
Android Gif Drawable
Views and Drawable for displaying animated GIFs on Android
Stars: ✭ 8,987 (+8887%)
Mutual labels:  drawable
Youtube Play Icon
Material style morphing play-pause drawable for Android
Stars: ✭ 57 (-43%)
Mutual labels:  drawable
Gaussianblur
An easy and fast library to apply gaussian blur filter on any images. 🎩
Stars: ✭ 473 (+373%)
Mutual labels:  drawable

Android动画工具箱

预览

使用方法

导入 

Step 1. 添加JitPack repository到你的主项目build.gradle文件

allprojects {
    repositories {
	...
	maven { url 'https://jitpack.io' }
    }
}

Step 2. 添加依赖

dependencies {
    compile 'com.github.liuwei1993:AndroidAnimationTools:1.0'
}

示例:

示例使用:

java中:

ImageView imageView = (ImageView) itemView.findViewById(R.id.image);
AnimationDrawable drawable = new WavingBars();
imageView.setImageDrawable(drawable);
drawable.start();

layout中:

<!-- 如果动画需要超出View边界,则需要将ImageView的父View的 android:clipChildren属性设置为false -->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:clipChildren="false">

    <ImageView
        android:id="@+id/image"
        android:layout_width="160dp"
        android:layout_height="160dp"
        android:clipChildren="false"
        android:layout_gravity="center"/>

</FrameLayout>

效果:

实现原理

核心类:

该库主要有两个重要部分组成一个是drawable系列,用于绘制图形,一个是animator系列,用于方便的构造Animator.

drawable包下

animator包下

继承AnimatonDrawable类后使用DrawableAnimatorBuilder可以使Drawable具备动画效果,而AnimDrawableContainer自身继承于AnimationDrawable并且可以管理多个AnimatonDrawable从而实现复杂动画效果. 而interpolator包下的工具类可以帮助我们高效的创建复杂的Interpolator. 使用者可参考示例代码来自定义各种复杂动画效果.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].