Dismiss sliding key input preview when touch event is canceled
This is a follow up of Id807af31. Bug: 7662486 Change-Id: I13895140f1214592257d0023c1450875a4885ee9main
parent
8918cb46f6
commit
08d8a676c2
|
@ -860,6 +860,11 @@ public class KeyboardView extends View implements PointerTracker.DrawingProxy {
|
|||
mPreviewPlacerView.showSlidingKeyInputPreview(tracker);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dismissSlidingKeyInputPreview() {
|
||||
mPreviewPlacerView.dismissSlidingKeyInputPreview();
|
||||
}
|
||||
|
||||
public void showGestureFloatingPreviewText(final String gestureFloatingPreviewText) {
|
||||
locatePreviewPlacerView();
|
||||
mPreviewPlacerView.setGestureFloatingPreviewText(gestureFloatingPreviewText);
|
||||
|
|
|
@ -82,6 +82,7 @@ public final class PointerTracker implements PointerTrackerQueue.Element {
|
|||
public void showKeyPreview(PointerTracker tracker);
|
||||
public void dismissKeyPreview(PointerTracker tracker);
|
||||
public void showSlidingKeyInputPreview(PointerTracker tracker);
|
||||
public void dismissSlidingKeyInputPreview();
|
||||
public void showGesturePreviewTrail(PointerTracker tracker, boolean isOldestTracker);
|
||||
}
|
||||
|
||||
|
@ -881,7 +882,7 @@ public final class PointerTracker implements PointerTrackerQueue.Element {
|
|||
private void resetSlidingKeyInput() {
|
||||
mIsInSlidingKeyInput = false;
|
||||
mIsInSlidingKeyInputFromModifier = false;
|
||||
mDrawingProxy.showSlidingKeyInputPreview(this);
|
||||
mDrawingProxy.dismissSlidingKeyInputPreview();
|
||||
}
|
||||
|
||||
private void onGestureMoveEvent(final int x, final int y, final long eventTime,
|
||||
|
|
|
@ -220,6 +220,10 @@ public final class PreviewPlacerView extends RelativeLayout {
|
|||
invalidate();
|
||||
}
|
||||
|
||||
public void dismissSlidingKeyInputPreview() {
|
||||
mShowSlidingKeyInputPreview = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDetachedFromWindow() {
|
||||
freeOffscreenBuffer();
|
||||
|
|
Loading…
Reference in New Issue