Code example for CheckBox

Methods: setEnabled, setChecked

0
		apiServerUrl.setText(SettingUtil.getApiServerUrl());
		fontSizes.setSelection(SettingUtil.getFontSizeIndex());
		autoIntervals.setSelection(SettingUtil.getAutoIntervalIndex());
		timelineCounts.setSelection(SettingUtil.getTimelineCountIndex());
		backgroundProcess.setChecked(SettingUtil.isBackgroundProcessEnabled());
		notification.setChecked(SettingUtil.isNotificationEnabled());
		 
		updateFields(); 
	} 
	 
	private void updateFields() { 
		boolean checked = backgroundProcess.isChecked();
		notification.setEnabled(checked);
	} 
	 
	@Override 
	protected void onPause() { 
		super.onPause(); 
		// api server 
		SettingUtil.setApiServerUrl(apiServerUrl.getText().toString());
		// font size