GithubHelp home page GithubHelp logo

loading's Introduction

loading

一些 loading 动画

  • 一些 animated-vector 实现的SVG动画,参考 https://github.com/n3r4zzurr0/svg-spinners
  • DoubleColorBallLoadingView - 从抖音扒下来的双色球加载动画
  • SimpleLoadingView - 播放加载动画
    • 如果 drawableAnimatable,直接播放
    • 否则对此视图播放 RotateAnimation,插值器效果类似于 SVG 的 calcMode="discrete"
      Interpolator { (it * 12).toInt() / 12f }

calcMode="discrete"

这指定了动画函数将从一个值跳转到下一个值,而不需要任何插值。

https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/calcMode

安卓的 animated-vector 不支持 discrete,也难以实现类似的效果

Preview

Gradle

repositories {
    maven { url "https://gitee.com/ezy/repo/raw/cosmo/"}
}
dependencies { 
    implementation "me.reezy.cosmo:loading:0.8.0" 
}

参考

https://developer.android.com/reference/android/graphics/drawable/AnimatedVectorDrawable.html https://developer.android.com/reference/android/animation/ObjectAnimator https://developer.android.com/guide/topics/resources/animation-resource

https://www.nan.fyi/svg-paths/ https://developer.mozilla.org/zh-CN/docs/Web/SVG/Tutorial/Paths

https://github.com/n3r4zzurr0/svg-spinners

SMIL Animation
https://www.w3.org/TR/2001/REC-smil-animation-20010904/

LICENSE

The Component is open-sourced software licensed under the Apache license.

loading's People

Contributors

czy1121 avatar

Stargazers

 avatar

Watchers

 avatar  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.