Awesome Open Source
Awesome Open Source

Easy Animated Vector Drawable

Demo

alt text alt text

Download

dependencies {
    implementation 'com.blunderer:easy-animated-vector-drawable:1.0.5'
}

How to use it

Simply call setImageType() on any ImageView and give it the type of the drawable:

    ImageView imageView = (ImageView) findViewById(R.id.image_view);

    // Kotlin
    imageView.setImageType(EasyAnimatedVectorDrawable.Type.PLAY)
    // Java
    EasyAnimatedVectorDrawable.setImageType(imageView, EasyAnimatedVectorDrawable.Type.PLAY);

If you want to change the color of the drawable, just give also the color:

    // Kotlin
    imageView.setImageType(EasyAnimatedVectorDrawable.Type.PLAY, Color.RED)
    // Java
    EasyAnimatedVectorDrawable.setImageType(imageView, EasyAnimatedVectorDrawable.Type.PLAY, Color.RED);

or

    // Kotlin
    imageView.setImageType(EasyAnimatedVectorDrawable.Type.PLAY, ContextCompat.getColor(context, R.color.red))
    // Java
    EasyAnimatedVectorDrawable.setImageType(imageView, EasyAnimatedVectorDrawable.Type.PLAY, ContextCompat.getColor(context, R.color.red));

Here is the list of all currently supported types:

  • PLAY

  • PAUSE

  • STOP

  • LEFT_ARROW

  • UP_ARROW

  • RIGHT_ARROW

  • DOWN_ARROW

CUSTOMIZATION

The included drawable types are not useful for your app?
You can use your own animated vector drawables like this:
COMING SOON

License

Copyright 2019 Denis Mondon

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.

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Kotlin (53,499
Types (29,755
Animation (17,816
Vector (10,060
Arrow (3,957
Animated (3,883
Pause (2,355
Imageview (992
Fab (730
Floatingactionbutton (84
Vector Drawable (40
Animated Vector Drawables (21