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
0
votes
0 answers

Flip animation (ObjectAnimator) for supportfragment (API less than 10)

I tried use CustomAnimation function for my application. But I end up getting Unknown Object Animator name error. I did some research and found out apparently objectAnimator type of animation is not supported under getSupportFragmentManager (correct…
IssacZH.
  • 1,409
  • 3
  • 24
  • 53
0
votes
1 answer

Android scrollTo with animation that starts from scrollposition

I have an ObjectAnimator that currently scrolls my container to a certain view. The problem I have with this Animation is that it doesn't seem to take the start position in account. Instead of starting the scrolling animation from the current…
Bart Burg
  • 4,470
  • 7
  • 46
  • 81
0
votes
1 answer

how to make a view zigzag up the screen?

hi i have 2 views that i want to have zig zag up and off the screen. ive tried using object animators like this float 1
martinseal1987
  • 747
  • 2
  • 25
  • 52
0
votes
1 answer

Why are my animations different compared to phone/tablet (density) and how to prevent it?

When using an ObjectAnimator to move an item I get different results due to the density difference between my devices. How would I go about making these independent from density? ObjectAnimator anim1 = ObjectAnimator.ofFloat(clockLayout,…
Carl
  • 219
  • 2
  • 5
  • 11
0
votes
0 answers

How to rotate a view like opening door?

I want to create a layout that will contain some spinner for selecting value from list. Working: When I click on spinner the Layout should be rotate like opening door and list of values should be appear from left edge of screen. After selecting a…
Ashish Tiwari
  • 1,881
  • 2
  • 25
  • 49
0
votes
0 answers

Analogue of GenerateViewID for Animator objects?

I have a custom ObjectAnimator object, created at runtime. Is there something similar to View's generateViewID() method that lets me get an id for it so I can attach it to a FragmentTransaction? In other words, I want to do something like this: //…
William Jockusch
  • 26,421
  • 48
  • 170
  • 299
0
votes
0 answers

Android - Mask/Layer on ImageView

I need to create a BLACK mask on an ImageView which is a mellon (like a circle) and I need to put on that mask an animation (property animation using ObjectAnimator) in order to change the alpha of the mask, and then the imageview should be shown…
doruvil
  • 93
  • 1
  • 7
0
votes
1 answer

Android Object Animation xml

I am trying to create translate a image (ball) using the xml objectAnimator. When I try to reference my objectAnimator xml file, it says getApplicationContext() might return null. When I flash it to my phone, it crashed immediately. When I take out…
Pwpon500
  • 3
  • 1
  • 3
0
votes
1 answer

android objectanimator expand/collapse from top to bottom animation?

I've been trying different approaches to get the expand/collapse animation with object animator but none of them so far worked. I have used this solution and it works, but when I read the documentation it says it's more preferred to use animator to…
Saeid Farivar
  • 1,597
  • 23
  • 41
0
votes
0 answers

Android property animation relative to view's height

I initialize ObjectAnimator like this; ObjectAnimator anim = ObjectAnimator.ofFloat(view, "translationY", 0f, view.getHeight()); But when the first time animation runs, view.getHeight() method returns 0. So it does not animate. Second time i run…
ferpar1988
  • 576
  • 1
  • 5
  • 17
0
votes
1 answer

Setting text between animations

I have problem with setting text between animations (fade out text then change it and fade in) using NineOldAndroids library. I have tried to set it like this: ObjectAnimator.ofFloat(TextView, "alpha", 1, 0.5f,…
Stramek
  • 275
  • 1
  • 3
  • 13
0
votes
1 answer

Android:Rotating LinearLayout leaves a trail

Im rotating a LinearLayout, using an ObjectAnimator. Clicking the button causes the LinearLayout to rotate 360(degrees) with the bottom part as the Pivot. After the Layout completes the rotation, it leaves back a 'trail'/black mark and the complete…
Zen
  • 2,524
  • 3
  • 19
  • 40
0
votes
0 answers

retrieve view position during animation

I using ObjectAnimator to move some views in my app, every thing works correctly but i can`t get view position using gettop,getleft functions, they always returns 0. My project min sdk is 14. I also tried also with getViewTreeObserver but still…
Anton Makov
  • 123
  • 3
  • 11
0
votes
2 answers

Set Pivot for Rotate animation (ObjectAnimator) , not working?

I've applied a Rotate animation to a button using ObjectAnimator, while the rotation seems to work; the pivot point still remains the top left corner of the button. MainActivity Button bt1; float pivotX=0f; float pivotY=0f; @Override protected…
Zen
  • 2,524
  • 3
  • 19
  • 40
0
votes
1 answer

Android : Get Animation duration in code

rotate_x.xml :
Geek
  • 7,950
  • 15
  • 68
  • 132
1 2 3
23
24