mirror of
https://github.com/Ishan09811/pine.git
synced 2025-04-28 09:35:08 +00:00
Update SeekBarPreference.kt
This commit is contained in:
parent
863919bf5e
commit
43bab98944
@ -2,6 +2,7 @@
|
||||
package emu.skyline.preference
|
||||
|
||||
import android.content.Context
|
||||
import android.content.res.TypedArray
|
||||
import android.util.AttributeSet
|
||||
import android.util.Log
|
||||
import android.view.LayoutInflater
|
||||
@ -80,7 +81,7 @@ class SeekBarPreference(context: Context, attrs: AttributeSet) : DialogPreferenc
|
||||
.setNegativeButton(android.R.string.cancel, null)
|
||||
.setOnDismissListener {
|
||||
if (dismissTrigger != "positive_button")
|
||||
slider.value = summary?.toString()?.replace("%", "")?.toIntOrNull()?.toFloat() ?: fallbackValue.toFloat()
|
||||
slider.value = summary?.toString()?.replace("%", "")?.toIntOrNull()?.toFloat() ?: minValue.toFloat()
|
||||
}
|
||||
.show()
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user