themed slider
This commit is contained in:
parent
f9c174dbf9
commit
671f192f5b
|
@ -0,0 +1,20 @@
|
||||||
|
package com.vanced.manager.ui.core
|
||||||
|
|
||||||
|
import android.content.Context
|
||||||
|
import android.content.res.ColorStateList
|
||||||
|
import android.util.AttributeSet
|
||||||
|
import com.google.android.material.slider.Slider
|
||||||
|
import com.vanced.manager.utils.Extensions.getDefaultPrefs
|
||||||
|
import com.vanced.manager.utils.ThemeHelper
|
||||||
|
|
||||||
|
class ThemedMaterialSlider@JvmOverloads constructor(
|
||||||
|
context: Context,
|
||||||
|
attributeSet: AttributeSet? = null,
|
||||||
|
defStyleAttr: Int = 0
|
||||||
|
) : Slider(context, attributeSet, defStyleAttr) {
|
||||||
|
|
||||||
|
init {
|
||||||
|
thumbStrokeColor = ColorStateList.valueOf(context.getDefaultPrefs().getInt("manager_accent_color", ThemeHelper.defAccentColor))
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -14,7 +14,7 @@
|
||||||
tools:text="@string/script_sleep_timer"
|
tools:text="@string/script_sleep_timer"
|
||||||
style="@style/DialogCardTitle" />
|
style="@style/DialogCardTitle" />
|
||||||
|
|
||||||
<com.google.android.material.slider.Slider
|
<com.vanced.manager.ui.core.ThemedMaterialSlider
|
||||||
android:id="@+id/serviced_slider"
|
android:id="@+id/serviced_slider"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
|
Loading…
Reference in New Issue