Skip to content

Commit

Permalink
fixed Fatal Exception: java.lang.IndexOutOfBoundsException
Browse files Browse the repository at this point in the history
      charAt: 122 >= length 0
  • Loading branch information
tranleduy2000 committed Jun 7, 2018
1 parent 9f87398 commit fc3969b
Showing 1 changed file with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,15 @@ public boolean performLongClick() {

@Override
public boolean onTouchEvent(MotionEvent ev) {
if (!hasSelection() && mScaleDetector != null && mPreferences.isTouchScaleTextSize()) {
mScaleDetector.onTouchEvent(ev);
}
try {
if (!hasSelection() && mScaleDetector != null && mPreferences.isTouchScaleTextSize()) {
mScaleDetector.onTouchEvent(ev);
}

if (mGestureDetector != null) {
mGestureDetector.onTouchEvent(ev);
if (mGestureDetector != null) {
mGestureDetector.onTouchEvent(ev);
}
} catch (Exception e) {
}
return super.onTouchEvent(ev);
}
Expand Down Expand Up @@ -151,6 +154,7 @@ public void computeScroll() {
super.computeScroll();
}
}

/**
* @see GestureDetector.OnGestureListener#onFling(MotionEvent,
* MotionEvent, float, float)
Expand Down

0 comments on commit fc3969b

Please sign in to comment.