|
@@ -44,6 +44,8 @@ public class WatchUserSettingActivity extends Activity {
|
|
|
|
|
|
private RadioGroup callGroup;
|
|
|
private RadioButton callYes, callNo;
|
|
|
+ private RadioGroup imChannelGroup;
|
|
|
+ private RadioButton imChannelYes, imChannelNo;
|
|
|
|
|
|
@Override
|
|
|
protected void onCreate(@Nullable Bundle savedInstanceState) {
|
|
@@ -71,6 +73,10 @@ public class WatchUserSettingActivity extends Activity {
|
|
|
callYes = findViewById(R.id.rb_call_yes);
|
|
|
callNo = findViewById(R.id.rb_call_no);
|
|
|
|
|
|
+ imChannelGroup = findViewById(R.id.group_im_channel);
|
|
|
+ imChannelYes = findViewById(R.id.rb_im_channel_yes);
|
|
|
+ imChannelNo = findViewById(R.id.rb_im_channel_no);
|
|
|
+
|
|
|
tvAppVersion.setText(CommonUtils.getAppVersionName(BaseApplication.appContext) + "_" + BuildConfig.BUILD_TIME);
|
|
|
tvDeviceId.setText("" + Constants.Companion.getDeviceId());
|
|
|
tvDeviceImei.setText(Constants.Companion.getImei());
|
|
@@ -85,6 +91,12 @@ public class WatchUserSettingActivity extends Activity {
|
|
|
callNo.setChecked(true);
|
|
|
}
|
|
|
|
|
|
+ if (SettingConfig.getImChannel(BaseApplication.appContext) == SettingConfig.IM_CHANNEL_ON) {
|
|
|
+ imChannelYes.setChecked(true);
|
|
|
+ } else {
|
|
|
+ imChannelNo.setChecked(true);
|
|
|
+ }
|
|
|
+
|
|
|
int mode = SettingConfig.getLanguageMode(BaseApplication.appContext);
|
|
|
RadioGroup languageMode = findViewById(R.id.group_language_mode);
|
|
|
RadioButton languageYes = findViewById(R.id.rb_language_yes);
|
|
@@ -184,6 +196,17 @@ public class WatchUserSettingActivity extends Activity {
|
|
|
}
|
|
|
});
|
|
|
|
|
|
+ imChannelGroup.setOnCheckedChangeListener(new RadioGroup.OnCheckedChangeListener() {
|
|
|
+ @Override
|
|
|
+ public void onCheckedChanged(RadioGroup group, int checkedId) {
|
|
|
+ if (checkedId == R.id.rb_im_channel_yes) {
|
|
|
+ SettingConfig.setImChannel(BaseApplication.appContext, SettingConfig.IM_CHANNEL_ON);
|
|
|
+ } else {
|
|
|
+ SettingConfig.setImChannel(BaseApplication.appContext, SettingConfig.IM_CHANNEL_OFF);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
|
|
|
Button update = findViewById(R.id.btn_update_contact);
|
|
|
update.setOnClickListener(new View.OnClickListener() {
|