oli107 / material-range-bar

Android widget for selecting a range of values.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Event with start and finish of drag

khirr opened this issue · comments

commented

Hello, I'd like to know if exists a way to can add listeners when starts drag and finish because I need this data to save in remove database and doing it every time is dragging is very heavy.

Thanks.

+1

This will call on finish.

rangebar.setOnTouchListener(new View.OnTouchListener() {
    @Override
    public boolean onTouch(View v, MotionEvent event) {
        if (event.getAction() == MotionEvent.ACTION_UP) {
          //Your Code
        }
        return false;
    }
});