Exemplo n.º 1
0
 /**
  * Automatically linked with android:onClick in the layout.
  *
  * @param view
  */
 public void toggleEnableRecording(View view) {
   CheckBox b = (CheckBox) view;
   if (Utils.isFree(this)) {
     IntroTextDialog.showIntroTextIfNecessary(this, database, true);
     b.setChecked(false);
   }
   selected.setEnableRecording(b.isChecked());
 }
Exemplo n.º 2
0
  public void setRemoteSoundTypeFromSettings(int type) {
    if (Utils.isFree(this)) {
      type = Constants.REMOTE_SOUND_DISABLED;
    }

    int id = 0;
    switch (type) {
      case Constants.REMOTE_SOUND_DISABLED:
        id = R.id.radioRemoteSoundDisabled;
        break;
      case Constants.REMOTE_SOUND_ON_DEVICE:
        id = R.id.radioRemoteSoundOnDevice;
        break;
      case Constants.REMOTE_SOUND_ON_SERVER:
        id = R.id.radioRemoteSoundOnServer;
        break;
    }
    groupRemoteSoundType.check(id);
  }
Exemplo n.º 3
0
  /**
   * Sets the remote sound type in the settings from the specified parameter.
   *
   * @param view
   */
  public void setRemoteSoundTypeFromView(View view) {
    RadioGroup g = (RadioGroup) view;
    if (Utils.isFree(this)) {
      IntroTextDialog.showIntroTextIfNecessary(this, database, true);
      g.check(R.id.radioRemoteSoundDisabled);
    }

    int id = g.getCheckedRadioButtonId();
    int soundType = Constants.REMOTE_SOUND_DISABLED;
    switch (id) {
      case R.id.radioRemoteSoundOnServer:
        soundType = Constants.REMOTE_SOUND_ON_SERVER;
        break;
      case R.id.radioRemoteSoundOnDevice:
        soundType = Constants.REMOTE_SOUND_ON_DEVICE;
        break;
    }
    selected.setRemoteSoundType(soundType);
  }
Exemplo n.º 4
0
 /**
  * Automatically linked with android:onClick in the layout.
  *
  * @param view
  */
 public void remoteSoundTypeToggled(View view) {
   if (Utils.isFree(this)) {
     IntroTextDialog.showIntroTextIfNecessary(this, database, true);
   }
 }