Bug 1199768 - Read the translation from the parent element which actually has the translation rather than the ViewFlipper itself. r=wesj

--HG--
extra : commitid : 1mJYIpCaF2H
This commit is contained in:
Kartikaya Gupta 2015-08-28 17:22:17 -04:00
parent 42112ad989
commit 5e01e54551

View File

@ -12,6 +12,7 @@ import android.content.Context;
import android.graphics.Rect;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View;
import android.widget.ViewFlipper;
/* This extends the normal ViewFlipper only to fix bug 956075 on < 3.0 devices.
@ -33,7 +34,7 @@ public class GeckoViewFlipper extends ViewFlipper {
if (Versions.preHC) {
// Fix bug 956075. Don't allow touching this View if its hidden.
getHitRect(mRect);
mRect.offset((int) ViewHelper.getTranslationX(this), (int) ViewHelper.getTranslationY(this));
mRect.offset((int) ViewHelper.getTranslationX((View)getParent()), (int) ViewHelper.getTranslationY((View)getParent()));
if (!mRect.contains((int) ev.getX(), (int) ev.getY())) {
return false;