1:添加更换设置服务器地址

2:添加关闭红包声音图标
This commit is contained in:
2025-12-22 14:04:19 +08:00
parent e21345ba61
commit f5287becee
14 changed files with 94 additions and 35 deletions

View File

@@ -1,5 +1,7 @@
package com.xscm.modulemain.activity.user.activity;
import static android.view.View.GONE;
import android.annotation.SuppressLint;
import android.content.DialogInterface;
import android.content.Intent;
@@ -80,16 +82,22 @@ public class SettingActivity extends BaseMvpActivity<SettingPresenter, ActivityS
mBinding.swit.setChecked(false);
}
} else {
mBinding.llQhdz.setVisibility(View.GONE);
mBinding.llQhdz.setVisibility(GONE);
}
if (userInfo.getMobile()!=null && !userInfo.getMobile().equals("")) {
if (userInfo.getMobile() != null && !userInfo.getMobile().equals("")) {
mBinding.tvPhoneTitle.setText("手机换绑");
mBinding.tvPhone.setText(TextViewUtils.formatAnyPhone(userInfo.getMobile()));
}else {
} else {
mBinding.tvPhoneTitle.setText("手机绑定");
mBinding.tvPhone.setText("");
}
}
if (CommonAppContext.selectRelease == 1){
mBinding.llQh.setVisibility(GONE);
}else {
mBinding.llQh.setVisibility(View.VISIBLE);
}
mBinding.switQh.setChecked(SpUtil.getTaskService()==1);
}
@Override
@@ -115,6 +123,7 @@ public class SettingActivity extends BaseMvpActivity<SettingPresenter, ActivityS
mBinding.llBbh.setOnClickListener(this::onClick);
mBinding.tvShare.setOnClickListener(this::onClick);
mBinding.llSendLog.setOnClickListener(this::onClick);
mBinding.switQh.setOnClickListener(this::onClick);
}
@SuppressLint("CheckResult")
@@ -139,9 +148,9 @@ public class SettingActivity extends BaseMvpActivity<SettingPresenter, ActivityS
startActivity(new Intent(this, ChangPassActivity.class));
} else if (id == R.id.ll_shb) {
LogUtils.e("点击了", SpUtil.getUserBean().getMobile());
if (TextUtils.isEmpty(SpUtil.getUserBean().getMobile())){
if (TextUtils.isEmpty(SpUtil.getUserBean().getMobile())) {
startActivity(new Intent(this, PhoneReplacementActivity.class));
}else {
} else {
startActivity(new Intent(this, MobilePhoneActivity.class));
}
} else if (id == R.id.ll_smrz) {//实名认证
@@ -290,6 +299,16 @@ public class SettingActivity extends BaseMvpActivity<SettingPresenter, ActivityS
// }
// }
// });
} else if (id == R.id.swit_qh) {
if (mBinding.switQh.isChecked()) {
SpUtil.setTaskService(1);
CommonAppContext.selectRelease = 2;
} else {
SpUtil.setTaskService(0);
CommonAppContext.selectRelease = -1;
}
// MvpPre.clearLoginInfo();
}
// 通过 ID 获取资源名称
String viewName = "";

View File

@@ -139,7 +139,7 @@ public class HorizontalListAdapter extends RecyclerView.Adapter<HorizontalListAd
case RoomSettingBean.QXRoomSettingTypeRoomTimeSpace:
return com.xscm.moduleutil.R.mipmap.time_space;
case RoomSettingBean.QXRoomSettingTypeRoomTimeRedSound:
return b ? com.xscm.moduleutil.R.mipmap.room_voice_g : com.xscm.moduleutil.R.mipmap.y_won;
return b ? com.xscm.moduleutil.R.mipmap.red_effect_off : com.xscm.moduleutil.R.mipmap.red_effect_on;
default:
return 0;
}

View File

@@ -46,14 +46,13 @@
android:layout_height="0.5dp"
android:layout_alignParentBottom="true"
android:background="#E2E2E2"
android:visibility="gone"/>
android:visibility="gone" />
<LinearLayout
android:id="@+id/ll_youth"
style="@style/My_Info_Item_LL_Style"
android:background="@drawable/bg_r15_white"
>
android:background="@drawable/bg_r15_white">
<TextView
style="@style/My_Info_Item_Title_Style"
@@ -116,8 +115,7 @@
style="@style/My_Info_Item_LL_Style"
android:background="@drawable/bg_r15_white"
android:visibility="gone"
tools:visibility="visible"
>
tools:visibility="visible">
<TextView
style="@style/My_Info_Item_Title_Style"
@@ -150,12 +148,13 @@
android:layout_width="0dp"
android:layout_weight="1"
android:text="@string/bind_phone" />
<TextView
android:id="@+id/tv_phone"
style="@style/My_Info_Item_Title_Style"
android:layout_width="0dp"
android:layout_weight="1"
android:gravity="center|end"/>
android:gravity="center|end" />
<ImageView style="@style/My_Info_Item_Arrow_Style" />
</LinearLayout>
@@ -196,6 +195,7 @@
android:layout_width="0dp"
android:layout_weight="1"
android:text="@string/version_number" />
<TextView
android:id="@+id/tv_bbh"
style="@style/My_Info_Item_Subtitle_Style"
@@ -307,6 +307,31 @@
<ImageView style="@style/My_Info_Item_Arrow_Style" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="0.5dp"
android:layout_alignParentBottom="true"
android:background="@color/color_e2e2e2" />
<LinearLayout
android:id="@+id/ll_qh"
style="@style/My_Info_Item_LL_Style"
android:background="@drawable/bg_r15_white"
android:visibility="visible">
<TextView
style="@style/My_Info_Item_Title_Style"
android:text="切换服务器" />
<Switch
android:id="@+id/swit_qh"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="right|center"
android:gravity="right"
tools:ignore="UseSwitchCompatOrMaterialXml" />
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="0.5dp"
@@ -328,7 +353,6 @@
</LinearLayout>
<View
android:layout_width="match_parent"
android:layout_height="0.5dp"
@@ -415,14 +439,14 @@
<TextView
android:id="@+id/tv_share"
android:visibility="gone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="start"
android:padding="@dimen/dp_40"
android:layout_marginTop="-50dp"
android:clickable="false"
android:focusable="false"
android:layout_marginTop="-50dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
android:padding="@dimen/dp_40"
android:visibility="gone" />
</LinearLayout>