I'm trying to use the new Material Slider but I don't know if there is a way that I can get the value of the slider programmatically as a Integer.
I need the value as Integer because I have to work with the value doing some arithmetic calculations.
I get the value in float. How can I convert it to a Integer?
slider.addOnChangeListener(new Slider.OnChangeListener() {
@Override
public void onValueChange(@NonNull Slider slider, float value, boolean fromUser) {
//Use the value
}
});