mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-05-14 05:52:47 +00:00
parent
1640b53dfc
commit
ff009beb78
1 changed files with 13 additions and 0 deletions
|
@ -18,12 +18,15 @@ import android.os.Bundle;
|
|||
import androidx.core.graphics.drawable.DrawableCompat;
|
||||
import androidx.preference.Preference;
|
||||
|
||||
import org.dslul.openboard.inputmethod.keyboard.KeyboardSwitcher;
|
||||
import org.dslul.openboard.inputmethod.latin.AudioAndHapticFeedbackManager;
|
||||
import org.dslul.openboard.inputmethod.latin.R;
|
||||
import org.dslul.openboard.inputmethod.latin.RichInputMethodManager;
|
||||
|
||||
public final class PreferencesSettingsFragment extends SubScreenFragment {
|
||||
|
||||
private boolean mReloadKeyboard = false;
|
||||
|
||||
@Override
|
||||
public void onCreate(final Bundle icicle) {
|
||||
super.onCreate(icicle);
|
||||
|
@ -69,6 +72,16 @@ public final class PreferencesSettingsFragment extends SubScreenFragment {
|
|||
@Override
|
||||
public void onSharedPreferenceChanged(final SharedPreferences prefs, final String key) {
|
||||
refreshEnablingsOfKeypressSoundAndVibrationAndHistRetentionSettings();
|
||||
if (Settings.PREF_SHOW_POPUP_HINTS.equals(key))
|
||||
mReloadKeyboard = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPause() {
|
||||
super.onPause();
|
||||
if (mReloadKeyboard)
|
||||
KeyboardSwitcher.getInstance().forceUpdateKeyboardTheme(requireContext());
|
||||
mReloadKeyboard = false;
|
||||
}
|
||||
|
||||
private void refreshEnablingsOfKeypressSoundAndVibrationAndHistRetentionSettings() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue