2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-31 06:05:12 +00:00

Add gyro sensitivity pref

This commit is contained in:
Jakub Wiśnia
2023-04-25 01:46:09 +02:00
committed by Albert Vaca Cintora
parent 118a35c304
commit c15469f477
2 changed files with 9 additions and 2 deletions

View File

@@ -61,7 +61,14 @@
android:id="@+id/gyro_mouse_enabled"
android:defaultValue="false"
android:key="@string/gyro_mouse_enabled"
android:title="Gyro mouse" />
android:title="@string/gyro_mouse_enabled_title" />
<SeekBarPreference
android:id="@+id/mousepad_gyro_sensitivity"
android:defaultValue="100"
android:key="@string/gyro_mouse_sensitivity"
android:title="@string/gyro_mouse_sensitivity_title"
android:layout_width="wrap_content" />
<SwitchPreference
android:id="@+id/mousepad_mouse_buttons_enabled_pref"

View File

@@ -478,7 +478,7 @@ public class MousePadActivity
}
allowGyro = isGyroSensorAvailable() && prefs.getBoolean(getString(R.string.gyro_mouse_enabled), false);
if (allowGyro) gyroscopeSensitivity = prefs.getInt(getString(R.string.gyro_mouse_sensitivity),100);
if (allowGyro) gyroscopeSensitivity = prefs.getInt(getString(R.string.gyro_mouse_sensitivity), 100);
String singleTapSetting = prefs.getString(getString(R.string.mousepad_single_tap_key),
getString(R.string.mousepad_default_single));