Giter Site home page Giter Site logo

lx1361322 / animation Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kongpf8848/animation

0.0 0.0 0.0 62.66 MB

Android各种动画效果合集,项目包含了丰富的动画实例(逐帧动画,补间动画,Lottie动画,GIF动画,SVGA动画),体验动画之美,让Android动起来:smile::smile::smile:

License: Apache License 2.0

C++ 27.69% C 20.12% Java 5.46% Assembly 1.26% Kotlin 45.19% CMake 0.27%

animation's Introduction

Animation

最新版本 License

Android各种动画效果合集,项目包含了丰富的动画实例(逐帧动画,补间动画,Lottie动画,GIF动画,SVGA动画),体验动画之美,让Android动起来:smile::smile::smile:

APK下载

ScreenShots

闪屏页 引导页 小红书
image image image
汽车之家 电报(Telegram) 京东到家
image image image
图片浏览 自如 翻译君
image image image

逐帧动画(Frame Animation)

一帧一帧进行播放,它的原理与Gif类似,按序播放一组预先定义好的图片序列,如:

<?xml version="1.0" encoding="utf-8"?>
<animation-list android:oneshot="false" xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:duration="100" android:drawable="@drawable/loading01" />
    <item android:duration="100" android:drawable="@drawable/loading02" />
    <item android:duration="100" android:drawable="@drawable/loading03" />
    <item android:duration="100" android:drawable="@drawable/loading04" />
    <item android:duration="100" android:drawable="@drawable/loading05" />
    <item android:duration="100" android:drawable="@drawable/loading06" />
    <item android:duration="100" android:drawable="@drawable/loading07" />
    <item android:duration="100" android:drawable="@drawable/loading08" />
    <item android:duration="100" android:drawable="@drawable/loading09" />
    <item android:duration="100" android:drawable="@drawable/loading10" />
    <item android:duration="100" android:drawable="@drawable/loading11" />
    <item android:duration="100" android:drawable="@drawable/loading12" />
</animation-list>

补间动画(Tween Animation)

动画类型 XML配置方式 Java代码实现方式
渐变透明度动画 alpha AlphaAnimation
缩放动画 scale ScaleAnimation
旋转动画 rotate RotateAnimation
平移动画 translate TranslateAnimation

属性动画(Property Animation)

直接更改对象的属性来实现的动画。 工作原理:在一定时间间隔内,通过不断调用set方法对值进行改变,并不断将该值赋给对象的属性,从而实现该对象在该属性上的动画效果,详情的属性动画介绍可参考官方文档 image

转场动画 (Transition Animation)

Google在Android 5.0之后推出的一种动画效果,就是以某种方式从一个场景以动画的形式过渡到另一个场景,可以参考Material-Animations

Lottie动画

Lottie 是 Airbnb推出的一套跨平台的动画完整解决方案,它能够帮助开发者直接加载json格式的文件在 iOS、Android 和 React Native之上,实现 100% 与设计稿相同的动画效果,而无需关心中间的实现细节。设计师只需要使用 After Effectes 设计出动画之后,通过使用 Lottie 提供的Bodymovin插件将设计好的动画导出成json格式的文件交付给开发即可完成。 Lottie网站 lottie-android

Tgs动画

IM软件Telegram 推出的新的Sticker贴纸格式,这个全新的 Sticker 贴纸格式为 .tgs,其实就是基于lottie json文件改造而来的一种格式。Telegram官网 GitHub

1 2
image image

GIF动画

GIF(Graphics Interchange Format)是由CompuServe公司开发的一种图像文件格式,可以将多幅图像保存到一个图像文件,展示的时候将多幅图像数据逐帧读出并显示到屏幕上,从而形成动画效果。在Android中播放GIF通常有以下几种方式:

  • 使用Android SDK中自带的android.graphics.Movie类(已过时)
  • 使用Glidefresco等图片加载类库,Glide支持加载本地和网络上的GIF图片
  • 使用giflib类库在native层解码GIF,使用FrameSequenceDrawable的双缓冲机制进行绘制展示GIF中的每一帧图像
  • 使用android-gif-drawable类库,其底层也是使用giflib进行GIF解码

SVGA动画

SVGA是一种同时兼容iOS/Android/Flutter/Web平台的动画格式。SVGA官网 image

animation's People

Contributors

kongpf8848 avatar rainboy2010 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.