| | |
| | | private TextView tv_version; |
| | | private TextView tv_cache_num; |
| | | private CheckBox cb_msg, cb_no_see_red_point, cb_no_see_reward_statistics, |
| | | cb_no_see_share_and_selection, cb_no_see_phone;// cb_no_see_invite_reward;, cb_open_share_red_packet//开启推广红包 |
| | | cb_no_see_share_and_selection, cb_no_see_phone,cb_push;// cb_no_see_invite_reward;, cb_open_share_red_packet//开启推广红包 |
| | | private LinearLayout ll_clear_cache, ll_check_update, ll_person_info, ll_account_grade, |
| | | ll_about_us, ll_exit_account; |
| | | private int shareRedPacket, noBonusCount, noNewsRedDot, noShareRecordAndStorage, noDisplayPhoneNum; |
| | |
| | | cb_no_see_share_and_selection = findViewById(R.id.cb_no_see_share_and_selection); |
| | | |
| | | cb_no_see_phone = findViewById(R.id.cb_no_see_phone); |
| | | cb_push= findViewById(R.id.cb_push); |
| | | // cb_no_see_invite_reward = findViewById(R.id.cb_no_see_invite_reward); |
| | | ll_clear_cache = findViewById(R.id.ll_clear_cache); |
| | | ll_check_update = findViewById(R.id.ll_check_update); |
| | |
| | | editor.commit(); |
| | | } |
| | | }); |
| | | |
| | | cb_push.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { |
| | | @Override |
| | | public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { |
| | | UserCustomEvent.userSettingCommon(SettingActivity.this, "个性化推送开关"); |
| | | SharedPreferences.Editor editor = sp.edit(); |
| | | ToolUtil.notDisturb(SettingActivity.this, isChecked); |
| | | if (isChecked) |
| | | editor.putBoolean("doNotRecommend", true); |
| | | else |
| | | editor.putBoolean("doNotRecommend", false); |
| | | editor.commit(); |
| | | } |
| | | }); |
| | | |
| | | cb_no_see_red_point.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { |
| | | @Override |
| | | public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) { |
| | |
| | | noDisplayPhoneNum = getIntent().getIntExtra("noDisplayPhoneNum", 0); |
| | | |
| | | cb_msg.setChecked(sp.getBoolean("doNotDisturb", false)); |
| | | cb_push.setChecked(sp.getBoolean("doNotRecommend", false)); |
| | | |
| | | // cb_open_share_red_packet.setChecked(shareRedPacket == 1 ? true : false); |
| | | cb_no_see_red_point.setChecked(noNewsRedDot == 1 ? true : false); |
| | | cb_no_see_reward_statistics.setChecked(noBonusCount == 1 ? true : false); |