I am adding a glow animation effect to a logo. So far, I have managed to get the glow image behind the logo, using a LayeredDrawable, but I can't figure out how to animate it. I have found that AlphaAnimation would achieve the desired effect, but unfortunately I can only apply it on Views, not Drawables. How can I achieve this effect?
相关问题
- How can I create this custom Bottom Navigation on
- Bottom Navigation View gets Shrink Down
- How to make that the snackbar action button be sho
- Listening to outgoing sms not working android
- How to create Circular view on android wear?
相关文章
- android开发 怎么把图片放入drawable的文件夹下
- android上如何获取/storage/emulated/下的文件列表
- androidStudio有个箭头不认识
- SQLite不能创建表
- Windows - Android SDK manager not listing any plat
- Animate Recycler View grid when number of columns
- Why is the app closing suddenly without showing an
- Android OverlayItem.setMarker(): Change the marker
Simple example
Method
getAlpha()
add in api 19. But it's not a big restriction, you can save the status in a local variable.ObjectAnimator
add in Android 3.0 (api 11),maybe old version Android you can use nineoldandroids. I didn't test with nineoldandroids.I'm using an Animation on the ImageView displaying the drawable. I think this should be possible in your case too.
Thank you @AndreyNick, it works like a charm! I've used it also for a LayerDrawable for animating just one Drawable (a layer) into it. This is the code, maybe could be useful for someone:
I needed to create a drawable for the Action Bar with:
I load the logo with Picasso and I like to animate it when has been loaded (bitmap onBitmapLoaded callback).
I hope this could help!
Android 3.0 introduced Property Animations.
Unfortunately, this is limited to Android 3.0 and up which won't get on phones any time soon.