/** * 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()); }
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); }
/** * 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); }
/** * Automatically linked with android:onClick in the layout. * * @param view */ public void remoteSoundTypeToggled(View view) { if (Utils.isFree(this)) { IntroTextDialog.showIntroTextIfNecessary(this, database, true); } }