public void setDurationIndex(int selectedIndex) {
    mDuration = DURATION_VAL[selectedIndex];
  }
This panel simulates and Android view parameter for controlling a button
ConstraintLayoutExamples/CycleEditor/src/com/google/androidstudio/motionlayoutcycles/AnimationPanel.java