Merge "Fix selection expansion detection logic."

This commit is contained in:
Keisuke Kuroyanagi
2015-12-10 07:18:21 +00:00
committed by Android (Google) Code Review
3 changed files with 44 additions and 5 deletions

View File

@@ -4299,10 +4299,15 @@ public class Editor {
boolean isExpanding;
final float xDiff = x - mPrevX;
if (atRtl == isStartHandle()) {
isExpanding = xDiff > 0 || currLine > mPreviousLineTouched;
if (isStartHandle()) {
isExpanding = currLine < mPreviousLineTouched;
} else {
isExpanding = xDiff < 0 || currLine < mPreviousLineTouched;
isExpanding = currLine > mPreviousLineTouched;
}
if (atRtl == isStartHandle()) {
isExpanding |= xDiff > 0;
} else {
isExpanding |= xDiff < 0;
}
if (mTextView.getHorizontallyScrolling()) {