diff --git a/library/src/com/nineoldandroids/view/animation/AnimatorProxy.java b/library/src/com/nineoldandroids/view/animation/AnimatorProxy.java index d5d6a77..ef3dda2 100644 --- a/library/src/com/nineoldandroids/view/animation/AnimatorProxy.java +++ b/library/src/com/nineoldandroids/view/animation/AnimatorProxy.java @@ -303,7 +303,9 @@ private void transformMatrix(Matrix m, View view) { final float sY = mScaleY; if ((sX != 1.0f) || (sY != 1.0f)) { m.postScale(sX, sY); - m.postTranslate(-pX, -pY); + final float sPX = -(pX / w) * ((sX * w) - w); + final float sPY = -(pY / h) * ((sY * h) - h); + m.postTranslate(sPX, sPY); } m.postTranslate(mTranslationX, mTranslationY); diff --git a/sample/res/layout/toggles.xml b/sample/res/layout/toggles.xml index f60ede3..ee35102 100644 --- a/sample/res/layout/toggles.xml +++ b/sample/res/layout/toggles.xml @@ -67,17 +67,23 @@ android:layout_width="fill_parent" android:orientation="horizontal">