Commit d81d4fb9 authored by Ben Murdoch's avatar Ben Murdoch Committed by Android (Google) Code Review
Browse files

Merge "Cherry-pick "[Android] Don't hide text handles if they are being dragged"" into klp-dev

parents efe95cda 88a35401
......@@ -2214,10 +2214,10 @@ import java.util.Map;
// Makes the insertion/selection handles invisible. They will fade back in shortly after the
// last call to scheduleTextHandleFadeIn (or temporarilyHideTextHandles).
private void temporarilyHideTextHandles() {
if (isSelectionHandleShowing()) {
if (isSelectionHandleShowing() && !mSelectionHandleController.isDragging()) {
mSelectionHandleController.setHandleVisibility(HandleView.INVISIBLE);
}
if (isInsertionHandleShowing()) {
if (isInsertionHandleShowing() && !mInsertionHandleController.isDragging()) {
mInsertionHandleController.setHandleVisibility(HandleView.INVISIBLE);
}
scheduleTextHandleFadeIn();
......
......@@ -72,6 +72,13 @@ public abstract class InsertionHandleController implements CursorController {
showPastePopup();
}
/**
* @return whether the handle is being dragged.
*/
public boolean isDragging() {
return mHandle != null && mHandle.isDragging();
}
/** Shows the handle at the given coordinates, as long as automatic showing is allowed */
public void onCursorPositionChanged() {
if (mAllowAutomaticShowing) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment