Cherish:Add left and right virtual buttons while typing [2/2]
Signed-off-by: Hưng Phan <phandinhhungvp2001@gmail.com>
This commit is contained in:
@@ -653,6 +653,8 @@
|
||||
<string name="qs_footer_text_string_summary">Set to empty for default #KeepTheLove</string>
|
||||
|
||||
<!-- Navbar options -->
|
||||
<string name="navigation_bar_arrow_keys_title">Arrow keys</string>
|
||||
<string name="navigation_bar_arrow_keys_summary">Show left & right arrows to control the cursor while typing</string>
|
||||
<string name="navigation_bar_invert_layout_title">Invert layout</string>
|
||||
<string name="navigation_bar_invert_layout_summary">Inverts the layout of the navigation bar and other items, such as the IME switcher</string>
|
||||
<string name="unsupported_gestures">Enable two button or three button navigation to use this feature</string>
|
||||
|
||||
@@ -30,6 +30,12 @@
|
||||
android:fragment="com.android.settings.gestures.SystemNavigationGestureSettings"
|
||||
settings:controller="com.android.settings.gestures.SystemNavigationPreferenceController" />
|
||||
|
||||
<com.cherish.settings.preferences.SystemSettingSwitchPreference
|
||||
android:key="navigation_bar_menu_arrow_keys"
|
||||
android:title="@string/navigation_bar_arrow_keys_title"
|
||||
android:summary="@string/navigation_bar_arrow_keys_summary"
|
||||
android:defaultValue="false" />
|
||||
|
||||
<com.cherish.settings.preferences.SecureSettingSwitchPreference
|
||||
android:key="sysui_nav_bar_inverse"
|
||||
android:icon="@drawable/ic_arrow"
|
||||
|
||||
@@ -58,6 +58,8 @@ public class ButtonSettings extends ActionFragment implements OnPreferenceChange
|
||||
private static final String KEY_BACKLIGHT_TIMEOUT = "backlight_timeout";
|
||||
private static final String HWKEY_DISABLE = "hardware_keys_disable";
|
||||
private static final String PIXEL_ANIMATION_NAVIGATION = "pixel_nav_animation";
|
||||
|
||||
private static final String KEY_NAVIGATION_BAR_ARROWS = "navigation_bar_menu_arrow_keys";
|
||||
private static final String INVERT_NAVIGATION = "sysui_nav_bar_inverse";
|
||||
private static final String NAVBAR_VISIBILITY = "navigation_bar_show_new";
|
||||
|
||||
@@ -90,6 +92,7 @@ public class ButtonSettings extends ActionFragment implements OnPreferenceChange
|
||||
private SwitchPreference mNavbarVisibility;
|
||||
private boolean mIsNavSwitchingMode = false;
|
||||
private Handler mHandler;
|
||||
private SystemSettingSwitchPreference mNavigationArrowKeys;
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle icicle) {
|
||||
@@ -101,6 +104,7 @@ public class ButtonSettings extends ActionFragment implements OnPreferenceChange
|
||||
final PreferenceScreen prefScreen = getPreferenceScreen();
|
||||
|
||||
mNavbarVisibility = (SwitchPreference) findPreference(NAVBAR_VISIBILITY);
|
||||
mNavigationArrowKeys = (SystemSettingSwitchPreference) findPreference(KEY_NAVIGATION_BAR_ARROWS);
|
||||
|
||||
boolean showing = Settings.System.getInt(getContentResolver(),
|
||||
Settings.System.FORCE_SHOW_NAVBAR,
|
||||
|
||||
Reference in New Issue
Block a user