code: private void init(Context context, AttributeSet attrs){
          setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
              @Override
              public void onStartTrackingTouch(SeekBar seekBar) {
                  superOldProgress = seekBar.getProgress();
              }
  
              @Override
              public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
                  if(fromUser)
                      fromUserCount+=1;
              }
  
              @Override
              public void onStopTrackingTouch(final SeekBar seekBar) {
                  int oldProgress = seekBar.getProgress();
                  final int newProgress;
                  if((oldProgress % stepSize) >= stepSize/2F){
                      newProgress = (int)(((oldProgress/(int)stepSize)+1)*stepSize);
                  } else {
                      newProgress = (int)(((oldProgress/(int)stepSize))*stepSize);
                  }
  
                  if(fromUserCount>1){ // SeekBar Dragged
                      ObjectAnimator animation = ObjectAnimator.ofInt(seekBar, PROGRESS_PROPERTY, oldProgress, newProgress);
                      animation.setDuration(getResources().getInteger(android.R.integer.config_mediumAnimTime));
                      animation.setInterpolator(new DecelerateInterpolator());
                      animation.start();
                  } else { // SeekBar Clicked
                      ObjectAnimator animation = ObjectAnimator.ofInt(seekBar, PROGRESS_PROPERTY, superOldProgress, newProgress);
                      animation.setDuration(getResources().getInteger(android.R.integer.config_mediumAnimTime));
                      animation.setInterpolator(new DecelerateInterpolator());
                      animation.start();
                  }
  
                  fromUserCount = 0;
                  if(onDiscreteSeekBarChangeListener != null){
                      onDiscreteSeekBarChangeListener.onPositionChanged(newProgress/MULTIPLIER);
                  }
              }
          });
      }
docs: region Helper Methods