0
Ich möchte Links Rechts-Ansicht mit Animation Ändern der Größe von X 0, jetzt habe ich diese Klasse erstellt:rechts nach links Resize-Animation
public class ResizeAnimationRightToLeft extends Animation {
private View mView;
private float mToHeight;
private float mFromHeight;
private float mToWidth;
private float mFromWidth;
public ResizeAnimationRightToLeft(View v, float fromWidth, float fromHeight, float toWidth, float toHeight) {
mToHeight = toHeight;
mToWidth = toWidth;
mFromHeight = fromHeight;
mFromWidth = fromWidth;
mView = v;
}
@Override
protected void applyTransformation(float interpolatedTime, Transformation t) {
float height =
(mToHeight - mFromHeight) * interpolatedTime + mFromHeight;
float width = (mToWidth - mFromWidth) * interpolatedTime + mFromWidth;
ViewGroup.LayoutParams p = mView.getLayoutParams();
p.height = (int) height;
p.width = (int) width;
mView.requestLayout();
}
}
als ich benutze:
ResizeAnimationRightToLeft scale = new ResizeAnimationRightToLeft(layout, 0, DIM_HEIGHT, DIM_WIDTH, DIM_HEIGHT);
Aber diese Größe ändert sich von links nach rechts, jetzt verstehe ich nicht, wie ich das umkehren könnte, könnte mir jemand den Weg zeigen?
Danke.