onRecieve show a single ripple effect on imageView - android

I want to be able to show to my users whenever they recieve a new location update in my app.
So, whenever onRecieve() is called in my activity I want a imageView to animate a single ripple effect.
Ive tried to find a appropriate librabry that can do this easily but with no success.
Given my requirements can anyone point me in the right direction or suggest a good way to accomplish this?
Using this library https://github.com/skyfishjy/android-ripple-background i couldnt make a single ripple effect.. it never stops until i call stopRippleAnimation();
Edit: Using a valueanimator was a perfect solution for this

Call stopRippleAnimation after the ripple animation duration.
Also you can easily perform this animation using valueAnimator, Fadeout and scale using the values between 0 and 1.

Related

Android efect animation on click

I've been searching for an easy way to make a cube effect animation when a button is pressed but my search yielded nothing. The idea is that when a button is pressed the text of the button changes after a cube animation is displayed. Does anyone know how something like that can be achieved? Is there maybe a function that helps me do that? Keep in mind I am still a beginner so I am looking for an easy way to it. Thanks for your help.
Android API has "animators" which are responsible for animation of either object properties or values. I'm a bit unsure if this cube you're trying to animate is a shape or just an image view but I am assuming it is an image view. Therefore, this url should help.
https://developer.android.com/reference/android/animation/ObjectAnimator.html

WilliamChart not possible to use Animations properly - Easing and methods missing

I tried everything to get a simple Animation done in WilliamChart.
But the only thing I can change is the duration of the Animation.
I used the Application on the App Store "https://play.google.com/store/apps/details?id=com.db.williamchartdemo&hl=de" to extract the customized Code and implement it to my Chart.
Everything is working, but the Animation is not possible to implement (see Screenshots). Easing and all animation methods are not available.
Maybe I've done something wrong in Gradle. But I can't help myself no more.
Animation Code
Thank you in advance!

Can i trigger a ripple effect on another event except onClick?

I have a timer, and i want to trigger a ripple effect every second.
I don't have a problem with the ripple effect, i can't find a way to trigger it on another event except the user's onClick.
Is it possible?
I guess you want to acheive something like this?
https://github.com/skyfishjy/android-ripple-background

Animation complete listener with popupwindow

I have a popupwindow that is using a
PopupWindow.setAnimationStyle()
to show a scale in/out animation for create/dismiss .Animation is working fine. I want to know when the scale in animation is complete , but I can't find a way ...
Is there a way to set a listener for the animations listed in animation style.
I guess if I make any of the following idea work , I can achieve it
create an animation style programmatically, so that I can register listeners for the involved animations.
instead of PopupWindow.setAnimationStyle() I can set animation directly to Popupwindow , something like **Popup.setAnimation.
I can get a reference to the animations of the Popupwindow.
I tried everything I can, to find a solution but to no avail.
Please help.

Android Animation for hightlight

I am trying to learn how to do animation on Android. I want to use tween from my understanding via XML. I want to just highlight a text view, but I can't seem to find any simple examples that work, most seem to go for rotating. Anyone have an idea?
Also once I make the animation work does it block while the animation happens? Should I thread it if I am waiting for it to finish to run another event? I haven't been able to figure this out from reading the documentation. My java threading is very rusty.
Thanks
Animations thread themselves.
You won't be able to do this animation directly, because property animations are only available in Honeycomb. This animation is unnecessarily complicated because of the lack of animations. What you would have to do in order to accomplish this is to place the TextView in a FrameLayout. Create and LinearLayout with the highlight color you would like and Scale or Alpha animate that LinearLayout. If you would REALLY want to do this, I can show you.

Categories

Resources