Bug 772940 - Add height setter/getter to AnimatorProxy (r=mfinkle)

This commit is contained in:
Lucas Rocha 2012-10-12 13:22:03 +01:00
parent 207125d431
commit 912bfa7deb

View File

@ -9,6 +9,7 @@ import android.graphics.Matrix;
import android.graphics.RectF; import android.graphics.RectF;
import android.os.Build; import android.os.Build;
import android.view.View; import android.view.View;
import android.view.ViewGroup;
import android.view.animation.Animation; import android.view.animation.Animation;
import android.view.animation.AnimationUtils; import android.view.animation.AnimationUtils;
import android.view.animation.Transformation; import android.view.animation.Transformation;
@ -56,6 +57,23 @@ public class AnimatorProxy {
return proxy; return proxy;
} }
public int getHeight() {
View view = mImpl.getView();
if (view != null)
return view.getHeight();
return 0;
}
public void setHeight(int height) {
View view = mImpl.getView();
if (view != null) {
ViewGroup.LayoutParams lp = view.getLayoutParams();
lp.height = height;
view.setLayoutParams(lp);
}
}
public int getScrollX() { public int getScrollX() {
View view = mImpl.getView(); View view = mImpl.getView();
if (view != null) if (view != null)