diff --git a/library/src/main/java/com/rengwuxian/materialedittext/MaterialEditText.java b/library/src/main/java/com/rengwuxian/materialedittext/MaterialEditText.java index dbad52bd..2e5b59bd 100644 --- a/library/src/main/java/com/rengwuxian/materialedittext/MaterialEditText.java +++ b/library/src/main/java/com/rengwuxian/materialedittext/MaterialEditText.java @@ -1504,8 +1504,8 @@ public boolean onTouchEvent(MotionEvent event) { private boolean insideClearButton(MotionEvent event) { float x = event.getX(); float y = event.getY(); - int startX = getScrollX() + (iconLeftBitmaps == null ? 0 : (iconOuterWidth + iconPadding)); - int endX = getScrollX() + (iconRightBitmaps == null ? getWidth() : getWidth() - iconOuterWidth - iconPadding); + int startX = iconLeftBitmaps == null ? 0 : (iconOuterWidth + iconPadding); + int endX = iconRightBitmaps == null ? getWidth() : getWidth() - iconOuterWidth - iconPadding; int buttonLeft; if (isRTL()) { buttonLeft = startX;