import android.animation.TimeAnimator;
import android.animation.ValueAnimator;
import android.animation.ValueAnimator.AnimatorUpdateListener;
-import android.annotation.ColorInt;
import android.annotation.FloatRange;
import android.annotation.Nullable;
import android.content.Context;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.graphics.Canvas;
-import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.PointF;
import android.graphics.PorterDuff;
@Override
public ExpandableView getChildAtPosition(float touchX, float touchY) {
+ return getChildAtPosition(touchX, touchY, true /* requireMinHeight */);
+
+ }
+
+ /**
+ * Get the child at a certain screen location.
+ *
+ * @param touchX the x coordinate
+ * @param touchY the y coordinate
+ * @param requireMinHeight Whether a minimum height is required for a child to be returned.
+ * @return the child at the given location.
+ */
+ private ExpandableView getChildAtPosition(float touchX, float touchY,
+ boolean requireMinHeight) {
// find the view under the pointer, accounting for GONE views
final int count = getChildCount();
for (int childIdx = 0; childIdx < count; childIdx++) {
int left = 0;
int right = getWidth();
- if (bottom - top >= mMinInteractionHeight
+ if ((bottom - top >= mMinInteractionHeight || !requireMinHeight)
&& touchY >= top && touchY <= bottom && touchX >= left && touchX <= right) {
if (slidingChild instanceof ExpandableNotificationRow) {
ExpandableNotificationRow row = (ExpandableNotificationRow) slidingChild;
case MotionEvent.ACTION_DOWN: {
final int y = (int) ev.getY();
mScrolledToTopOnFirstDown = isScrolledToTop();
- if (getChildAtPosition(ev.getX(), y) == null) {
+ if (getChildAtPosition(ev.getX(), y, false /* requireMinHeight */) == null) {
setIsBeingDragged(false);
recycleVelocityTracker();
break;