private void selectSpeedButton(int index) {

    for (ControlButtonView s : this.control_buttons) {
      s.fade();
    }

    this.control_buttons[index].shine();

    this.prefs.setSelectedDriveControlPref(index);
  }
  /**
   * When the user clicks a ControlButtonView, set the drive control to that style
   *
   * @param v
   */
  public void onControlButtonClick(View v) {

    if (v instanceof ControlButtonView) {
      ControlButtonView b = (ControlButtonView) v;

      b.checkForDoubleClick();

      this.selectSpeedButton(b.getDriveControlPref().index);

      SoundManager.playSound(MainActivity.SOUND_BUTTON_PRESS);
    }
  }
  /**
   * When the user long-clicks a ControlButtonView, select it, and then open the
   * ControlSettingsActivity
   *
   * @param v
   */
  public void onControlDoubleClick(View v) {

    if (v instanceof ControlButtonView) {

      ControlButtonView b = (ControlButtonView) v;

      Intent i = new Intent(this, ControlSettingsActivity.class);
      i.putExtra(ControlSettingsActivity.EXTRA_INDEX, b.getDriveControlPref().index);

      this.startActivityForResult(i, CONTROL_SETTINGS_ACTIVITY);

      overridePendingTransition(R.anim.flip_in, R.anim.flip_out);
    }
  }