add incognito icon
|
@ -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,
|
||||
|
|
|
@ -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) {
|
||||
|
|
BIN
app/src/main/res/drawable-hdpi/sym_keyboard_incognito_dark.png
Normal file
After Width: | Height: | Size: 783 B |
BIN
app/src/main/res/drawable-hdpi/sym_keyboard_incognito_light.png
Normal file
After Width: | Height: | Size: 937 B |
BIN
app/src/main/res/drawable-mdpi/sym_keyboard_incognito_dark.png
Normal file
After Width: | Height: | Size: 503 B |
BIN
app/src/main/res/drawable-mdpi/sym_keyboard_incognito_light.png
Normal file
After Width: | Height: | Size: 535 B |
BIN
app/src/main/res/drawable-xhdpi/sym_keyboard_incognito_dark.png
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
app/src/main/res/drawable-xhdpi/sym_keyboard_incognito_light.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
app/src/main/res/drawable-xxhdpi/sym_keyboard_incognito_dark.png
Normal file
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 2.4 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 1.6 KiB |
|
@ -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"
|
||||
|
|
|
@ -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" />
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -606,4 +606,5 @@ Tip: You can download and remove dictionaries by going to <b>Languages &
|
|||
<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>
|
||||
|
|