0
0
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:
Ishan09811 2025-01-04 16:18:03 +05:30 committed by GitHub
parent c7b47915dd
commit 0fd9a4cbb0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -25,8 +25,10 @@ class SeekBarPreference(context: Context, attrs: AttributeSet) : DialogPreferenc
context.theme.obtainStyledAttributes(attrs, R.styleable.MaterialSeekBarPreference, 0, 0).apply { context.theme.obtainStyledAttributes(attrs, R.styleable.MaterialSeekBarPreference, 0, 0).apply {
try { try {
isPercentage = getBoolean(R.styleable.MaterialSeekBarPreference_isPercentage, false) isPercentage = getBoolean(R.styleable.MaterialSeekBarPreference_isPercentage, false)
minValue = getString(R.styleable.MaterialSeekBarPreference_minValue, "0").toInt() attrMinValue = getString(R.styleable.MaterialSeekBarPreference_minValue, "0")
maxValue = getString(R.styleable.MaterialSeekBarPreference_maxValue, "100").toInt() attrMaxValue = getString(R.styleable.MaterialSeekBarPreference_maxValue, "100")
minValue = attrMinValue.toInt()
maxValue = attrMaxValue.toInt()
} finally { } finally {
recycle() recycle()
} }