am d088e0e7: Merge "Don\'t draw key top letter when key preview is showing"
* commit 'd088e0e726b5417607e565687d45a02d33bfc244': Don't draw key top letter when key preview is showingmain
commit
94a69ae864
|
@ -396,6 +396,8 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack
|
||||||
previewTextView.setVisibility(INVISIBLE);
|
previewTextView.setVisibility(INVISIBLE);
|
||||||
mainKeyboardView.mFreeKeyPreviewTextViews.add(previewTextView);
|
mainKeyboardView.mFreeKeyPreviewTextViews.add(previewTextView);
|
||||||
}
|
}
|
||||||
|
// To redraw key top letter.
|
||||||
|
mainKeyboardView.invalidateKey(key);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case MSG_DISMISS_GESTURE_FLOATING_PREVIEW_TEXT:
|
case MSG_DISMISS_GESTURE_FLOATING_PREVIEW_TEXT:
|
||||||
|
@ -1174,6 +1176,12 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack
|
||||||
if (key.altCodeWhileTyping() && key.isEnabled()) {
|
if (key.altCodeWhileTyping() && key.isEnabled()) {
|
||||||
params.mAnimAlpha = mAltCodeKeyWhileTypingAnimAlpha;
|
params.mAnimAlpha = mAltCodeKeyWhileTypingAnimAlpha;
|
||||||
}
|
}
|
||||||
|
// Don't draw key top letter when key preview is showing.
|
||||||
|
if (mShowingKeyPreviewTextViews.containsKey(key)) {
|
||||||
|
// TODO: Fade out animation for the key top letter, and fade in animation for the key
|
||||||
|
// background color when the user presses the key.
|
||||||
|
return;
|
||||||
|
}
|
||||||
final int code = key.getCode();
|
final int code = key.getCode();
|
||||||
if (code == Constants.CODE_SPACE) {
|
if (code == Constants.CODE_SPACE) {
|
||||||
drawSpacebar(key, canvas, paint);
|
drawSpacebar(key, canvas, paint);
|
||||||
|
|
Loading…
Reference in New Issue