改了一些乱七八糟的东西

This commit is contained in:
xuhuixiang
2025-05-16 16:43:45 +08:00
parent be36e02e66
commit 3e7f1d9089
19 changed files with 263 additions and 121 deletions

View File

@@ -16,17 +16,16 @@ public class IMUIKitConfig {
public static String LOC_COUNTRY_CODE = "loc_country_code"; public static String LOC_COUNTRY_CODE = "loc_country_code";
public static String RBCHAT_PRIVACY_CN_URL = "https://download.bijr3t.com/userAgreement.html?v=" + System.currentTimeMillis(); public static String RBCHAT_PRIVACY_CN_URL = "http://download.bijr3t.com/userAgreement.html?v=" + System.currentTimeMillis();
public static String RBCHAT_SERVICE_CN_URL = "https://download.bijr3t.com/serviceAgreement.html?v=" + System.currentTimeMillis(); //服务协议 public static String RBCHAT_SERVICE_CN_URL = "http://download.bijr3t.com/serviceAgreement.html?v=" + System.currentTimeMillis(); //服务协议
public static String MIANMI_AGREEMENT_CN_URL = "https://download.bijr3t.com/nopwdAgreement.html?v=" + System.currentTimeMillis(); //免密协议 public static String MIANMI_AGREEMENT_CN_URL = "http://download.bijr3t.com/nopwdAgreement.html?v=" + System.currentTimeMillis(); //免密协议
public static String SUBSTATIONID = ApiService.SUBSTATIONID; public static String SUBSTATIONID = ApiService.SUBSTATIONID;
public static int MOMENTS_SOURCE_TIME = 1000 * 60; public static int MOMENTS_SOURCE_TIME = 1000 * 60;
// public static String AVATAR_DOWNLOAD_CONTROLLER_URL_ROOT = ApiService.URL + "static/avatar/%s"; // public static String AVATAR_DOWNLOAD_CONTROLLER_URL_ROOT = ApiService.URL + "static/avatar/%s"; // public static String AVATAR_DOWNLOAD_CONTROLLER_URL_ROOT = "http://192.168.110.233:8000/"+"static/avatar/%s";
// public static String AVATAR_DOWNLOAD_CONTROLLER_URL_ROOT = "http://192.168.110.233:8000/"+"static/avatar/%s";
public static int PUSH_CIR_SUCC = 567; public static int PUSH_CIR_SUCC = 567;
@@ -36,19 +35,19 @@ public class IMUIKitConfig {
/** /**
* 支付地址 * 支付地址
*/ */
public static String ONLINE_PAYMENT_URL = ApiService.URL.equals("https://api.bijr3t.com/") ? "https://admin.bijr3t.com/#/appPay" : "https://admin-test.bijr3t.com/#/appPay"; public static String ONLINE_PAYMENT_URL = ApiService.URL.equals("https://api.bijr3t.com/") ? "http://admin.bijr3t.com/#/appPay" : "https://admin-test.bijr3t.com/#/appPay";
// public static String ONLINE_PAYMENT_URL = "https://admin.bijr3t.com/#/appPay"; // public static String ONLINE_PAYMENT_URL = "http://admin.bijr3t.com/#/appPay";
/** /**
* 分享落地页二维码地址 * 分享落地页二维码地址
*/ */
// public static String SHARE_INVCODE = "http://qtalk666.top/#/download?code=%s"; // public static String SHARE_INVCODE = "http://qtalk666.top/#/download?code=%s";
public static String SHARE_INVCODE = "https://admin.bijr3t.com/#/downLoad?code=%s&userId=%s"; public static String SHARE_INVCODE = "http://admin.bijr3t.com/#/downLoad?code=%s&userId=%s";
public static String SHARE_INVCODEGROUP = "https://admin.bijr3t.com/#/downLoad?code=%s&teamId=%s"; public static String SHARE_INVCODEGROUP = "http://admin.bijr3t.com/#/downLoad?code=%s&teamId=%s";
public static String SHARE_INVCODEGROUP1 = "https://admin.bijr3t.com/#/downLoad?teamId=%s"; public static String SHARE_INVCODEGROUP1 = "http://admin.bijr3t.com/#/downLoad?teamId=%s";
public static String SHARE_INVCODE1 = "https://admin.bijr3t.com/#/downLoad?userId=%s"; public static String SHARE_INVCODE1 = "http://admin.bijr3t.com/#/downLoad?userId=%s";
public static String SHARE_INVCODE_START = "https://admin.bijr3t.com/#/downLoad"; public static String SHARE_INVCODE_START = "http://admin.bijr3t.com/#/downLoad";
/*** /***
* 分享用户ID 二维码 * 分享用户ID 二维码

View File

@@ -1651,7 +1651,7 @@ public class JsBridgeActivity extends BaseActivity {
//{"scheme":"time_go_mm://payment_bead/","userId":"10","value":"388a762b474f944b"} //{"scheme":"time_go_mm://payment_bead/","userId":"10","value":"388a762b474f944b"}
String scheme = qrData.getScheme(); String scheme = qrData.getScheme();
if (scheme.startsWith("http")) { if (scheme.startsWith("http")) {
if (scheme.startsWith("https://admin.bijr3t.com/") && scheme.contains("deviceId")) { if (scheme.startsWith("http://admin.bijr3t.com/") && scheme.contains("deviceId")) {
sendMachine(scheme); sendMachine(scheme);
} }
} }

View File

@@ -32,18 +32,22 @@ import com.hbl.lewan.utils.LogUtils;
import com.hbl.lewan.widget.CircleImageView; import com.hbl.lewan.widget.CircleImageView;
import com.netease.nimlib.sdk.NIMClient; import com.netease.nimlib.sdk.NIMClient;
import com.netease.nimlib.sdk.RequestCallback; import com.netease.nimlib.sdk.RequestCallback;
import com.netease.nimlib.sdk.RequestCallbackWrapper;
import com.netease.nimlib.sdk.msg.MsgService; import com.netease.nimlib.sdk.msg.MsgService;
import com.netease.nimlib.sdk.msg.attachment.FileAttachment; import com.netease.nimlib.sdk.msg.attachment.FileAttachment;
import com.netease.nimlib.sdk.msg.constant.MsgTypeEnum; import com.netease.nimlib.sdk.msg.constant.MsgTypeEnum;
import com.netease.nimlib.sdk.msg.constant.SessionTypeEnum; import com.netease.nimlib.sdk.msg.constant.SessionTypeEnum;
import com.netease.nimlib.sdk.msg.model.IMMessage; import com.netease.nimlib.sdk.msg.model.IMMessage;
import com.netease.nimlib.sdk.msg.model.MsgSearchOption; import com.netease.nimlib.sdk.msg.model.MsgSearchOption;
import com.netease.nimlib.sdk.team.TeamService;
import com.netease.nimlib.sdk.team.constant.TeamAllMuteModeEnum;
import com.netease.nimlib.sdk.team.constant.TeamMemberType; import com.netease.nimlib.sdk.team.constant.TeamMemberType;
import com.netease.nimlib.sdk.team.constant.TeamMessageNotifyTypeEnum; import com.netease.nimlib.sdk.team.constant.TeamMessageNotifyTypeEnum;
import com.netease.nimlib.sdk.team.model.Team; import com.netease.nimlib.sdk.team.model.Team;
import com.netease.nimlib.sdk.team.model.TeamMember; import com.netease.nimlib.sdk.team.model.TeamMember;
import com.netease.yunxin.kit.chatkit.model.IMMessageInfo; import com.netease.yunxin.kit.chatkit.model.IMMessageInfo;
import com.netease.yunxin.kit.chatkit.model.UserInfoWithTeam; import com.netease.yunxin.kit.chatkit.model.UserInfoWithTeam;
import com.netease.yunxin.kit.chatkit.repo.TeamRepo;
import com.netease.yunxin.kit.chatkit.ui.ChatKitUIConstant; import com.netease.yunxin.kit.chatkit.ui.ChatKitUIConstant;
import com.netease.yunxin.kit.chatkit.ui.model.CleanHistoryEvent; import com.netease.yunxin.kit.chatkit.ui.model.CleanHistoryEvent;
import com.netease.yunxin.kit.chatkit.ui.model.TeamExtensionBean; import com.netease.yunxin.kit.chatkit.ui.model.TeamExtensionBean;
@@ -389,6 +393,8 @@ public class TeamSettingActivity extends BaseTeamQrSettingActivity {
if(teamMember.getType() == TeamMemberType.Owner||teamMember.getType() == TeamMemberType.Manager){ if(teamMember.getType() == TeamMemberType.Owner||teamMember.getType() == TeamMemberType.Manager){
binding.fljinyan.setVisibility(View.VISIBLE); binding.fljinyan.setVisibility(View.VISIBLE);
binding.flhbkz.setVisibility(View.VISIBLE); binding.flhbkz.setVisibility(View.VISIBLE);
binding.qyjyLy.setVisibility(View.VISIBLE);
jinyanLuoji();
}else { }else {
binding.fljinyan.setVisibility(View.GONE); binding.fljinyan.setVisibility(View.GONE);
binding.flhbkz.setVisibility(View.GONE); binding.flhbkz.setVisibility(View.GONE);
@@ -396,11 +402,48 @@ public class TeamSettingActivity extends BaseTeamQrSettingActivity {
} }
} }
// public void setExtension() { private void jinyanLuoji() {
// Map<TeamFieldEnum, Serializable> fieldMap = new HashMap<>(); // NIMClient.getService(TeamService.class).muteTeam(teamId,).setCallback(new RequestCallback<TeamMessageNotifyTypeEnum>() {
// fieldMap.put(TeamFieldEnum.Extension, "1"); // @Override
// NIMClient.getService(TeamService.class).updateTeamFields(teamId, fieldMap); // public void onSuccess(Void param) {
// } // // 解散群成功
// }
// @Override
// public void onFailed(int code) {
// // 解散群失败
// }
// @Override
// public void onException(Throwable exception) {
// // 错误
// }
// });
// NIMClient.getService(GroupS.class).
// binding.qyjySwitch.setChecked();
getMute();
binding.qyjySwitch.setOnClickListener(v -> NIMClient.getService(TeamService.class).muteAllTeamMember(teamId,binding.qyjySwitch.isChecked()).setCallback(new RequestCallbackWrapper<Void>() {
@Override
public void onResult(int code, Void result, Throwable exception) {
getMute();
}
}));
}
private void getMute() {
NIMClient.getService(TeamService.class).searchTeam(teamId).setCallback(new RequestCallbackWrapper<>() {
@Override
public void onResult(int code, Team result, Throwable exception) {
LogUtils.i("群禁言类型:"+result.getMuteMode());
binding.qyjySwitch.setChecked(result.isAllMute());
}
});
}
public void setNotifyUI(boolean isOpen) { public void setNotifyUI(boolean isOpen) {
if (isOpen) { if (isOpen) {

View File

@@ -994,7 +994,7 @@ public class MainActivity extends BaseActivity {
break; break;
default: default:
if (scheme.startsWith("http")) { if (scheme.startsWith("http")) {
if (scheme.startsWith("https://admin.bijr3t.com/") && scheme.contains("deviceId")) { if (scheme.startsWith("http://admin.bijr3t.com/") && scheme.contains("deviceId")) {
sendMachine(scheme); sendMachine(scheme);
} else { } else {
// showErrCode(getString(R.string.qrcode_scan_activity_not_surpport_qrcontent)); // showErrCode(getString(R.string.qrcode_scan_activity_not_surpport_qrcontent));

View File

@@ -593,7 +593,7 @@ public class AddFriendsActivity extends LllChatBaseActivity {
default: default:
if (scheme.startsWith("http")) { if (scheme.startsWith("http")) {
if (scheme.startsWith("https://admin.bijr3t.com/") && scheme.contains("deviceId")) { if (scheme.startsWith("http://admin.bijr3t.com/") && scheme.contains("deviceId")) {
sendMachine(scheme); sendMachine(scheme);
} else { } else {
Intent intentweb = new Intent(Intent.ACTION_VIEW); Intent intentweb = new Intent(Intent.ACTION_VIEW);
@@ -612,7 +612,7 @@ public class AddFriendsActivity extends LllChatBaseActivity {
} }
} else { } else {
if (scheme.startsWith("http")) { if (scheme.startsWith("http")) {
if (scheme.startsWith("https://admin.bijr3t.com/") && scheme.contains("deviceId")) { if (scheme.startsWith("http://admin.bijr3t.com/") && scheme.contains("deviceId")) {
sendMachine(scheme); sendMachine(scheme);
} else { } else {
// activity.startActivity(IntentFactory.createCommonWebActivity2Intent(activity, scheme, "", true)); // activity.startActivity(IntentFactory.createCommonWebActivity2Intent(activity, scheme, "", true));

View File

@@ -379,7 +379,7 @@ public class UserInfoActivity extends BaseActivity {
// break; // break;
default: default:
if (scheme.startsWith("http")) { if (scheme.startsWith("http")) {
if (scheme.startsWith("https://admin.bijr3t.com/") && scheme.contains("deviceId")) { if (scheme.startsWith("http://admin.bijr3t.com/") && scheme.contains("deviceId")) {
sendMachine(scheme); sendMachine(scheme);
} else { } else {
// activity.startActivity(IntentFactory.createCommonWebActivity2Intent(activity, scheme, "", true)); // activity.startActivity(IntentFactory.createCommonWebActivity2Intent(activity, scheme, "", true));
@@ -397,7 +397,7 @@ public class UserInfoActivity extends BaseActivity {
} }
} else { } else {
if (scheme.startsWith("http")) { if (scheme.startsWith("http")) {
if (scheme.startsWith("https://admin.bijr3t.com/") && scheme.contains("deviceId")) { if (scheme.startsWith("http://admin.bijr3t.com/") && scheme.contains("deviceId")) {
sendMachine(scheme); sendMachine(scheme);
} else { } else {
// activity.startActivity(IntentFactory.createCommonWebActivity2Intent(activity, scheme, "", true)); // activity.startActivity(IntentFactory.createCommonWebActivity2Intent(activity, scheme, "", true));

View File

@@ -220,7 +220,7 @@ public class LoginBean extends RosterElementEntity {
public Integer getAddFriendNeedVerify() { public Integer getAddFriendNeedVerify() {
if(addFriendNeedVerify == null){ if(addFriendNeedVerify == null){
return 0; return 1;
} }
return addFriendNeedVerify; return addFriendNeedVerify;
} }

View File

@@ -981,6 +981,8 @@ public class SendRedPacketActivity extends BaseActivity {
getString(com.netease.yunxin.kit.chatkit.ui.R.string.hongbao_chat_txt), customerAttachment); getString(com.netease.yunxin.kit.chatkit.ui.R.string.hongbao_chat_txt), customerAttachment);
LogUtils.i("发送消息结构体:" + GsonUtils.beanToJSONString(customerAttachment)); LogUtils.i("发送消息结构体:" + GsonUtils.beanToJSONString(customerAttachment));
LogUtils.i("发送消息结构体:" + GsonUtils.beanToJSONString(customMessage));
if (customMessage != null) { if (customMessage != null) {
ChatRepo.sendMessage(customMessage, false, new FetchCallback<Void>() { ChatRepo.sendMessage(customMessage, false, new FetchCallback<Void>() {
@Override @Override

View File

@@ -130,6 +130,7 @@
android:layout_marginStart="@dimen/dp_15" android:layout_marginStart="@dimen/dp_15"
android:layout_marginTop="@dimen/dp_20" android:layout_marginTop="@dimen/dp_20"
android:layout_marginEnd="@dimen/dp_15" android:layout_marginEnd="@dimen/dp_15"
android:layout_marginBottom="@dimen/dp_10"
app:layout_constraintTop_toBottomOf="@+id/lineteamsetting"> app:layout_constraintTop_toBottomOf="@+id/lineteamsetting">
@@ -178,17 +179,69 @@
android:visibility="gone" /> android:visibility="gone" />
</LinearLayout> </LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout> </androidx.constraintlayout.widget.ConstraintLayout>
<LinearLayout
android:id="@+id/v"
android:paddingStart="@dimen/dp_15"
android:paddingEnd="@dimen/dp_15"
android:orientation="horizontal"
android:gravity="center_vertical"
android:layout_width="match_parent"
android:layout_height="10dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@+id/ctlayout_photo"/>
<LinearLayout
android:id="@+id/qyjy_ly"
android:paddingStart="@dimen/dp_15"
android:paddingEnd="@dimen/dp_15"
android:orientation="horizontal"
android:gravity="center_vertical"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_45"
android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@+id/v"
>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:drawablePadding="@dimen/dp_5"
android:text="全员禁言"
android:layout_weight="1"
android:textColor="@color/color_333333"
android:textSize="@dimen/sp_16"
app:drawableStartCompat="@mipmap/jinyan_red_img1"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@+id/llteamsetting_photo" />
<androidx.appcompat.widget.SwitchCompat
android:id="@+id/qyjy_switch"
android:layout_width="wrap_content"
android:layout_height="@dimen/dimen_24_dp"
android:clickable="true"
android:layout_gravity="end|center_vertical"
android:thumb="@drawable/switch_thumb_selector"
app:track="@drawable/switch_track_selector"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent"/>
</LinearLayout>
<FrameLayout <FrameLayout
android:id="@+id/flteamurl" android:id="@+id/flteamurl"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/dp_45" android:layout_height="@dimen/dp_45"
android:layout_marginStart="@dimen/dp_15" android:layout_marginStart="@dimen/dp_15"
android:layout_marginTop="@dimen/dp_10"
android:layout_marginEnd="@dimen/dp_15" android:layout_marginEnd="@dimen/dp_15"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@+id/ctlayout_photo"> app:layout_constraintTop_toBottomOf="@+id/qyjy_ly">
<TextView <TextView
android:id="@+id/tvteamsetting_link" android:id="@+id/tvteamsetting_link"

View File

@@ -29,15 +29,14 @@
<androidx.cardview.widget.CardView <androidx.cardview.widget.CardView
android:id="@+id/card_view" android:id="@+id/card_view"
android:layout_width="0dp" android:layout_width="match_parent"
android:layout_height="0dp" android:layout_height="130dp"
android:layout_marginLeft="@dimen/dp_15" android:layout_marginLeft="@dimen/dp_15"
android:layout_marginTop="@dimen/dp_5" android:layout_marginTop="@dimen/dp_5"
android:layout_marginRight="@dimen/dp_15" android:layout_marginRight="@dimen/dp_15"
app:cardBackgroundColor="@color/color_f4f4f4" app:cardBackgroundColor="@color/color_f4f4f4"
app:cardCornerRadius="@dimen/dp_10" app:cardCornerRadius="@dimen/dp_10"
app:cardElevation="0dp" app:cardElevation="0dp"
app:layout_constraintDimensionRatio="345:130"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent" app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"> app:layout_constraintTop_toTopOf="parent">

View File

@@ -29,15 +29,14 @@
<androidx.cardview.widget.CardView <androidx.cardview.widget.CardView
android:id="@+id/card_view" android:id="@+id/card_view"
android:layout_width="0dp" android:layout_width="match_parent"
android:layout_height="0dp" android:layout_height="130dp"
android:layout_marginLeft="@dimen/dp_15" android:layout_marginLeft="@dimen/dp_15"
android:layout_marginTop="@dimen/dp_5" android:layout_marginTop="@dimen/dp_5"
android:layout_marginRight="@dimen/dp_15" android:layout_marginRight="@dimen/dp_15"
app:cardBackgroundColor="@color/color_f4f4f4" app:cardBackgroundColor="@color/color_f4f4f4"
app:cardCornerRadius="@dimen/dp_10" app:cardCornerRadius="@dimen/dp_10"
app:cardElevation="0dp" app:cardElevation="0dp"
app:layout_constraintDimensionRatio="345:130"
app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent" app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"> app:layout_constraintTop_toTopOf="parent">

View File

@@ -24,6 +24,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:titleTextColor="@color/color_333333" /> app:titleTextColor="@color/color_333333" />
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_members" android:id="@+id/rv_members"
android:layout_width="match_parent" android:layout_width="match_parent"

View File

@@ -29,8 +29,8 @@
<androidx.cardview.widget.CardView <androidx.cardview.widget.CardView
android:id="@+id/card_view" android:id="@+id/card_view"
android:layout_width="0dp" android:layout_width="match_parent"
android:layout_height="0dp" android:layout_height="130dp"
android:layout_marginTop="@dimen/dp_5" android:layout_marginTop="@dimen/dp_5"
app:cardCornerRadius="@dimen/dp_10" app:cardCornerRadius="@dimen/dp_10"
app:cardElevation="0dp" app:cardElevation="0dp"

View File

@@ -63,7 +63,7 @@ public interface ChatMessageType {
int CUSTOM_STICKER_BUSINESS_CARD = 1003; int CUSTOM_STICKER_BUSINESS_CARD = 1003;
/** /**
* 赠送 * 转账
*/ */
int CUSTOM_STICKER_TRANSFER_ACCOUNTS = 1004; int CUSTOM_STICKER_TRANSFER_ACCOUNTS = 1004;

View File

@@ -53,6 +53,7 @@ import com.netease.yunxin.kit.corekit.im.provider.FetchCallback;
import com.netease.yunxin.kit.corekit.model.ErrorMsg; import com.netease.yunxin.kit.corekit.model.ErrorMsg;
import com.netease.yunxin.kit.corekit.model.ResultInfo; import com.netease.yunxin.kit.corekit.model.ResultInfo;
import java.text.DecimalFormat;
import java.util.List; import java.util.List;
import io.reactivex.android.schedulers.AndroidSchedulers; import io.reactivex.android.schedulers.AndroidSchedulers;
@@ -458,86 +459,109 @@ public class RedPacketViewHolder extends ChatBaseMessageViewHolder {
} }
public void setStatusView(TextView tvstatus, RedpacketBean1 data, ChatMessageBean message, RedpacketGroupBean redpacketGroupBean) { public void setStatusView(TextView tvstatus, RedpacketBean1 data, ChatMessageBean message, RedpacketGroupBean redpacketGroupBean) {
switch (data.getStatus()) { tvstatus.setText("¥ "+getQian(data.getAmount()));
case "0": // switch (data.getStatus()) {
// case "0":
tvstatus.setText(tvstatus.getResources().getString(R.string.dailinqu_txt1)); //
if (!data.getSenderUid().equals(IMKitClient.account())) { // tvstatus.setText(tvstatus.getResources().getString(R.string.dailinqu_txt1));
tvstatus.setText(tvstatus.getResources().getString(R.string.dailinqu_txt2)); // if (!data.getSenderUid().equals(IMKitClient.account())) {
// tvstatus.setText(tvstatus.getResources().getString(R.string.dailinqu_txt2));
} //
if (redpacketGroupBean != null && redpacketGroupBean.getGrabbers() != null) { // }
for (int i = 0; i < redpacketGroupBean.getGrabbers().size(); i++) { // if (redpacketGroupBean != null && redpacketGroupBean.getGrabbers() != null) {
if ((redpacketGroupBean.getGrabbers().get(i).getGrabberUid() + "").equals(IMKitClient.account())) { // for (int i = 0; i < redpacketGroupBean.getGrabbers().size(); i++) {
tvstatus.setText(tvstatus.getResources().getString(R.string.received_txt1)); // if ((redpacketGroupBean.getGrabbers().get(i).getGrabberUid() + "").equals(IMKitClient.account())) {
if (data.getCoinType().equals("0")) { // tvstatus.setText(tvstatus.getResources().getString(R.string.received_txt1));
binding.bigLy.setBackgroundResource(R.drawable.hongbnao_f_g); // if (data.getCoinType().equals("0")) {
} else if (data.getCoinType().equals("1")) { // binding.bigLy.setBackgroundResource(R.drawable.hongbnao_f_g);
binding.bigLy.setBackgroundResource(R.drawable.zhuanzhang_f_s); // } else if (data.getCoinType().equals("1")) {
} else { // binding.bigLy.setBackgroundResource(R.drawable.zhuanzhang_f_s);
binding.bigLy.setBackgroundResource(R.drawable.lijinhongbao_fail); // } else {
} // binding.bigLy.setBackgroundResource(R.drawable.lijinhongbao_fail);
break; // }
} // break;
} // }
// }
} //
break; // }
case "1": // break;
tvstatus.setText(tvstatus.getResources().getString(R.string.received_txt1)); // case "1":
// tvstatus.setText(tvstatus.getResources().getString(R.string.received_txt1));
if (message.getMessageData().getMessage().getFromAccount().equals(data.getSenderUid() + "")) { //
tvstatus.setText(tvstatus.getResources().getString(R.string.received_txt2)); // if (message.getMessageData().getMessage().getFromAccount().equals(data.getSenderUid() + "")) {
} // tvstatus.setText(tvstatus.getResources().getString(R.string.received_txt2));
if (IMKitClient.account().equals(data.getSenderUid())) { // }
tvstatus.setText(tvstatus.getResources().getString(R.string.received_txt4)); // if (IMKitClient.account().equals(data.getSenderUid())) {
// tvstatus.setText(tvstatus.getResources().getString(R.string.received_txt4));
} //
// }
if (redpacketGroupBean != null && redpacketGroupBean.getGrabbers() != null && redpacketGroupBean.getGrabbers().size() == redpacketGroupBean.getCount()) { //
tvstatus.setText(tvstatus.getResources().getString(R.string.received_txt5)); // if (redpacketGroupBean != null && redpacketGroupBean.getGrabbers() != null && redpacketGroupBean.getGrabbers().size() == redpacketGroupBean.getCount()) {
for (int i = 0; i < redpacketGroupBean.getGrabbers().size(); i++) { // tvstatus.setText(tvstatus.getResources().getString(R.string.received_txt5));
if ((redpacketGroupBean.getGrabbers().get(i).getGrabberUid() + "").equals(IMKitClient.account())) { // for (int i = 0; i < redpacketGroupBean.getGrabbers().size(); i++) {
tvstatus.setText(tvstatus.getResources().getString(R.string.received_txt2)); // if ((redpacketGroupBean.getGrabbers().get(i).getGrabberUid() + "").equals(IMKitClient.account())) {
// tvstatus.setText(tvstatus.getResources().getString(R.string.received_txt2));
break; //
} // break;
} // }
if ((redpacketGroupBean.getSenderUid() + "").equals(IMKitClient.account())) { // }
tvstatus.setText(tvstatus.getResources().getString(R.string.received_txt5)); // if ((redpacketGroupBean.getSenderUid() + "").equals(IMKitClient.account())) {
// tvstatus.setText(tvstatus.getResources().getString(R.string.received_txt5));
//
} //
} // }
break; // }
case "2": // break;
tvstatus.setText(tvstatus.getResources().getString(R.string.yiguoqi_txt1)); // case "2":
// tvstatus.setText(tvstatus.getResources().getString(R.string.yiguoqi_txt1));
if (redpacketGroupBean != null && redpacketGroupBean.getGrabbers() != null) { //
for (int i = 0; i < redpacketGroupBean.getGrabbers().size(); i++) { // if (redpacketGroupBean != null && redpacketGroupBean.getGrabbers() != null) {
if ((redpacketGroupBean.getGrabbers().get(i).getGrabberUid() + "").equals(IMKitClient.account())) { // for (int i = 0; i < redpacketGroupBean.getGrabbers().size(); i++) {
tvstatus.setText(tvstatus.getResources().getString(R.string.received_txt2)); // if ((redpacketGroupBean.getGrabbers().get(i).getGrabberUid() + "").equals(IMKitClient.account())) {
// tvstatus.setText(tvstatus.getResources().getString(R.string.received_txt2));
break; //
} // break;
} // }
} // }
break; // }
case "3": // break;
case "4": // case "3":
tvstatus.setText(tvstatus.getResources().getString(R.string.yituihuan_txt)); // case "4":
// tvstatus.setText(tvstatus.getResources().getString(R.string.yituihuan_txt));
if (message.getMessageData().getMessage().getFromAccount().equals(data.getSenderUid() + "")) { //
tvstatus.setText(tvstatus.getResources().getString(R.string.yituihuan_txt1)); // if (message.getMessageData().getMessage().getFromAccount().equals(data.getSenderUid() + "")) {
} // tvstatus.setText(tvstatus.getResources().getString(R.string.yituihuan_txt1));
if (IMKitClient.account().equals(data.getSenderUid())) { // }
tvstatus.setText(tvstatus.getResources().getString(R.string.yituihuan_txt2)); // if (IMKitClient.account().equals(data.getSenderUid())) {
} // tvstatus.setText(tvstatus.getResources().getString(R.string.yituihuan_txt2));
break; // }
} // break;
// }
} }
public String getQian(String numberString) {
if(TextUtils.isEmpty(numberString)){
numberString = "0";
}
long number = Long.valueOf(numberString);
if (number % 100 == 0) {
long numbers = number/100;
DecimalFormat decimalFormat = new DecimalFormat("#,###,###");
String formattedNumber = decimalFormat.format(numbers);
return String.format("%s", formattedNumber);
} else if (number % 10 == 0) {
float numbers = number/100f;
DecimalFormat decimalFormat = new DecimalFormat("#,###,##0.0");
String formattedNumber = decimalFormat.format(numbers);
return String.format("%s", formattedNumber);
} else {
float numbers = number/100f;
DecimalFormat decimalFormat = new DecimalFormat("#,###,##0.00");
String formattedNumber = decimalFormat.format(numbers);
return String.format("%s", formattedNumber);
}
}
/** /**
* 设置消息头像的显示. * 设置消息头像的显示.

View File

@@ -68,6 +68,8 @@ public class TransferViewHolder extends ChatBaseMessageViewHolder {
currentMessage = message; currentMessage = message;
String name = message.getMessageData().getMessage().getAttachStr(); String name = message.getMessageData().getMessage().getAttachStr();
TransferShareBean circleShareBean = GsonUtils.getObjFromJSON(name, TransferShareBean.class); TransferShareBean circleShareBean = GsonUtils.getObjFromJSON(name, TransferShareBean.class);
Log.i("名片", "名片获取到的数据-1" + GsonUtils.beanToJSONString(message));
Log.i("名片", "名片获取到的数据0" + name); Log.i("名片", "名片获取到的数据0" + name);
Log.i("名片", "名片获取到的数据2" + GsonUtils.beanToJSONString(circleShareBean)); Log.i("名片", "名片获取到的数据2" + GsonUtils.beanToJSONString(circleShareBean));
// binding.itemTitleTv.setVisibility(View.INVISIBLE);//去掉title // binding.itemTitleTv.setVisibility(View.INVISIBLE);//去掉title

View File

@@ -11,9 +11,12 @@ import android.view.ViewGroup;
import androidx.annotation.LayoutRes; import androidx.annotation.LayoutRes;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
import com.netease.nim.highavailable.LogUtils;
import com.netease.nimlib.sdk.msg.constant.MsgTypeEnum; import com.netease.nimlib.sdk.msg.constant.MsgTypeEnum;
import com.netease.yunxin.kit.alog.ALog; import com.netease.yunxin.kit.alog.ALog;
import com.netease.yunxin.kit.chatkit.ui.IChatDefaultFactory; import com.netease.yunxin.kit.chatkit.ui.IChatDefaultFactory;
import com.netease.yunxin.kit.chatkit.ui.common.GsonUtils;
import com.netease.yunxin.kit.chatkit.ui.databinding.ChatBaseMessageViewHolderBinding; import com.netease.yunxin.kit.chatkit.ui.databinding.ChatBaseMessageViewHolderBinding;
import com.netease.yunxin.kit.chatkit.ui.fun.view.message.ChatMessageViewHolderFactory; import com.netease.yunxin.kit.chatkit.ui.fun.view.message.ChatMessageViewHolderFactory;
import com.netease.yunxin.kit.chatkit.ui.model.ChatMessageBean; import com.netease.yunxin.kit.chatkit.ui.model.ChatMessageBean;
@@ -61,6 +64,8 @@ public class FunChatViewHolderFactory extends ChatMessageViewHolderFactory
@Override @Override
public int getCustomViewType(ChatMessageBean messageBean) { public int getCustomViewType(ChatMessageBean messageBean) {
if (messageBean != null) { if (messageBean != null) {
// LogUtils.i("BIKAOVIDEO","BIKAOVIDEO结果是啥类型1"+ GsonUtils.beanToJSONString(messageBean));
if (messageBean.getMessageData().getMessage().getMsgType() == MsgTypeEnum.custom) { if (messageBean.getMessageData().getMessage().getMsgType() == MsgTypeEnum.custom) {
CustomAttachment attachment = CustomAttachment attachment =
(CustomAttachment) messageBean.getMessageData().getMessage().getAttachment(); (CustomAttachment) messageBean.getMessageData().getMessage().getAttachment();

View File

@@ -143,14 +143,20 @@ public class MessageBottomLayout extends FrameLayout
mBinding.inputCameraRb.setOnClickListener(view -> onCameraClick()); mBinding.inputCameraRb.setOnClickListener(view -> onCameraClick());
// mBinding.inputAudioRb.setOnClickListener(v -> switchRecord()); // mBinding.inputAudioRb.setOnClickListener(v -> switchRecord());
// mBinding.inputAudio2Rb.setOnClickListener(v -> switchRecord()); // mBinding.inputAudio2Rb.setOnClickListener(v -> switchRecord());
mBinding.inputRightLayout.setOnClickListener(v -> { // mBinding.inputRightLayout.setOnClickListener(v -> {
if (mBinding.inputAudio2Rb.getVisibility() == VISIBLE) { // if (mBinding.inputAudio2Rb.getVisibility() == VISIBLE) {
switchRecord2(); // switchRecord2();
} else { // } else {
sendText(replyMessage); // sendText(replyMessage);
} // }
} // }
); // );
mBinding.inputAudio2Rb.setOnClickListener(v -> {
switchRecord2();
});
mBinding.emojiFsongTv.setOnClickListener(v -> {
sendText(replyMessage);
});
mBinding.layoutaudiostatus.setOnClickListener(view -> updateAudioStatus());//开始录音 mBinding.layoutaudiostatus.setOnClickListener(view -> updateAudioStatus());//开始录音
mBinding.ivaudiodelete.setOnClickListener(view -> deleteRecord()); mBinding.ivaudiodelete.setOnClickListener(view -> deleteRecord());
mBinding.ivaudiosend.setOnClickListener(view -> sendRecord()); mBinding.ivaudiosend.setOnClickListener(view -> sendRecord());
@@ -1019,6 +1025,14 @@ public class MessageBottomLayout extends FrameLayout
mBinding.inputEmojiRb.setAlpha(mute ? 0.5f : 1f); mBinding.inputEmojiRb.setAlpha(mute ? 0.5f : 1f);
mBinding.inputMoreRb.setEnabled(!mute); mBinding.inputMoreRb.setEnabled(!mute);
mBinding.inputMoreRb.setAlpha(mute ? 0.5f : 1f); mBinding.inputMoreRb.setAlpha(mute ? 0.5f : 1f);
mBinding.inputCameraRb.setEnabled(!mute);
mBinding.inputCameraRb.setAlpha(mute ? 0.5f : 1f);
mBinding.inputAlbumRb.setEnabled(!mute);
mBinding.inputAlbumRb.setAlpha(mute ? 0.5f : 1f);
mBinding.inputAudio2Rb.setEnabled(!mute);
mBinding.inputAudio2Rb.setAlpha(mute ? 0.5f : 1f);
} }
} }

View File

@@ -51,8 +51,9 @@
android:ellipsize="end" android:ellipsize="end"
android:gravity="center_vertical" android:gravity="center_vertical"
android:lines="1" android:lines="1"
android:textStyle="bold"
android:textColor="#FEE391" android:textColor="#FEE391"
android:textSize="12sp" /> android:textSize="16sp" />
</LinearLayout> </LinearLayout>
</LinearLayout> </LinearLayout>