Code example for CheckBoxPreference

Methods: setChecked

0
    private void setBackupEnabled(boolean enable) {
        if (mBackupManager != null) {
            try { 
                mBackupManager.setBackupEnabled(enable);
            } catch (RemoteException e) {
                mBackup.setChecked(!enable);
                mAutoRestore.setEnabled(!enable);
                return; 
            } 
        } 
        mBackup.setChecked(enable);
        mAutoRestore.setEnabled(enable);
        mConfigure.setEnabled(enable);
    } 
 
    @Override 
    protected int getHelpResource() { 
        return R.string.help_url_backup_reset; 
    } 
}