add incognito icon

This commit is contained in:
dslul 2020-09-27 14:34:15 +02:00
parent b7c88b48d6
commit 99f6d392df
18 changed files with 21 additions and 2 deletions

View file

@ -52,6 +52,7 @@ public final class KeyboardIconsSet {
public static final String NAME_PREVIOUS_KEY = "previous_key";
public static final String NAME_TAB_KEY = "tab_key";
public static final String NAME_SHORTCUT_KEY = "shortcut_key";
public static final String NAME_INCOGNITO_KEY = "incognito_key";
public static final String NAME_SHORTCUT_KEY_DISABLED = "shortcut_key_disabled";
public static final String NAME_LANGUAGE_SWITCH_KEY = "language_switch_key";
public static final String NAME_ZWNJ_KEY = "zwnj_key";
@ -79,6 +80,7 @@ public final class KeyboardIconsSet {
NAME_PREVIOUS_KEY, R.styleable.Keyboard_iconPreviousKey,
NAME_TAB_KEY, R.styleable.Keyboard_iconTabKey,
NAME_SHORTCUT_KEY, R.styleable.Keyboard_iconShortcutKey,
NAME_INCOGNITO_KEY, R.styleable.Keyboard_iconIncognitoKey,
NAME_SPACE_KEY_FOR_NUMBER_LAYOUT, R.styleable.Keyboard_iconSpaceKeyForNumberLayout,
NAME_SHIFT_KEY_SHIFTED, R.styleable.Keyboard_iconShiftKeyShifted,
NAME_SHORTCUT_KEY_DISABLED, R.styleable.Keyboard_iconShortcutKeyDisabled,

View file

@ -69,6 +69,7 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick
private final ViewGroup mSuggestionsStrip;
private final ImageButton mVoiceKey;
private final ImageButton mOtherKey;
private final View mImportantNoticeStrip;
MainKeyboardView mMainKeyboardView;
@ -141,6 +142,7 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick
mSuggestionsStrip = findViewById(R.id.suggestions_strip);
mVoiceKey = findViewById(R.id.suggestions_strip_voice_key);
mOtherKey = findViewById(R.id.suggestions_strip_other_key);
mImportantNoticeStrip = findViewById(R.id.important_notice_strip);
mStripVisibilityGroup = new StripVisibilityGroup(this, mSuggestionsStrip,
mImportantNoticeStrip);
@ -176,9 +178,12 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick
final TypedArray keyboardAttr = context.obtainStyledAttributes(attrs,
R.styleable.Keyboard, defStyle, R.style.SuggestionStripView);
final Drawable iconVoice = keyboardAttr.getDrawable(R.styleable.Keyboard_iconShortcutKey);
final Drawable iconIncognito = keyboardAttr.getDrawable(R.styleable.Keyboard_iconIncognitoKey);
keyboardAttr.recycle();
mVoiceKey.setImageDrawable(iconVoice);
mVoiceKey.setOnClickListener(this);
mOtherKey.setImageDrawable(iconIncognito);
}
/**
@ -195,6 +200,7 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick
setVisibility(visibility);
final SettingsValues currentSettingsValues = Settings.getInstance().getCurrent();
mVoiceKey.setVisibility(currentSettingsValues.mShowsVoiceInputKey ? VISIBLE : INVISIBLE);
mOtherKey.setVisibility(currentSettingsValues.mIncognitoModeEnabled ? VISIBLE : INVISIBLE);
}
public void setSuggestions(final SuggestedWords suggestedWords, final boolean isRtlLanguage) {

Binary file not shown.

After

Width:  |  Height:  |  Size: 783 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 937 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 503 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 535 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View file

@ -33,8 +33,14 @@
android:soundEffectsEnabled="false" />
<!-- Provide audio and haptic feedback by ourselves based on the keyboard settings.
We just need to ignore the system's audio and haptic feedback settings. -->
<!-- Provide audio and haptic feedback by ourselves based on the keyboard settings.
We just need to ignore the system's audio and haptic feedback settings. -->
<ImageButton
android:id="@+id/suggestions_strip_other_key"
android:layout_width="@dimen/config_suggestions_strip_edge_key_width"
android:layout_height="fill_parent"
android:layout_alignParentStart="true"
android:layout_centerVertical="true"
style="?attr/suggestionWordStyle"
android:contentDescription="@string/more_keys_strip_description" />
<LinearLayout
android:id="@+id/important_notice_strip"
android:orientation="horizontal"

View file

@ -272,6 +272,7 @@
<attr name="iconPreviousKey" format="reference" />
<attr name="iconTabKey" format="reference" />
<attr name="iconShortcutKey" format="reference" />
<attr name="iconIncognitoKey" format="reference" />
<attr name="iconSpaceKeyForNumberLayout" format="reference" />
<attr name="iconShiftKeyShifted" format="reference" />
<attr name="iconShortcutKeyDisabled" format="reference" />

View file

@ -29,6 +29,7 @@
<item name="iconSearchKey">@drawable/sym_keyboard_search_holo_dark</item>
<item name="iconTabKey">@drawable/sym_keyboard_tab_holo_dark</item>
<item name="iconShortcutKey">@drawable/sym_keyboard_voice_holo_dark</item>
<item name="iconIncognitoKey">@drawable/sym_keyboard_incognito_dark</item>
<item name="iconSpaceKeyForNumberLayout">@drawable/sym_keyboard_space_holo_dark</item>
<item name="iconShiftKeyShifted">@drawable/sym_keyboard_shift_locked_holo_dark</item>
<item name="iconShortcutKeyDisabled">@drawable/sym_keyboard_voice_off_holo_dark</item>

View file

@ -34,6 +34,7 @@
<item name="iconPreviousKey">@drawable/sym_keyboard_previous_lxx_dark</item>
<item name="iconTabKey">@drawable/sym_keyboard_tab_lxx_dark</item>
<item name="iconShortcutKey">@drawable/sym_keyboard_voice_lxx_dark</item>
<item name="iconIncognitoKey">@drawable/sym_keyboard_incognito_dark</item>
<item name="iconSpaceKeyForNumberLayout">@drawable/sym_keyboard_space_lxx_dark</item>
<item name="iconShiftKeyShifted">@drawable/sym_keyboard_shift_locked_lxx_dark</item>
<item name="iconShortcutKeyDisabled">@drawable/sym_keyboard_voice_off_lxx_dark</item>

View file

@ -34,6 +34,7 @@
<item name="iconPreviousKey">@drawable/sym_keyboard_previous_lxx_light</item>
<item name="iconTabKey">@drawable/sym_keyboard_tab_lxx_light</item>
<item name="iconShortcutKey">@drawable/sym_keyboard_voice_lxx_light</item>
<item name="iconIncognitoKey">@drawable/sym_keyboard_incognito_light</item>
<item name="iconSpaceKeyForNumberLayout">@drawable/sym_keyboard_space_lxx_light</item>
<item name="iconShiftKeyShifted">@drawable/sym_keyboard_shift_locked_lxx_light</item>
<item name="iconShortcutKeyDisabled">@drawable/sym_keyboard_voice_off_lxx_light</item>

View file

@ -606,4 +606,5 @@ Tip: You can download and remove dictionaries by going to &lt;b>Languages&#160;&
<string name="space_trackpad">Space bar trackpad</string>
<string name="delete_swipe_summary">Perform a swipe from the delete key to select and remove bigger portions of text at once</string>
<string name="space_trackpad_summary">Swipe on the spacebar to move the cursor</string>
<string name="more_keys_strip_description">More keys</string>
</resources>