Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d8273896 authored by Adam Powell's avatar Adam Powell
Browse files

Account for translationY when targeting the fast scroller via touch

Bug 11188512

Change-Id: Ia8e0088760a18d5862bbe1b904610abd908a190e
parent d38b1302
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -42,7 +42,6 @@ import android.view.ViewConfiguration;
import android.view.ViewGroup.LayoutParams;
import android.view.ViewGroupOverlay;
import android.widget.AbsListView.OnScrollListener;

import com.android.internal.R;

/**
@@ -1381,7 +1380,10 @@ class FastScroller {
    }

    private boolean isPointInsideY(float y) {
        return y >= mThumbImage.getTop() && y <= mThumbImage.getBottom();
        final float offset = mThumbImage.getTranslationY();
        final float top = mThumbImage.getTop() + offset;
        final float bottom = mThumbImage.getBottom() + offset;
        return y >= top && y <= bottom;
    }

    /**