AnimatedVectorDrawable in Support Library and animation of “pathData”

后端 未结 2 1740
死守一世寂寞
死守一世寂寞 2020-12-06 06:04

I am using animated vectors from Support Library 23.2.0, like this:

compile \'com.android.support:support-vector-drawable:2         


        
2条回答
  •  感动是毒
    2020-12-06 06:32

    Sorry, this will not work with the current version of the Support Library(23.2.0).

    See Chris Banes article.

    There are also some limitations to what kind of things animated vectors can do when running on platforms < API 21. The following are the things which do not work currently on those platforms:

    Path Morphing (PathType evaluator). This is used for morphing one path into another path.

    Path Interpolation. This is used to defined a flexible interpolator (represented as a path) instead of the system defined ones like LinearInterpolator.

    Move along path. This is rarely used. The geometry object can move around, along an arbitrary path.

    So animating the pathData, or 'Path Morphing' isn't currently supported.

    Update:
    Frank's comment:

    This is finally fixed in support lib 25.4.0 (June 2017): "Path morphing and path interpolation are supported in AnimatedVectorDrawableCompat"

提交回复
热议问题