I add a view to the WindowManager using WindowManager.updateViewLayout().
I then attache an onTouch listener to it, and make it "follow" the user's finger (drag). I do this by changing the x and y values of the WindowManager.LayoutParams I passed in updateViewLayout.
When the user lifts the finger, I want the view to animate to the screen's left/right edge according to where it is closer to. The effect I get is the view sticking to the edge immediately, without any animation.
If the view's width/height change tough (and following that, the width/height of the WindowManager.LayoutParams), the view animates to its new place.
Is there a way to get it to animate after just changing the x/y values (without having the width/height change)?