I have the following RangeSlider and I am using DataBinding to provide the minimum / maximum value of the slider, as it may change while the user is on the screen.
layout.xml
<layout ...>
<data>
<variable
name="item"
type="MyDataItem" />
</data>
...
<com.google.android.material.slider.RangeSlider
android:id="@+id/my_slider"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:stepSize="1"
android:valueFrom="@{item.minimum}"
android:valueTo="@{item.maximum}"
... />
</layout>
MyDataItem:
data class MyDataItem() {
val minimum = MutableLiveData(Int.MIN_VALUE)
val maximum = MutableLiveData(Int.MAX_VALUE)
}
However, whenever the app tries to inflate the view I get java.lang.IllegalStateException: valueFrom(0.0) must be smaller than valueTo(0.0)

The
Int.MIN_VALUEreturn a value of 2^-31 so that is smaller than 0.And
Int.MAX_VALUEreturn a value of 2^31 so that is bigger than 100.RangeSliderlimits are from 0 to 100. Try to use some values from 0 to 100.