fixed accent color for slider

This commit is contained in:
X1nto 2021-02-03 23:43:41 +04:00
parent 9c2b530d4d
commit 8643ced9f4
2 changed files with 8 additions and 3 deletions

View File

@ -7,14 +7,18 @@ import com.google.android.material.slider.Slider
import com.vanced.manager.utils.defPrefs
import com.vanced.manager.utils.managerAccent
class ThemedMaterialSlider@JvmOverloads constructor(
class ThemedMaterialSlider @JvmOverloads constructor(
context: Context,
attributeSet: AttributeSet? = null,
defStyleAttr: Int = 0
) : Slider(context, attributeSet, defStyleAttr) {
init {
thumbStrokeColor = ColorStateList.valueOf(context.defPrefs.managerAccent)
val accentValue = ColorStateList.valueOf(context.defPrefs.managerAccent)
thumbTintList = accentValue
trackActiveTintList = accentValue
trackInactiveTintList = accentValue.withAlpha(70)
haloTintList = accentValue.withAlpha(60)
}
}

View File

@ -21,7 +21,8 @@
android:layout_below="@id/serviced_header"
android:layout_marginTop="24dp"
android:valueFrom="1"
android:valueTo="15"/>
android:valueTo="15"
app:haloColor=""/>
<RelativeLayout
android:layout_width="match_parent"