public void updateBackendData(@Nullable AnimationBackend newBackend) {
    if (mSeekBar == null) {
      return;
    }
    if (newBackend != null) {
      mSeekBar.setMax(newBackend.getFrameCount() - 1);
    } else {
      mSeekBar.setMax(0);
    }
  }
Helper class that manages animation controls: Play / pause, reset and a seekbar.
samples/animation2/src/main/java/com/facebook/samples/animation2/utils/AnimationControlsManager.java