Dismiss sliding key input preview when touch event is canceled

This is a follow up of Id807af31.

Bug: 7662486
Change-Id: I13895140f1214592257d0023c1450875a4885ee9
main
Tadashi G. Takaoka 2012-12-04 16:04:21 +09:00
parent 8918cb46f6
commit 08d8a676c2
3 changed files with 11 additions and 1 deletions

View File

@ -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);

View File

@ -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,

View File

@ -220,6 +220,10 @@ public final class PreviewPlacerView extends RelativeLayout {
invalidate();
}
public void dismissSlidingKeyInputPreview() {
mShowSlidingKeyInputPreview = false;
}
@Override
protected void onDetachedFromWindow() {
freeOffscreenBuffer();