mirror of
https://github.com/jrpie/Launcher.git
synced 2025-02-23 06:21:31 +01:00
Limit sensitivity setting to be between 0 and 4
This commit is contained in:
parent
40322bf5ca
commit
cd2a9ed619
2 changed files with 4 additions and 3 deletions
|
@ -166,7 +166,7 @@ class SettingsFragmentLauncher : Fragment(), UIObject {
|
|||
override fun onStartTrackingTouch(p0: SeekBar?) {}
|
||||
override fun onStopTrackingTouch(p0: SeekBar?) {
|
||||
launcherPreferences.edit()
|
||||
.putInt(PREF_SLIDE_SENSITIVITY, p0!!.progress)
|
||||
.putInt(PREF_SLIDE_SENSITIVITY, p0!!.progress * 100 / 4) // scale to %
|
||||
.apply()
|
||||
}
|
||||
}
|
||||
|
@ -252,6 +252,6 @@ class SettingsFragmentLauncher : Fragment(), UIObject {
|
|||
}
|
||||
}
|
||||
|
||||
settings_seekbar_sensitivity.progress = launcherPreferences.getInt(PREF_SLIDE_SENSITIVITY, 50)
|
||||
settings_seekbar_sensitivity.progress = launcherPreferences.getInt(PREF_SLIDE_SENSITIVITY, 2) * 4 / 100
|
||||
}
|
||||
}
|
|
@ -212,7 +212,8 @@
|
|||
android:id="@+id/settings_seekbar_sensitivity"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:progress="50" />
|
||||
android:max="4"
|
||||
android:progress="2" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue