@Override public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { switch (buttonView.getId()) { case R.id.qslide_checkbox: mPrefs.calculatorForceFloating().put(isChecked); Toast.makeText(getActivity(), R.string.changed_successfully, Toast.LENGTH_SHORT).show(); break; } }
@AfterViews void init() { mQslide.setChecked(mPrefs.calculatorForceFloating().get()); mQslide.setOnCheckedChangeListener(this); }