Improved slider
This commit is contained in:
parent
437f73b1dc
commit
c42e9cb0df
68 changed files with 621 additions and 3401 deletions
|
@ -21,7 +21,7 @@ import android.widget.EditText
|
|||
import androidx.annotation.LayoutRes
|
||||
import code.name.monkey.appthemehelper.ThemeStore
|
||||
import code.name.monkey.appthemehelper.util.TintHelper
|
||||
|
||||
import com.google.android.material.slider.Slider
|
||||
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
fun <T : View> ViewGroup.inflate(@LayoutRes layout: Int): T {
|
||||
|
@ -45,4 +45,10 @@ fun View.showOrHide(show: Boolean) = if (show) show() else hide()
|
|||
fun EditText.appHandleColor(): EditText {
|
||||
TintHelper.colorHandles(this, ThemeStore.accentColor(context))
|
||||
return this
|
||||
}
|
||||
|
||||
fun Slider.setRange(progress: Float, to: Float) {
|
||||
valueFrom = 0F
|
||||
valueTo = to
|
||||
value = progress
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue