mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Fix swipe trail disappearing on theme change
This commit is contained in:
parent
d62b733412
commit
43984a6a76
@ -95,6 +95,7 @@ public final class KeyboardSwitcher implements KeyboardState.SwitchActions {
|
||||
if (themeUpdated && mKeyboardView != null) {
|
||||
((LatinIME)mLatinIMELegacy.getInputMethodService()).updateLegacyView(onCreateInputView(
|
||||
displayContext, mIsHardwareAcceleratedDrawingEnabled));
|
||||
mLatinIMELegacy.updateMainKeyboardViewSettings();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -943,6 +943,22 @@ public class LatinIMELegacy implements KeyboardActionListener,
|
||||
mHandler.postSwitchLanguage(newSubtype);
|
||||
}
|
||||
|
||||
public void updateMainKeyboardViewSettings() {
|
||||
final MainKeyboardView mainKeyboardView = mKeyboardSwitcher.getMainKeyboardView();
|
||||
SettingsValues currentSettingsValues = mSettings.getCurrent();
|
||||
|
||||
mainKeyboardView.setMainDictionaryAvailability(
|
||||
mDictionaryFacilitator.hasAtLeastOneInitializedMainDictionary());
|
||||
mainKeyboardView.setKeyPreviewPopupEnabled(currentSettingsValues.mKeyPreviewPopupOn,
|
||||
currentSettingsValues.mKeyPreviewPopupDismissDelay);
|
||||
mainKeyboardView.setSlidingKeyInputPreviewEnabled(
|
||||
currentSettingsValues.mSlidingKeyInputPreviewEnabled);
|
||||
mainKeyboardView.setGestureHandlingEnabledByUser(
|
||||
currentSettingsValues.mGestureInputEnabled,
|
||||
currentSettingsValues.mGestureTrailEnabled,
|
||||
currentSettingsValues.mGestureFloatingPreviewTextEnabled);
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
void onStartInputViewInternal(final EditorInfo editorInfo, final boolean restarting) {
|
||||
mDictionaryFacilitator.onStartInput();
|
||||
@ -1098,16 +1114,7 @@ public class LatinIMELegacy implements KeyboardActionListener,
|
||||
|
||||
mHandler.cancelUpdateSuggestionStrip();
|
||||
|
||||
mainKeyboardView.setMainDictionaryAvailability(
|
||||
mDictionaryFacilitator.hasAtLeastOneInitializedMainDictionary());
|
||||
mainKeyboardView.setKeyPreviewPopupEnabled(currentSettingsValues.mKeyPreviewPopupOn,
|
||||
currentSettingsValues.mKeyPreviewPopupDismissDelay);
|
||||
mainKeyboardView.setSlidingKeyInputPreviewEnabled(
|
||||
currentSettingsValues.mSlidingKeyInputPreviewEnabled);
|
||||
mainKeyboardView.setGestureHandlingEnabledByUser(
|
||||
currentSettingsValues.mGestureInputEnabled,
|
||||
currentSettingsValues.mGestureTrailEnabled,
|
||||
currentSettingsValues.mGestureFloatingPreviewTextEnabled);
|
||||
updateMainKeyboardViewSettings();
|
||||
|
||||
if (TRACE) Debug.startMethodTracing("/data/trace/latinime");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user