mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-04-24 00:26:22 +00:00
Renamed variables from "paste" to "clipboard"
This commit is contained in:
parent
ff7406fb98
commit
e0f95aa5c9
16 changed files with 30 additions and 30 deletions
|
@ -52,7 +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_PASTE_KEY = "paste_key";
|
||||
public static final String NAME_CLIPBOARD_KEY = "clipboard_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";
|
||||
|
@ -81,7 +81,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_PASTE_KEY, R.styleable.Keyboard_iconPasteKey,
|
||||
NAME_CLIPBOARD_KEY, R.styleable.Keyboard_iconClipboardKey,
|
||||
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,
|
||||
|
|
|
@ -1588,11 +1588,11 @@ public class LatinIME extends InputMethodService implements KeyboardActionListen
|
|||
currentSettingsValues.mInputAttributes.mShouldShowSuggestions
|
||||
&& currentSettingsValues.isSuggestionsEnabledPerUserSettings();
|
||||
final boolean shouldShowSuggestionsStripUnlessPassword = currentSettingsValues.mShowsVoiceInputKey
|
||||
|| currentSettingsValues.mShowsPasteKey
|
||||
|| currentSettingsValues.mShowsClipboardKey
|
||||
|| shouldShowSuggestionCandidates
|
||||
|| currentSettingsValues.isApplicationSpecifiedCompletionsOn();
|
||||
final boolean shouldShowSuggestionsStrip = shouldShowSuggestionsStripUnlessPassword
|
||||
&& (!currentSettingsValues.mInputAttributes.mIsPasswordField || currentSettingsValues.mShowsPasteKey);
|
||||
&& (!currentSettingsValues.mInputAttributes.mIsPasswordField || currentSettingsValues.mShowsClipboardKey);
|
||||
mSuggestionStripView.updateVisibility(shouldShowSuggestionsStrip, isFullscreenMode());
|
||||
if (!shouldShowSuggestionsStrip) {
|
||||
return;
|
||||
|
|
|
@ -56,7 +56,7 @@ public final class Settings implements SharedPreferences.OnSharedPreferenceChang
|
|||
// PREF_VOICE_MODE_OBSOLETE is obsolete. Use PREF_VOICE_INPUT_KEY instead.
|
||||
public static final String PREF_VOICE_MODE_OBSOLETE = "voice_mode";
|
||||
public static final String PREF_VOICE_INPUT_KEY = "pref_voice_input_key";
|
||||
public static final String PREF_CLIPBOARD_PASTE_KEY = "pref_clipboard_paste_key";
|
||||
public static final String PREF_CLIPBOARD_CLIPBOARD_KEY = "pref_clipboard_clipboard_key";
|
||||
public static final String PREF_EDIT_PERSONAL_DICTIONARY = "edit_personal_dictionary";
|
||||
// PREF_AUTO_CORRECTION_THRESHOLD_OBSOLETE is obsolete. Use PREF_AUTO_CORRECTION instead.
|
||||
public static final String PREF_AUTO_CORRECTION_THRESHOLD_OBSOLETE =
|
||||
|
@ -78,8 +78,8 @@ public final class Settings implements SharedPreferences.OnSharedPreferenceChang
|
|||
"pref_show_language_switch_key";
|
||||
public static final String PREF_SHOW_EMOJI_KEY =
|
||||
"pref_show_emoji_key";
|
||||
public static final String PREF_SHOW_PASTE_KEY =
|
||||
"pref_show_paste_key";
|
||||
public static final String PREF_SHOW_CLIPBOARD_KEY =
|
||||
"pref_show_clipboard_key";
|
||||
public static final String PREF_INCLUDE_OTHER_IMES_IN_LANGUAGE_SWITCH_LIST =
|
||||
"pref_include_other_imes_in_language_switch_list";
|
||||
public static final String PREF_CUSTOM_INPUT_STYLES = "custom_input_styles";
|
||||
|
|
|
@ -73,7 +73,7 @@ public class SettingsValues {
|
|||
public final boolean mShowsHints;
|
||||
public final boolean mShowsLanguageSwitchKey;
|
||||
public final boolean mShowsEmojiKey;
|
||||
public final boolean mShowsPasteKey;
|
||||
public final boolean mShowsClipboardKey;
|
||||
public final boolean mUsePersonalizedDicts;
|
||||
public final boolean mUseDoubleSpacePeriod;
|
||||
public final boolean mBlockPotentiallyOffensive;
|
||||
|
@ -150,7 +150,7 @@ public class SettingsValues {
|
|||
mShowsHints = prefs.getBoolean(Settings.PREF_SHOW_HINTS, true);
|
||||
mShowsLanguageSwitchKey = prefs.getBoolean(Settings.PREF_SHOW_LANGUAGE_SWITCH_KEY, false);
|
||||
mShowsEmojiKey = prefs.getBoolean(Settings.PREF_SHOW_EMOJI_KEY, false);
|
||||
mShowsPasteKey = prefs.getBoolean(Settings.PREF_SHOW_PASTE_KEY, false);
|
||||
mShowsClipboardKey = prefs.getBoolean(Settings.PREF_SHOW_CLIPBOARD_KEY, false);
|
||||
mUsePersonalizedDicts = prefs.getBoolean(Settings.PREF_KEY_USE_PERSONALIZED_DICTS, true);
|
||||
mUseDoubleSpacePeriod = prefs.getBoolean(Settings.PREF_KEY_USE_DOUBLE_SPACE_PERIOD, true)
|
||||
&& inputAttributes.mIsGeneralTextInput;
|
||||
|
|
|
@ -70,7 +70,7 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick
|
|||
|
||||
private final ViewGroup mSuggestionsStrip;
|
||||
private final ImageButton mVoiceKey;
|
||||
private final ImageButton mPasteKey;
|
||||
private final ImageButton mClipboardKey;
|
||||
private final ImageButton mOtherKey;
|
||||
MainKeyboardView mMainKeyboardView;
|
||||
|
||||
|
@ -131,7 +131,7 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick
|
|||
|
||||
mSuggestionsStrip = findViewById(R.id.suggestions_strip);
|
||||
mVoiceKey = findViewById(R.id.suggestions_strip_voice_key);
|
||||
mPasteKey = findViewById(R.id.suggestions_strip_paste_key);
|
||||
mClipboardKey = findViewById(R.id.suggestions_strip_clipboard_key);
|
||||
mOtherKey = findViewById(R.id.suggestions_strip_other_key);
|
||||
mStripVisibilityGroup = new StripVisibilityGroup(this, mSuggestionsStrip);
|
||||
|
||||
|
@ -167,13 +167,13 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick
|
|||
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);
|
||||
final Drawable iconPaste = keyboardAttr.getDrawable(R.styleable.Keyboard_iconPasteKey);
|
||||
final Drawable iconClipboard = keyboardAttr.getDrawable(R.styleable.Keyboard_iconClipboardKey);
|
||||
keyboardAttr.recycle();
|
||||
mVoiceKey.setImageDrawable(iconVoice);
|
||||
mVoiceKey.setOnClickListener(this);
|
||||
mPasteKey.setImageDrawable(iconPaste);
|
||||
mPasteKey.setOnClickListener(this);
|
||||
mPasteKey.setOnLongClickListener(this);
|
||||
mClipboardKey.setImageDrawable(iconClipboard);
|
||||
mClipboardKey.setOnClickListener(this);
|
||||
mClipboardKey.setOnLongClickListener(this);
|
||||
|
||||
mOtherKey.setImageDrawable(iconIncognito);
|
||||
}
|
||||
|
@ -192,7 +192,7 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick
|
|||
setVisibility(visibility);
|
||||
final SettingsValues currentSettingsValues = Settings.getInstance().getCurrent();
|
||||
mVoiceKey.setVisibility(currentSettingsValues.mShowsVoiceInputKey ? VISIBLE : GONE);
|
||||
mPasteKey.setVisibility(currentSettingsValues.mShowsPasteKey ? VISIBLE : (mVoiceKey.getVisibility() == GONE ? INVISIBLE : GONE));
|
||||
mClipboardKey.setVisibility(currentSettingsValues.mShowsClipboardKey ? VISIBLE : (mVoiceKey.getVisibility() == GONE ? INVISIBLE : GONE));
|
||||
mOtherKey.setVisibility(currentSettingsValues.mIncognitoModeEnabled ? VISIBLE : INVISIBLE);
|
||||
}
|
||||
|
||||
|
@ -267,7 +267,7 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick
|
|||
|
||||
@Override
|
||||
public boolean onLongClick(final View view) {
|
||||
if (view == mPasteKey) {
|
||||
if (view == mClipboardKey) {
|
||||
ClipboardManager clipboardManager = (ClipboardManager) getContext().getSystemService(Context.CLIPBOARD_SERVICE);
|
||||
ClipData clipData = clipboardManager.getPrimaryClip();
|
||||
if (clipData != null && clipData.getItemCount() > 0 && clipData.getItemAt(0) != null) {
|
||||
|
@ -441,7 +441,7 @@ public final class SuggestionStripView extends RelativeLayout implements OnClick
|
|||
false /* isKeyRepeat */);
|
||||
return;
|
||||
}
|
||||
if (view == mPasteKey) {
|
||||
if (view == mClipboardKey) {
|
||||
CharSequence selectionSequence = mListener.getSelection();
|
||||
if (selectionSequence != null && selectionSequence.length() > 0
|
||||
&& !Settings.getInstance().getCurrent().mInputAttributes.mIsPasswordField) {
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
android:contentDescription="@string/spoken_description_mic"
|
||||
style="?attr/suggestionWordStyle" />
|
||||
<ImageButton
|
||||
android:id="@+id/suggestions_strip_paste_key"
|
||||
android:id="@+id/suggestions_strip_clipboard_key"
|
||||
android:layout_width="@dimen/config_suggestions_strip_edge_key_width"
|
||||
android:scaleType="fitCenter"
|
||||
android:layout_height="fill_parent"
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
<item name="iconPreviousKey">@drawable/sym_keyboard_previous_lxx_dark</item>
|
||||
<item name="iconShortcutKey">@drawable/sym_keyboard_voice_lxx_dark</item>
|
||||
<item name="iconShortcutKeyDisabled">@drawable/sym_keyboard_voice_off_lxx_dark</item>
|
||||
<item name="iconPasteKey">@drawable/sym_keyboard_paste_dark</item>
|
||||
<item name="iconClipboardKey">@drawable/sym_keyboard_clipboard_dark</item>
|
||||
<item name="iconIncognitoKey">@drawable/sym_keyboard_incognito_lxx_dark</item>
|
||||
<item name="iconSpaceKeyForNumberLayout">@drawable/sym_keyboard_space_lxx_dark</item>
|
||||
<item name="iconLanguageSwitchKey">@drawable/sym_keyboard_language_switch_lxx_dark</item>
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
<item name="iconPreviousKey">@drawable/sym_keyboard_previous_lxx_light</item>
|
||||
<item name="iconShortcutKey">@drawable/sym_keyboard_voice_lxx_light</item>
|
||||
<item name="iconShortcutKeyDisabled">@drawable/sym_keyboard_voice_off_lxx_light</item>
|
||||
<item name="iconPasteKey">@drawable/sym_keyboard_paste_light</item>
|
||||
<item name="iconClipboardKey">@drawable/sym_keyboard_clipboard_light</item>
|
||||
<item name="iconIncognitoKey">@drawable/sym_keyboard_incognito_lxx_light</item>
|
||||
<item name="iconSpaceKeyForNumberLayout">@drawable/sym_keyboard_space_lxx_light</item>
|
||||
<item name="iconLanguageSwitchKey">@drawable/sym_keyboard_language_switch_lxx_light</item>
|
||||
|
|
|
@ -270,7 +270,7 @@
|
|||
<attr name="iconPreviousKey" format="reference" />
|
||||
<attr name="iconTabKey" format="reference" />
|
||||
<attr name="iconShortcutKey" format="reference" />
|
||||
<attr name="iconPasteKey" format="reference" />
|
||||
<attr name="iconClipboardKey" format="reference" />
|
||||
<attr name="iconIncognitoKey" format="reference" />
|
||||
<attr name="iconSpaceKeyForNumberLayout" format="reference" />
|
||||
<attr name="iconShiftKeyShifted" format="reference" />
|
||||
|
|
|
@ -29,7 +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="iconPasteKey">@drawable/sym_keyboard_paste_dark</item>
|
||||
<item name="iconClipboardKey">@drawable/sym_keyboard_clipboard_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>
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
<item name="iconPreviousKey">@drawable/sym_keyboard_previous_lxx_dark</item>
|
||||
<item name="iconShortcutKey">@drawable/sym_keyboard_voice_lxx_dark</item>
|
||||
<item name="iconShortcutKeyDisabled">@drawable/sym_keyboard_voice_off_lxx_dark</item>
|
||||
<item name="iconPasteKey">@drawable/sym_keyboard_paste_dark</item>
|
||||
<item name="iconClipboardKey">@drawable/sym_keyboard_clipboard_dark</item>
|
||||
<item name="iconIncognitoKey">@drawable/sym_keyboard_incognito_lxx_dark</item>
|
||||
<item name="iconSpaceKeyForNumberLayout">@drawable/sym_keyboard_space_lxx_dark</item>
|
||||
<item name="iconLanguageSwitchKey">@drawable/sym_keyboard_language_switch_lxx_dark</item>
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
<item name="iconPreviousKey">@drawable/sym_keyboard_previous_lxx_light</item>
|
||||
<item name="iconShortcutKey">@drawable/sym_keyboard_voice_lxx_light</item>
|
||||
<item name="iconShortcutKeyDisabled">@drawable/sym_keyboard_voice_off_lxx_light</item>
|
||||
<item name="iconPasteKey">@drawable/sym_keyboard_paste_light</item>
|
||||
<item name="iconClipboardKey">@drawable/sym_keyboard_clipboard_light</item>
|
||||
<item name="iconIncognitoKey">@drawable/sym_keyboard_incognito_lxx_light</item>
|
||||
<item name="iconSpaceKeyForNumberLayout">@drawable/sym_keyboard_space_lxx_light</item>
|
||||
<item name="iconLanguageSwitchKey">@drawable/sym_keyboard_language_switch_lxx_light</item>
|
||||
|
|
|
@ -180,8 +180,8 @@
|
|||
<string name="voice_input_disabled_summary">No voice input methods enabled. Check Languages & input settings.</string>
|
||||
|
||||
<!-- Preferences item for enabling pasting from keyboard -->
|
||||
<string name="show_paste_key">Clipboard paste key</string>
|
||||
<string name="show_paste_key_summary">Press to copy, long-press to paste.</string>
|
||||
<string name="show_clipboard_key">Clipboard key</string>
|
||||
<string name="show_clipboard_key_summary">Press to copy, long-press to paste.</string>
|
||||
|
||||
<!-- Title for configuring input method settings [CHAR LIMIT=35] -->
|
||||
<string name="configure_input_method">Configure input methods</string>
|
||||
|
|
|
@ -72,9 +72,9 @@
|
|||
android:defaultValue="true"
|
||||
android:persistent="true" />
|
||||
<CheckBoxPreference
|
||||
android:key="pref_show_paste_key"
|
||||
android:title="@string/show_paste_key"
|
||||
android:summary="@string/show_paste_key_summary"
|
||||
android:key="pref_show_clipboard_key"
|
||||
android:title="@string/show_clipboard_key"
|
||||
android:summary="@string/show_clipboard_key_summary"
|
||||
android:defaultValue="false"
|
||||
android:persistent="true" />
|
||||
</PreferenceScreen>
|
||||
|
|
Loading…
Add table
Reference in a new issue