Skip to content
谷进杰 edited this page May 12, 2018 · 7 revisions

1、How to add a Listener

  rangeSeekBar.setOnRangeChangedListener(new OnRangeChangedListener() {
            @Override
            public void onRangeChanged(RangeSeekBar view, float min, float max, boolean isFromUser) {
           //min is left seekbar value, max is right seekbar value
            }

            @Override
            public void onStartTrackingTouch(RangeSeekBar view,  boolean isLeft) {
                //start tracking touch
            }

            @Override
            public void onStopTrackingTouch(RangeSeekBar view,  boolean isLeft) {
                //stop tracking touch
            }
        });

2、How to use java code to update some attributes when you want RangeSeekBar support setter and getter for all attributes, so just do what you want to do in the Listener! If you want to change one of the seekbar's attributes, you can use getLeftSeekBar() or getRightSeekBar() to do it. Just enjoy it !

You can know more from the Issues and Demo