Questions tagged [objectanimator]

Android class which animates an object based on a specified property of the object.

Android class which animates an object based on a specified property of the object. Reference: https://developer.android.com/reference/android/animation/ObjectAnimator.html

358 questions
68
votes
7 answers

Android property animation: how to increase view height?

How to increase the view height using Property Animations in Android? ObjectAnimator a = ObjectAnimator.ofFloat(viewToIncreaseHeight, "translationY", -100); a.setInterpolator(new…
58
votes
4 answers

Android properties that can be animated with ObjectAnimator

I am starting to play around with Property Animations over view animations as I have a view that needs to scale and push others out of the way as it does. I've seen some examples but I'm just wondering if there is anywhere that provides a list of…
34
votes
0 answers

Android: How to make a nice heartbeat animation?

This is my solution anim/pulse.xml
user3290180
  • 3,590
  • 9
  • 38
  • 69
30
votes
4 answers

How to reset view to original state after using animators to animates its some properties?

I am using animators (ObjectAnimator) to animate few properties (scale, rotate) of a view. Target view is animating properly when ObjectAnimators are set to it. But there is an added requirement to get view to the original position (reset) after a…
Napolean
  • 3,988
  • 2
  • 24
  • 31
30
votes
3 answers

Fragment : Unknown animation name objectanimator

I'm trying to do a flipping card animation between two fragment like in --> Displaying Card Flip Animations by using: private void switchFragment(Fragment fragment) { FragmentManager fragmentManager = getSupportFragmentManager(); …
Glenn Sonna
  • 1,483
  • 2
  • 16
  • 25
29
votes
5 answers

Change multiple properties with single ObjectAnimator?

I have a pretty complex animation I need to code and I'm using a bunch of ObjectAnimators like the following: ObjectAnimator objectAnimator1 = ObjectAnimator.ofFloat(view, TRANSLATION_X, value).setDuration(BASE_DURATION * 2); ObjectAnimator…
The Hungry Androider
  • 2,158
  • 5
  • 24
  • 45
29
votes
4 answers

How to give percentage values in ObjectAnimator in Android

I am using objectAnimator for animating a button from bottom to top in Android. Now i am using the below code ObjectAnimator transAnimation = ObjectAnimator.ofFloat(button,"translationY",0,440); transAnimation.setDuration(440); …
Sanal Varghese
  • 1,395
  • 4
  • 20
  • 46
22
votes
2 answers

How to rotate a drawable by ObjectAnimator?

Alphaing a drawable work well like this: if(mAlphaAnimation == null){ mAlphaAnimation = ObjectAnimator.ofFloat(this, "alpha", 0.0f,1.0f).setDuration(TARGET_ANIM_ALPHA_DURATION); mAlphaAnimation.setInterpolator(new…
marine8888
  • 273
  • 1
  • 2
  • 10
21
votes
3 answers

Check if AnimatorSet has finished animation?

I'm trying to animate buttons with fade in animation using AnimatorSet Button fades in > Click button > Remaining buttons fade out So in order to do this, I want to set the onClickListner after the animation is completed, but that doesn't seem to…
Zen
  • 2,524
  • 3
  • 19
  • 40
20
votes
1 answer

Android Studio XML does not recognize objectAnimator

I have been trying to animate a transition between two fragments. I had originally placed them a property animations in xml (and that didn't really work), then changed it to objectAnimator. For some reason Android Studio is not recognizing the…
20
votes
0 answers

ObjectAnimator onAnimationEnd listener is called before the animation finishes

its weird and strange, but it seems like when I attach an AnimatorListener to an ObjectAnimator I use for animating fragment transactions, the callback gets actually called slightly before finish of the animation. I use the listener to populate…
19
votes
2 answers

Stop AnimatorSet of ObjectAnimators in Android

Im trying to stop the animation of an ImageView when a button is clicked. The animation I am using is an AnimatorSet consisting of 5 ObjectAnimators... The problem is that I can't figure how to stop and clear this animation from the ImageView when…
MajorDanger
  • 245
  • 1
  • 3
  • 9
16
votes
2 answers

Android - Zoom animation using AnimatorSet

The official Zooming a View tutorial uses an AnimatorSet to zoom into a View. It creates the illusion of downward movement as the view expands. Later, the AnimatorSet is simply replayed backwards to create the illusion of zoom-out. What I need to…
Y.S
  • 28,153
  • 12
  • 86
  • 113
13
votes
2 answers

Infinite ObjectAnimator with interpolator... How to accelerate only the initial start?

I have a object animator with infinite repeat mode. I want to accelerate it only the first time it starts... not every time it is repeating itself How can this be achieved? my code: universeMovement1 = ObjectAnimator.ofFloat(universeImageView, "x",…
13
votes
3 answers

How to reset ObjectAnimator to it's initial status?

I want to vibrate a view with scaleX and scaleY, and I am doing it with this code, but the problem is that sometimes the view is not correctly reset, and it shows with the scale applied... I want that when the animation ends, the view must be seen…
NullPointerException
  • 32,153
  • 66
  • 194
  • 346
1
2 3
23 24