mirror of
https://github.com/YTVanced/VancedManager
synced 2024-11-26 21:13:01 +00:00
fixed accent color for slider
This commit is contained in:
parent
9c2b530d4d
commit
8643ced9f4
2 changed files with 8 additions and 3 deletions
|
@ -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)
|
||||
}
|
||||
|
||||
}
|
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue