Merge "Dismiss sliding key input preview when touch event is canceled"

main
Tadashi G. Takaoka 2012-12-03 23:45:45 -08:00 committed by Android (Google) Code Review
commit 6e9e5635c3
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();