mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-04-19 13:49:13 +00:00
allow enabling popups on keypress on tablets
still disabled by default, because the popups are too small (size should not be in dp, but in % of screen width or something like that) fixes #799
This commit is contained in:
parent
77f03b0756
commit
f81e24d550
7 changed files with 2 additions and 17 deletions
|
@ -147,7 +147,7 @@ __Planned features and improvements:__
|
|||
__What will _not_ be added:__
|
||||
* Material 3 (not worth adding 1.5 MB to app size)
|
||||
* Dictionaries for more languages (you can still download them)
|
||||
* Anything that requires additional permissions
|
||||
* Anything that requires additional permissions, unless there is a very good reason
|
||||
|
||||
# License
|
||||
|
||||
|
|
|
@ -49,9 +49,6 @@ public final class PreferencesSettingsFragment extends SubScreenFragment {
|
|||
removePreference(Settings.PREF_VIBRATE_ON);
|
||||
removePreference(Settings.PREF_VIBRATION_DURATION_SETTINGS);
|
||||
}
|
||||
if (!Settings.readFromBuildConfigIfToShowKeyPreviewPopupOption(res)) {
|
||||
removePreference(Settings.PREF_POPUP_ON);
|
||||
}
|
||||
|
||||
setupKeypressVibrationDurationSettings();
|
||||
setupKeypressSoundVolumeSettings();
|
||||
|
|
|
@ -303,16 +303,8 @@ public final class Settings implements SharedPreferences.OnSharedPreferenceChang
|
|||
return JniUtils.sHaveGestureLib && prefs.getBoolean(PREF_GESTURE_INPUT, true);
|
||||
}
|
||||
|
||||
public static boolean readFromBuildConfigIfToShowKeyPreviewPopupOption(final Resources res) {
|
||||
return res.getBoolean(R.bool.config_enable_show_key_preview_popup_option);
|
||||
}
|
||||
|
||||
public static boolean readKeyPreviewPopupEnabled(final SharedPreferences prefs, final Resources res) {
|
||||
final boolean defaultKeyPreviewPopup = res.getBoolean(
|
||||
R.bool.config_default_key_preview_popup);
|
||||
if (!readFromBuildConfigIfToShowKeyPreviewPopupOption(res)) {
|
||||
return defaultKeyPreviewPopup;
|
||||
}
|
||||
final boolean defaultKeyPreviewPopup = res.getBoolean(R.bool.config_default_key_preview_popup);
|
||||
return prefs.getBoolean(PREF_POPUP_ON, defaultKeyPreviewPopup);
|
||||
}
|
||||
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
|
||||
<!-- Configuration values for Large Phone. -->
|
||||
<resources>
|
||||
<bool name="config_enable_show_key_preview_popup_option">true</bool>
|
||||
<!-- Whether or not Popup on key press is enabled by default -->
|
||||
<bool name="config_default_key_preview_popup">true</bool>
|
||||
<bool name="config_default_sound_enabled">false</bool>
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
|
||||
<!-- Configuration values for Small Tablet. -->
|
||||
<resources>
|
||||
<bool name="config_enable_show_key_preview_popup_option">false</bool>
|
||||
<!-- Whether or not Popup on key press is enabled by default -->
|
||||
<bool name="config_default_key_preview_popup">false</bool>
|
||||
<bool name="config_default_sound_enabled">false</bool>
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
|
||||
<!-- Configuration values for Large Tablet. -->
|
||||
<resources>
|
||||
<bool name="config_enable_show_key_preview_popup_option">false</bool>
|
||||
<!-- Whether or not Popup on key press is enabled by default -->
|
||||
<bool name="config_default_key_preview_popup">false</bool>
|
||||
<bool name="config_default_sound_enabled">false</bool>
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
|
||||
<!-- Configuration values for Small Phone. -->
|
||||
<resources>
|
||||
<bool name="config_enable_show_key_preview_popup_option">true</bool>
|
||||
<!-- Whether or not Popup on key press is enabled by default -->
|
||||
<bool name="config_default_key_preview_popup">true</bool>
|
||||
<bool name="config_default_sound_enabled">false</bool>
|
||||
|
|
Loading…
Add table
Reference in a new issue