mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-06-02 12:52:15 +00:00
allow customizing text on space bar
fixes #956 fixes #875 (set text to space)
This commit is contained in:
parent
4ddfd2d5a9
commit
8ca65aebc9
6 changed files with 27 additions and 7 deletions
|
@ -164,6 +164,7 @@ public final class Settings implements SharedPreferences.OnSharedPreferenceChang
|
|||
public static final String PREF_ABC_AFTER_CLIP = "abc_after_clip";
|
||||
public static final String PREF_ABC_AFTER_SYMBOL_SPACE = "abc_after_symbol_space";
|
||||
public static final String PREF_REMOVE_REDUNDANT_POPUPS = "remove_redundant_popups";
|
||||
public static final String PREF_SPACE_BAR_TEXT = "space_bar_text";
|
||||
|
||||
// Emoji
|
||||
public static final String PREF_EMOJI_RECENT_KEYS = "emoji_recent_keys";
|
||||
|
|
|
@ -117,6 +117,7 @@ public class SettingsValues {
|
|||
public final boolean mAlphaAfterClipHistoryEntry;
|
||||
public final boolean mAlphaAfterSymbolAndSpace;
|
||||
public final boolean mRemoveRedundantPopups;
|
||||
public final String mSpaceBarText;
|
||||
|
||||
// From the input box
|
||||
@NonNull
|
||||
|
@ -264,6 +265,7 @@ public class SettingsValues {
|
|||
mAlphaAfterClipHistoryEntry = prefs.getBoolean(Settings.PREF_ABC_AFTER_CLIP, false);
|
||||
mAlphaAfterSymbolAndSpace = prefs.getBoolean(Settings.PREF_ABC_AFTER_SYMBOL_SPACE, true);
|
||||
mRemoveRedundantPopups = prefs.getBoolean(Settings.PREF_REMOVE_REDUNDANT_POPUPS, true);
|
||||
mSpaceBarText = prefs.getString(Settings.PREF_SPACE_BAR_TEXT, "");
|
||||
}
|
||||
|
||||
public boolean isApplicationSpecifiedCompletionsOn() {
|
||||
|
|
|
@ -32,8 +32,9 @@ public final class LanguageOnSpacebarUtils {
|
|||
// This utility class is not publicly instantiable.
|
||||
}
|
||||
|
||||
public static int getLanguageOnSpacebarFormatType(
|
||||
@NonNull final RichInputMethodSubtype subtype) {
|
||||
public static int getLanguageOnSpacebarFormatType(@NonNull final RichInputMethodSubtype subtype) {
|
||||
if (!Settings.getInstance().getCurrent().mSpaceBarText.isEmpty())
|
||||
return FORMAT_TYPE_FULL_LOCALE;
|
||||
if (subtype.isNoLanguage()) {
|
||||
return FORMAT_TYPE_FULL_LOCALE;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue