mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-04-24 16:46:35 +00:00
make popup hint optional for both styles
This commit is contained in:
parent
85ecce430e
commit
0497bf4702
6 changed files with 19 additions and 4 deletions
|
@ -161,8 +161,9 @@ public class KeyboardView extends View {
|
||||||
R.styleable.KeyboardView_spacebarIconWidthRatio, 1.0f);
|
R.styleable.KeyboardView_spacebarIconWidthRatio, 1.0f);
|
||||||
mKeyHintLetterPadding = keyboardViewAttr.getDimension(
|
mKeyHintLetterPadding = keyboardViewAttr.getDimension(
|
||||||
R.styleable.KeyboardView_keyHintLetterPadding, 0.0f);
|
R.styleable.KeyboardView_keyHintLetterPadding, 0.0f);
|
||||||
mKeyPopupHintLetter = keyboardViewAttr.getString(
|
mKeyPopupHintLetter = Settings.getInstance().getCurrent().mShowsPopupHints
|
||||||
R.styleable.KeyboardView_keyPopupHintLetter);
|
? keyboardViewAttr.getString(R.styleable.KeyboardView_keyPopupHintLetter)
|
||||||
|
: "";
|
||||||
mKeyPopupHintLetterPadding = keyboardViewAttr.getDimension(
|
mKeyPopupHintLetterPadding = keyboardViewAttr.getDimension(
|
||||||
R.styleable.KeyboardView_keyPopupHintLetterPadding, 0.0f);
|
R.styleable.KeyboardView_keyPopupHintLetterPadding, 0.0f);
|
||||||
mKeyShiftedLetterHintPadding = keyboardViewAttr.getDimension(
|
mKeyShiftedLetterHintPadding = keyboardViewAttr.getDimension(
|
||||||
|
|
|
@ -115,6 +115,7 @@ public final class Settings implements SharedPreferences.OnSharedPreferenceChang
|
||||||
public static final String PREF_SHOW_NUMBER_ROW = "pref_show_number_row";
|
public static final String PREF_SHOW_NUMBER_ROW = "pref_show_number_row";
|
||||||
|
|
||||||
public static final String PREF_SHOW_HINTS = "pref_show_hints";
|
public static final String PREF_SHOW_HINTS = "pref_show_hints";
|
||||||
|
public static final String PREF_SHOW_POPUP_HINTS = "pref_show_popup_hints";
|
||||||
|
|
||||||
public static final String PREF_SPACE_TO_CHANGE_LANG = "prefs_long_press_keyboard_to_change_lang";
|
public static final String PREF_SPACE_TO_CHANGE_LANG = "prefs_long_press_keyboard_to_change_lang";
|
||||||
public static final String PREF_SPACE_LANGUAGE_SLIDE = "pref_space_language_slide";
|
public static final String PREF_SPACE_LANGUAGE_SLIDE = "pref_space_language_slide";
|
||||||
|
|
|
@ -74,6 +74,7 @@ public class SettingsValues {
|
||||||
public final boolean mLanguageSwitchKeyToOtherSubtypes;
|
public final boolean mLanguageSwitchKeyToOtherSubtypes;
|
||||||
public final boolean mShowsNumberRow;
|
public final boolean mShowsNumberRow;
|
||||||
public final boolean mShowsHints;
|
public final boolean mShowsHints;
|
||||||
|
public final boolean mShowsPopupHints;
|
||||||
public final boolean mSpaceForLangChange;
|
public final boolean mSpaceForLangChange;
|
||||||
public final boolean mSpaceLanguageSlide;
|
public final boolean mSpaceLanguageSlide;
|
||||||
public final boolean mShowsEmojiKey;
|
public final boolean mShowsEmojiKey;
|
||||||
|
@ -156,6 +157,7 @@ public class SettingsValues {
|
||||||
mLanguageSwitchKeyToOtherSubtypes = languagePref.equals("internal") || languagePref.equals("both");
|
mLanguageSwitchKeyToOtherSubtypes = languagePref.equals("internal") || languagePref.equals("both");
|
||||||
mShowsNumberRow = prefs.getBoolean(Settings.PREF_SHOW_NUMBER_ROW, false);
|
mShowsNumberRow = prefs.getBoolean(Settings.PREF_SHOW_NUMBER_ROW, false);
|
||||||
mShowsHints = prefs.getBoolean(Settings.PREF_SHOW_HINTS, true);
|
mShowsHints = prefs.getBoolean(Settings.PREF_SHOW_HINTS, true);
|
||||||
|
mShowsPopupHints = prefs.getBoolean(Settings.PREF_SHOW_POPUP_HINTS, false);
|
||||||
mSpaceForLangChange = prefs.getBoolean(Settings.PREF_SPACE_TO_CHANGE_LANG, true);
|
mSpaceForLangChange = prefs.getBoolean(Settings.PREF_SPACE_TO_CHANGE_LANG, true);
|
||||||
mSpaceLanguageSlide = prefs.getBoolean(Settings.PREF_SPACE_LANGUAGE_SLIDE, false);
|
mSpaceLanguageSlide = prefs.getBoolean(Settings.PREF_SPACE_LANGUAGE_SLIDE, false);
|
||||||
mShowsEmojiKey = prefs.getBoolean(Settings.PREF_SHOW_EMOJI_KEY, false);
|
mShowsEmojiKey = prefs.getBoolean(Settings.PREF_SHOW_EMOJI_KEY, false);
|
||||||
|
|
|
@ -228,6 +228,10 @@
|
||||||
<string name="show_hints">Show key hints</string>
|
<string name="show_hints">Show key hints</string>
|
||||||
<!-- Description of the settings to show hints -->
|
<!-- Description of the settings to show hints -->
|
||||||
<string name="show_hints_summary">Show long-press hints</string>
|
<string name="show_hints_summary">Show long-press hints</string>
|
||||||
|
<!-- Title of the settings to show "..." as hints for more functionality on long-press -->
|
||||||
|
<string name="show_popup_hints">Show functional hints</string>
|
||||||
|
<!-- Description of the show_popup_hints setting -->
|
||||||
|
<string name="show_popup_hints_summary">Show hints if long-pressing a key triggers additional functionality</string>
|
||||||
<!-- Title of the settings enabling long press on space key to change IME -->
|
<!-- Title of the settings enabling long press on space key to change IME -->
|
||||||
<string name="prefs_long_press_keyboard_to_change_lang">Change input method with space key</string>
|
<string name="prefs_long_press_keyboard_to_change_lang">Change input method with space key</string>
|
||||||
<!-- Description of the settings to change IME indicating long press triggers change. -->
|
<!-- Description of the settings to change IME indicating long press triggers change. -->
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
<item name="keyHintLabelOffCenterRatio">300%</item>
|
<item name="keyHintLabelOffCenterRatio">300%</item>
|
||||||
<item name="keyLabelFlags">alignHintLabelToBottom</item>
|
<item name="keyLabelFlags">alignHintLabelToBottom</item>
|
||||||
<item name="spacebarIconWidthRatio">0.9</item>
|
<item name="spacebarIconWidthRatio">0.9</item>
|
||||||
<!-- No popup hint letter -->
|
<!-- U+2026: "…" HORIZONTAL ELLIPSIS -->
|
||||||
<item name="keyPopupHintLetter"></item>
|
<item name="keyPopupHintLetter">…</item>
|
||||||
</style>
|
</style>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
@ -27,6 +27,13 @@
|
||||||
android:defaultValue="true"
|
android:defaultValue="true"
|
||||||
android:persistent="true" />
|
android:persistent="true" />
|
||||||
|
|
||||||
|
<SwitchPreferenceCompat
|
||||||
|
android:key="pref_show_popup_hints"
|
||||||
|
android:title="@string/show_popup_hints"
|
||||||
|
android:summary="@string/show_popup_hints_summary"
|
||||||
|
android:defaultValue="false"
|
||||||
|
android:persistent="true" />
|
||||||
|
|
||||||
<SwitchPreferenceCompat
|
<SwitchPreferenceCompat
|
||||||
android:key="vibrate_on"
|
android:key="vibrate_on"
|
||||||
android:title="@string/vibrate_on_keypress"
|
android:title="@string/vibrate_on_keypress"
|
||||||
|
|
Loading…
Add table
Reference in a new issue