title: Java RangeSlider OnChangeListener in Android
body: <p>How to add onchangelistener on rangeslider in android Java? This is the closest I have gotten.</p>
  <pre><code>import com.google.android.material.slider.RangeSlider;
  ...
     RangeSlider intensitySlider;
  ...
      intensitySlider=(RangeSlider) findViewById(R.id.intensity_range);
  ...
         intensitySlider.addOnChangeListener(new RangeSlider.OnChangeListener() {
              @Override
              public void onValueChange(@NonNull Slider slider, float value, boolean fromUser) {
                  List&lt;Float&gt; b = intensitySlider.getValues();
  
              }
          });
  </code></pre>
  <p>Error Messages:
  RangeSlider.OnChangeListener: Class 'Anonymous class derived from OnChangeListener' must either be declared abstract or implement abstract method 'onValueChange(S, float, boolean)' in 'BaseOnChangeListener'</p>
  <p>@Override: Method does not override method from its superclass</p>