am 5765561f: am a0993670: am 03709c78: Merge "Text selection: update touch delta when moving towards handles" into mnc-dev
* commit '5765561fa63e102721ef845767543859a28e9d1a': Text selection: update touch delta when moving towards handles
This commit is contained in:
@@ -4157,6 +4157,11 @@ public class Editor {
|
||||
offset = adjustedOffset;
|
||||
}
|
||||
positionCursor = true;
|
||||
} else if (adjustedOffset < mPreviousOffset) {
|
||||
// Handle has jumped to the start of the word, and the user is moving
|
||||
// their finger towards the handle, the delta should be updated.
|
||||
mTouchWordDelta = mTextView.convertToLocalHorizontalCoordinate(x)
|
||||
- layout.getPrimaryHorizontal(mPreviousOffset);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4291,6 +4296,11 @@ public class Editor {
|
||||
offset = adjustedOffset;
|
||||
}
|
||||
positionCursor = true;
|
||||
} else if (adjustedOffset > mPreviousOffset) {
|
||||
// Handle has jumped to the end of the word, and the user is moving
|
||||
// their finger towards the handle, the delta should be updated.
|
||||
mTouchWordDelta = layout.getPrimaryHorizontal(mPreviousOffset)
|
||||
- mTextView.convertToLocalHorizontalCoordinate(x);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user