Skip to content

Commit

Permalink
Change toggle name and description
Browse files Browse the repository at this point in the history
  • Loading branch information
codokie committed Mar 26, 2024
1 parent e7fa2a2 commit 07b866c
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public final class Settings implements SharedPreferences.OnSharedPreferenceChang
public static final String PREF_BLOCK_POTENTIALLY_OFFENSIVE = "block_potentially_offensive";
public static final String PREF_LANGUAGE_SWITCH_KEY = "language_switch_key";
public static final String PREF_SHOW_EMOJI_KEY = "show_emoji_key";
public static final String PREF_FIX_TOOLBAR_DIRECTION = "fix_toolbar_direction";
public static final String PREF_VARIABLE_TOOLBAR_DIRECTION = "var_toolbar_direction";
public static final String PREF_ADDITIONAL_SUBTYPES = "additional_subtypes";
public static final String PREF_ENABLE_SPLIT_KEYBOARD = "split_keyboard";
public static final String PREF_SPLIT_SPACER_SCALE = "split_spacer_scale";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public class SettingsValues {
public final boolean mShowsPopupHints;
public final boolean mSpaceForLangChange;
public final boolean mShowsEmojiKey;
public final boolean mFixToolbarDirection;
public final boolean mVarToolbarDirection;
public final boolean mUsePersonalizedDicts;
public final boolean mUseDoubleSpacePeriod;
public final boolean mBlockPotentiallyOffensive;
Expand Down Expand Up @@ -151,7 +151,7 @@ public SettingsValues(final Context context, final SharedPreferences prefs, fina
mShowsPopupHints = prefs.getBoolean(Settings.PREF_SHOW_POPUP_HINTS, false);
mSpaceForLangChange = prefs.getBoolean(Settings.PREF_SPACE_TO_CHANGE_LANG, true);
mShowsEmojiKey = prefs.getBoolean(Settings.PREF_SHOW_EMOJI_KEY, false);
mFixToolbarDirection = prefs.getBoolean(Settings.PREF_FIX_TOOLBAR_DIRECTION, true);
mVarToolbarDirection = prefs.getBoolean(Settings.PREF_VARIABLE_TOOLBAR_DIRECTION, true);
mUsePersonalizedDicts = prefs.getBoolean(Settings.PREF_KEY_USE_PERSONALIZED_DICTS, true);
mUseDoubleSpacePeriod = prefs.getBoolean(Settings.PREF_KEY_USE_DOUBLE_SPACE_PERIOD, true)
&& inputAttributes.mIsGeneralTextInput;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ private void updateKeys() {

public void setRtl(final boolean isRtlLanguage) {
final int layoutDirection;
if (Settings.getInstance().getCurrent().mFixToolbarDirection)
if (!Settings.getInstance().getCurrent().mVarToolbarDirection)
layoutDirection = ViewCompat.LAYOUT_DIRECTION_LOCALE;
else{
layoutDirection = isRtlLanguage ? ViewCompat.LAYOUT_DIRECTION_RTL : ViewCompat.LAYOUT_DIRECTION_LTR;
Expand Down
8 changes: 4 additions & 4 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -776,8 +776,8 @@ New dictionary:
<string name="action_none">None</string>
<!-- Option to move the cursor when swiping the spacebar -->
<string name="space_swipe_move_cursor_entry">Move Cursor</string>
<!-- Title of the settings to fix toolbar direction -->
<string name="fix_toolbar_direction">Fix toolbar direction</string>
<!-- Description of the fix_toolbar_direction setting -->
<string name="fix_toolbar_direction_summary">If disabled, the direction of the active layout will be used</string>
<!-- Title of the settings for variable toolbar direction -->
<string name="var_toolbar_direction">Variable toolbar direction</string>
<!-- Description of the variable toolbar direction setting -->
<string name="var_toolbar_direction_summary">Reverse direction when a right-to-left keyboard subtype is selected</string>
</resources>
6 changes: 3 additions & 3 deletions app/src/main/res/xml/prefs_screen_preferences.xml
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@
android:title="@string/toolbar_keys" />

<SwitchPreference
android:key="fix_toolbar_direction"
android:title="@string/fix_toolbar_direction"
android:summary="@string/fix_toolbar_direction_summary"
android:key="var_toolbar_direction"
android:title="@string/var_toolbar_direction"
android:summary="@string/var_toolbar_direction_summary"
android:defaultValue="true"
android:persistent="true" />

Expand Down

0 comments on commit 07b866c

Please sign in to comment.