Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2308ec74 authored by Georg Veichtlbauer's avatar Georg Veichtlbauer
Browse files

LatinIME: Add option to always show the emoji key

Change-Id: I5951524caba8413e9a0244ddc43869b4d1c97007
parent a480ba69
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -503,6 +503,7 @@
        <attr name="clobberSettingsKey" format="boolean" />
        <attr name="hasShortcutKey" format="boolean" />
        <attr name="numberRowEnabled" format="boolean" />
        <attr name="emojiKeyEnabled" format="boolean" />
        <attr name="languageSwitchKeyEnabled" format="boolean" />
        <attr name="isMultiLine" format="boolean" />
        <attr name="imeAction" format="enum">
+4 −0
Original line number Diff line number Diff line
@@ -43,4 +43,8 @@ disposition rather than other common dispositions for Latin languages. [CHAR LIM
    <!-- Preference item for enabling longpress key hints -->
    <string name="show_longpress_hints">Show long-press key hints</string>
    <string name="show_longpress_hints_summary">Shows long-press hints for supported keys</string>

    <!-- Preference item for always showing the emoji key -->
    <string name="show_emoji_key">Show emoji key</string>
    <string name="show_emoji_key_summary">Always show emoji key. When this option is enabled, the language switch key cannot be shown.</string>
</resources>
+10 −0
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@
                latin:keyStyle="zwnjKeyStyle" />
        </case>
        <case
            latin:emojiKeyEnabled="false"
            latin:languageSwitchKeyEnabled="true"
        >
            <Key
@@ -53,6 +54,15 @@
                latin:keyStyle="spaceKeyStyle"
                latin:keyWidth="40%p" />
        </case>
        <case
            latin:emojiKeyEnabled="true"
        >
            <Key
                latin:keyStyle="emojiKeyStyle" />
            <Key
                latin:keyStyle="spaceKeyStyle"
                latin:keyWidth="40%p" />
        </case>
        <!-- languageSwitchKeyEnabled="false" -->
        <default>
            <Key
+6 −0
Original line number Diff line number Diff line
@@ -30,6 +30,12 @@
        android:summary="@string/number_row_summary"
        android:defaultValue="false"
        android:persistent="true" />
    <CheckBoxPreference
        android:key="pref_show_emoji_key"
        android:title="@string/show_emoji_key"
        android:summary="@string/show_emoji_key_summary"
        android:defaultValue="false"
        android:persistent="true" />
    <CheckBoxPreference
        android:key="pref_show_longpress_hints"
        android:title="@string/show_longpress_hints"
+5 −0
Original line number Diff line number Diff line
@@ -80,6 +80,7 @@ public final class KeyboardId {
    public final boolean mClobberSettingsKey;
    public final boolean mNumberRowEnabled;
    public final boolean mLanguageSwitchKeyEnabled;
    public final boolean mEmojiKeyEnabled;
    public final String mCustomActionLabel;
    public final boolean mHasShortcutKey;
    public final boolean mIsSplitLayout;
@@ -96,6 +97,7 @@ public final class KeyboardId {
        mClobberSettingsKey = params.mNoSettingsKey;
        mNumberRowEnabled = params.mNumberRowEnabled;
        mLanguageSwitchKeyEnabled = params.mLanguageSwitchKeyEnabled;
        mEmojiKeyEnabled = params.mEmojiKeyEnabled;
        mCustomActionLabel = (mEditorInfo.actionLabel != null)
                ? mEditorInfo.actionLabel.toString() : null;
        mHasShortcutKey = params.mVoiceInputKeyEnabled;
@@ -115,6 +117,7 @@ public final class KeyboardId {
                id.mNumberRowEnabled,
                id.mHasShortcutKey,
                id.mLanguageSwitchKeyEnabled,
                id.mEmojiKeyEnabled,
                id.isMultiLine(),
                id.imeAction(),
                id.mCustomActionLabel,
@@ -137,6 +140,7 @@ public final class KeyboardId {
                && other.mNumberRowEnabled == mNumberRowEnabled
                && other.mHasShortcutKey == mHasShortcutKey
                && other.mLanguageSwitchKeyEnabled == mLanguageSwitchKeyEnabled
                && other.mEmojiKeyEnabled == mEmojiKeyEnabled
                && other.isMultiLine() == isMultiLine()
                && other.imeAction() == imeAction()
                && TextUtils.equals(other.mCustomActionLabel, mCustomActionLabel)
@@ -208,6 +212,7 @@ public final class KeyboardId {
                (passwordInput() ? " passwordInput" : ""),
                (mHasShortcutKey ? " hasShortcutKey" : ""),
                (mLanguageSwitchKeyEnabled ? " languageSwitchKeyEnabled" : ""),
                (mEmojiKeyEnabled ? " emojiKeyEnabled" : ""),
                (isMultiLine() ? " isMultiLine" : ""),
                (mIsSplitLayout ? " isSplitLayout" : "")
        );
Loading