private void switchAcceptMsg() { if (App.PREFS.isAcceptMsg()) { btnMsgSwitch.setBackgroundResource(R.drawable.apply_msg_on); } else { btnMsgSwitch.setBackgroundResource(R.drawable.apply_msg_off); } }
@Override public void onClick(View v) { if (v == btnLeft) { getActivity().finish(); } else if (v == btnMsgSwitch) { // 是否接受消息 App.PREFS.setAcceptMsg(App.PREFS.isAcceptMsg() ? false : true); switchAcceptMsg(); } else if (v == btnSoundSwitch) { // 声音提醒 App.PREFS.setSoundOpen(App.PREFS.isSoundOpen() ? false : true); switchSound(); } else if (v == btnShakeSwitch) { // 震动提醒 App.PREFS.setShakeOpen(App.PREFS.isShakeOpen() ? false : true); switchShake(); } else if (v == aboutContainer) { // 关于偶们 host.switchFragment(host.FRAGMENT_ABOUT); } }