mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
* commit 'bb8f6fc4c755ed1a3a1b433fac34c4f9fdd694dc': Fix graying animation of alt-code keys when space/enter is typed
This commit is contained in:
commit
3983196461
@ -370,7 +370,9 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack
|
|||||||
// When user hits the space or the enter key, just cancel the while-typing timer.
|
// When user hits the space or the enter key, just cancel the while-typing timer.
|
||||||
final int typedCode = typedKey.mCode;
|
final int typedCode = typedKey.mCode;
|
||||||
if (typedCode == Constants.CODE_SPACE || typedCode == Constants.CODE_ENTER) {
|
if (typedCode == Constants.CODE_SPACE || typedCode == Constants.CODE_ENTER) {
|
||||||
startWhileTypingFadeinAnimation(keyboardView);
|
if (isTyping) {
|
||||||
|
startWhileTypingFadeinAnimation(keyboardView);
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -614,8 +616,18 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack
|
|||||||
|
|
||||||
@ExternallyReferenced
|
@ExternallyReferenced
|
||||||
public void setAltCodeKeyWhileTypingAnimAlpha(final int alpha) {
|
public void setAltCodeKeyWhileTypingAnimAlpha(final int alpha) {
|
||||||
|
if (mAltCodeKeyWhileTypingAnimAlpha == alpha) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// Update the visual of alt-code-key-while-typing.
|
||||||
mAltCodeKeyWhileTypingAnimAlpha = alpha;
|
mAltCodeKeyWhileTypingAnimAlpha = alpha;
|
||||||
updateAltCodeKeyWhileTyping();
|
final Keyboard keyboard = getKeyboard();
|
||||||
|
if (keyboard == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
for (final Key key : keyboard.mAltCodeKeysWhileTyping) {
|
||||||
|
invalidateKey(key);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setKeyboardActionListener(final KeyboardActionListener listener) {
|
public void setKeyboardActionListener(final KeyboardActionListener listener) {
|
||||||
@ -1282,16 +1294,6 @@ public final class MainKeyboardView extends KeyboardView implements PointerTrack
|
|||||||
invalidateKey(shortcutKey);
|
invalidateKey(shortcutKey);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateAltCodeKeyWhileTyping() {
|
|
||||||
final Keyboard keyboard = getKeyboard();
|
|
||||||
if (keyboard == null) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
for (final Key key : keyboard.mAltCodeKeysWhileTyping) {
|
|
||||||
invalidateKey(key);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void startDisplayLanguageOnSpacebar(final boolean subtypeChanged,
|
public void startDisplayLanguageOnSpacebar(final boolean subtypeChanged,
|
||||||
final boolean needsToDisplayLanguage, final boolean hasMultipleEnabledIMEsOrSubtypes) {
|
final boolean needsToDisplayLanguage, final boolean hasMultipleEnabledIMEsOrSubtypes) {
|
||||||
mNeedsToDisplayLanguage = needsToDisplayLanguage;
|
mNeedsToDisplayLanguage = needsToDisplayLanguage;
|
||||||
|
Loading…
Reference in New Issue
Block a user