mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Merge "Dismiss sliding key input preview when touch event is canceled"
This commit is contained in:
commit
6e9e5635c3
@ -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
Block a user