I set android: fillAfter = "true" in res / anim.
I want to move LinearLayout to y
In this LinearLayout, I put a button using a Listener.
After the animation, LinearLayout LinearLayout is in a new position, but the button in this LinearLayout does not have a Listener.
The listener is where the button will be, if android: fillAfter = "false".
I tried also:
public void onAnimationEnd(Animation arg0) { LayoutParams params = new LayoutParams( LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT); params.topMargin = 200; _mylayout.setLayoutParams(params); _myAnim.setFillAfter(false); }
But nothing happens, because I do not completely align the percentage in anim android: toYDelta = "70%" and params.topMargin = 200;
How can i solve this? thanks
source share