Antivirus Guard (4) – Advanced tools

(1) Check the update Settings

By changing the CheckBox state and then changing the corresponding key-value pair in SharePreference,

Modify check updates.

Concrete logic implementation:

public class HighToolsActivity extends BaseActivity { private HighToolsActivity TAG = HighToolsActivity.this; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.hightool); Final CheckBox cb_is_updata = getView(r.i.C.b_is_updata); Cb_is_updata. SetOnClickListener (new an OnClickListener () {@ Override public void onClick (View v) {/ / whether the current selected, on the contrary if(cb_is_updata.isChecked()){ SafePreference.save(TAG, Const.ISUPDATA, true); }else{ SafePreference.save(TAG, Const.ISUPDATA, false); }}}); }}Copy the code