修复测试反馈内容

This commit is contained in:
zlzw 2024-07-30 16:47:47 +08:00
parent 9ae6fedd8d
commit 9f90040168
13 changed files with 284 additions and 164 deletions

View File

@ -151,6 +151,7 @@ public class Constants {
public static final String SOCKET_LIVE_DRPK_RANDOM = "LiveRandomPK";//随机PK public static final String SOCKET_LIVE_DRPK_RANDOM = "LiveRandomPK";//随机PK
public static final String SOCKET_LEAVE_ROOM = "disconnect";//用户离开房间 public static final String SOCKET_LEAVE_ROOM = "disconnect";//用户离开房间
public static final String SOCKET_LIVE_END = "StartEndLive";//主播关闭直播 public static final String SOCKET_LIVE_END = "StartEndLive";//主播关闭直播
public static final String SOCKET_LIVE_END_CLOSE = "StartEndLiveClose";//主播关闭直播
public static final String SOCKET_SYSTEM = "SystemNot";//系统消息 public static final String SOCKET_SYSTEM = "SystemNot";//系统消息
public static final String UP_USER_LIST = "upuserlist";//更新用戶列表 public static final String UP_USER_LIST = "upuserlist";//更新用戶列表
public static final String LIAN_MAI = "LivePKDRLM";//用户连麦 public static final String LIAN_MAI = "LivePKDRLM";//用户连麦

View File

@ -0,0 +1,47 @@
package com.yunbao.common.bean;
public class BanDownLiveEvent extends BaseModel{
private String reason,reasonContent,content,timer;
public BanDownLiveEvent() {
}
public BanDownLiveEvent(String reason, String reasonContent, String content, String timer) {
this.reason = reason;
this.reasonContent = reasonContent;
this.content = content;
this.timer = timer;
}
public String getReason() {
return reason;
}
public void setReason(String reason) {
this.reason = reason;
}
public String getReasonContent() {
return reasonContent;
}
public void setReasonContent(String reasonContent) {
this.reasonContent = reasonContent;
}
public String getContent() {
return content;
}
public void setContent(String content) {
this.content = content;
}
public String getTimer() {
return timer;
}
public void setTimer(String timer) {
this.timer = timer;
}
}

View File

@ -125,11 +125,17 @@ public class OrderLevelPopupWindow extends CenterPopupView {
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.buying_experience), new ViewClicksAntiShake.ViewClicksCallBack() { ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.buying_experience), new ViewClicksAntiShake.ViewClicksCallBack() {
@Override @Override
public void onViewClicks() { public void onViewClicks() {
if(StringUtil.isEmpty(orderLevel.getText().toString())||"0".equals(orderLevel.getText().toString())){ int input = 0;
ToastUtil.show(WordUtil.isNewZh()?"输入数字不可为0":"The input number cannot be 0"); try {
input = Integer.parseInt(orderLevel.getText().toString());
} catch (Exception e) {
input = 0;
}
if (StringUtil.isEmpty(orderLevel.getText().toString()) || input == 0) {
ToastUtil.show(WordUtil.isNewZh() ? "輸入数字不可為0" : "The input number cannot be 0");
return; return;
} }
if (Integer.parseInt(orderLevel.getText().toString()+"00") <= maxExp) { if (Integer.parseInt(orderLevel.getText().toString() + "00") <= maxExp) {
LiveNetManager.get(getContext()).buyingExperiencePoint(buyExp + "00", new HttpCallback<ResponseModel<Object>>() { LiveNetManager.get(getContext()).buyingExperiencePoint(buyExp + "00", new HttpCallback<ResponseModel<Object>>() {
@Override @Override
public void onSuccess(ResponseModel<Object> data) { public void onSuccess(ResponseModel<Object> data) {

View File

@ -1541,7 +1541,7 @@
<string name="dialog_gift_wall_assistance_star">助力值</string> <string name="dialog_gift_wall_assistance_star">助力值</string>
<string name="dialog_gift_wall_time_now">本期展館時間:</string> <string name="dialog_gift_wall_time_now">本期展館時間:</string>
<string name="dialog_gift_wall_time_old">上期展館時間:</string> <string name="dialog_gift_wall_time_old">上期展館時間:</string>
<string name="live_end_view_ban_title">您由於【%s】 違規被中斷直播</string> <string name="live_end_view_ban_title">您由於違規被中斷直播</string>
<string name="live_end_view_ban_reason">違規原因:</string> <string name="live_end_view_ban_reason">違規原因:</string>
<string name="live_end_view_ban_content">處罰內容:</string> <string name="live_end_view_ban_content">處罰內容:</string>
<string name="live_end_view_ban_timer">處罰時間:</string> <string name="live_end_view_ban_timer">處罰時間:</string>

View File

@ -1550,7 +1550,7 @@
<string name="sub_admission_fee">*10% of the threshold will be charged as ticket</string> <string name="sub_admission_fee">*10% of the threshold will be charged as ticket</string>
<string name="live_end_view_ban_title">You were interrupted from the live broadcast due to violation of [%s]. </string> <string name="live_end_view_ban_title">You were interrupted from the live broadcast due to violation of regulations. </string>
<string name="live_end_view_ban_reason">Violation reasons:</string> <string name="live_end_view_ban_reason">Violation reasons:</string>
<string name="live_end_view_ban_content">Penalty content:</string> <string name="live_end_view_ban_content">Penalty content:</string>
<string name="live_end_view_ban_timer">Penalty time:</string> <string name="live_end_view_ban_timer">Penalty time:</string>

View File

@ -20,6 +20,7 @@ import android.util.Log;
import android.view.KeyEvent; import android.view.KeyEvent;
import android.view.View; import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.Button;
import android.widget.ImageView; import android.widget.ImageView;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
@ -35,12 +36,14 @@ import com.bumptech.glide.request.transition.Transition;
import com.lxj.xpopup.XPopup; import com.lxj.xpopup.XPopup;
import com.lxj.xpopup.core.BasePopupView; import com.lxj.xpopup.core.BasePopupView;
import com.lxj.xpopup.interfaces.XPopupCallback; import com.lxj.xpopup.interfaces.XPopupCallback;
import com.lzf.easyfloat.enums.ShowPattern;
import com.opensource.svgaplayer.SVGAImageView; import com.opensource.svgaplayer.SVGAImageView;
import com.tencent.trtc.TRTCCloudDef; import com.tencent.trtc.TRTCCloudDef;
import com.yunbao.common.CommonAppConfig; import com.yunbao.common.CommonAppConfig;
import com.yunbao.common.CommonAppContext; import com.yunbao.common.CommonAppContext;
import com.yunbao.common.Constants; import com.yunbao.common.Constants;
import com.yunbao.common.bean.AiAutomaticSpeechModel; import com.yunbao.common.bean.AiAutomaticSpeechModel;
import com.yunbao.common.bean.BanDownLiveEvent;
import com.yunbao.common.bean.IMLoginModel; import com.yunbao.common.bean.IMLoginModel;
import com.yunbao.common.bean.LinkMicUserBean; import com.yunbao.common.bean.LinkMicUserBean;
import com.yunbao.common.bean.LiveAiRobotBean; import com.yunbao.common.bean.LiveAiRobotBean;
@ -49,6 +52,7 @@ import com.yunbao.common.bean.LiveUserGiftBean;
import com.yunbao.common.bean.MicUserBean; import com.yunbao.common.bean.MicUserBean;
import com.yunbao.common.bean.SendMoneyLongModel; import com.yunbao.common.bean.SendMoneyLongModel;
import com.yunbao.common.bean.UserBean; import com.yunbao.common.bean.UserBean;
import com.yunbao.common.dialog.DebugDialog;
import com.yunbao.common.dialog.NotCancelableDialog; import com.yunbao.common.dialog.NotCancelableDialog;
import com.yunbao.common.event.AllServerNotifyFFGGGDJANEvent; import com.yunbao.common.event.AllServerNotifyFFGGGDJANEvent;
import com.yunbao.common.event.GiftWallIlluminateEvent; import com.yunbao.common.event.GiftWallIlluminateEvent;
@ -219,7 +223,7 @@ public class LiveSwAnchorActivity extends LiveActivity implements LiveFunctionCl
initFaceManager(); initFaceManager();
leave_img = findViewById(R.id.leave_img); leave_img = findViewById(R.id.leave_img);
mLiveSDK = intent.getIntExtra(Constants.LIVE_SDK, Constants.LIVE_SDK_KSY); mLiveSDK = intent.getIntExtra(Constants.LIVE_SDK, Constants.LIVE_SDK_KSY);
if(mLiveSDK ==Constants.LIVE_SDK_SW){ if (mLiveSDK == Constants.LIVE_SDK_SW) {
isSw = true; isSw = true;
} }
mLiveKsyConfigBean = intent.getParcelableExtra(Constants.LIVE_KSY_CONFIG); mLiveKsyConfigBean = intent.getParcelableExtra(Constants.LIVE_KSY_CONFIG);
@ -285,7 +289,23 @@ public class LiveSwAnchorActivity extends LiveActivity implements LiveFunctionCl
} }
}); });
/*DebugDialog.getInstance(new DebugDialog.DebugDialogRunnable() {
@Override
public void run(DebugDialog dialog) {
dialog.setShowPattern(ShowPattern.ALL_TIME);
dialog.show();
dialog.setView("测试", new Button(mContext), new View.OnClickListener() {
@Override
public void onClick(View v) {
android.os.Message msg = android.os.Message.obtain();
msg.what = Constants.SOCKET_WHAT_BROADCAST;
String json = "{\"msg\":[{\"_method_\":\"StartEndLive\",\"action\":\"18\",\"ct\":\"直播关闭\",\"touid\":\"\",\"equipment\":\"app\",\"msgtype\":\"1\",\"uname\":\"1\",\"timestamp\":\"\",\"touname\":\"\",\"uid\":\"98274\",\"tougood\":\"\",\"ugood\":\"\",\"roomnum\":\"98274\",\"riskDescription\":\"色情:性行为:中度色情\",\"enRiskDescription\":\"Pornography: Sexual behavior: Moderate pornography\",\"riskhType\":\"封禁1分钟\",\"enRiskhType\":\"Banned for 1 minute\",\"date\":\"2024-07-30 15:03:11\"}],\"retcode\":\"000000\",\"retmsg\":\"OK\"}";
msg.obj = json;
SocketSwClient.mSocketHandler.sendMessage(msg);
}
});
}
});*/
} }
private void initFaceManager() { private void initFaceManager() {
@ -368,7 +388,7 @@ public class LiveSwAnchorActivity extends LiveActivity implements LiveFunctionCl
fragment.setOnPrankResultListener(new LivePrankDialogFragment.onPrankResultListener() { fragment.setOnPrankResultListener(new LivePrankDialogFragment.onPrankResultListener() {
@Override @Override
public void OpenAndCloseListener() { public void OpenAndCloseListener() {
if(mLiveRoomViewHolder!=null){ if (mLiveRoomViewHolder != null) {
mLiveRoomViewHolder.initPrankProgress(1); mLiveRoomViewHolder.initPrankProgress(1);
} }
} }
@ -700,7 +720,7 @@ public class LiveSwAnchorActivity extends LiveActivity implements LiveFunctionCl
bundle.putBoolean("isPk", isDRPK == 1 || PKing || mLivePushViewHolder.isPking()); bundle.putBoolean("isPk", isDRPK == 1 || PKing || mLivePushViewHolder.isPking());
bundle.putLong("liveTime", mLiveAnchorViewHolder.getmAnchorLiveTime()); bundle.putLong("liveTime", mLiveAnchorViewHolder.getmAnchorLiveTime());
bundle.putBoolean(Constants.OPEN_FLASH, mLivePushViewHolder != null && mLivePushViewHolder.isFlashOpen()); bundle.putBoolean(Constants.OPEN_FLASH, mLivePushViewHolder != null && mLivePushViewHolder.isFlashOpen());
bundle.putBoolean("isShowZgRed",mLiveAnchorViewHolder.isShowMenuRed()); bundle.putBoolean("isShowZgRed", mLiveAnchorViewHolder.isShowMenuRed());
fragment.setArguments(bundle); fragment.setArguments(bundle);
fragment.setFunctionClickListener(this); fragment.setFunctionClickListener(this);
fragment.show(getSupportFragmentManager(), "LiveFunctionDialogFragment"); fragment.show(getSupportFragmentManager(), "LiveFunctionDialogFragment");
@ -738,7 +758,7 @@ public class LiveSwAnchorActivity extends LiveActivity implements LiveFunctionCl
public void openRandomPkWindow() { public void openRandomPkWindow() {
RandomPkDialogFragment fragment = new RandomPkDialogFragment(); RandomPkDialogFragment fragment = new RandomPkDialogFragment();
Bundle bundle = new Bundle(); Bundle bundle = new Bundle();
bundle.putBoolean("isSw",true); bundle.putBoolean("isSw", true);
fragment.setArguments(bundle); fragment.setArguments(bundle);
fragment.show(getSupportFragmentManager(), "RandomPkDialogFragment"); fragment.show(getSupportFragmentManager(), "RandomPkDialogFragment");
} }
@ -787,7 +807,7 @@ public class LiveSwAnchorActivity extends LiveActivity implements LiveFunctionCl
} }
mLiveReadyViewHolder = null; mLiveReadyViewHolder = null;
if (mLiveRoomViewHolder == null) { if (mLiveRoomViewHolder == null) {
mLiveRoomViewHolder = new LiveRoomViewHolder(true, 2, mContext, mContainer, (GifImageView) findViewById(R.id.gift_gif), (SVGAImageView) findViewById(R.id.gift_svga), mContainerWrap, getWindowManager(),isSw); mLiveRoomViewHolder = new LiveRoomViewHolder(true, 2, mContext, mContainer, (GifImageView) findViewById(R.id.gift_gif), (SVGAImageView) findViewById(R.id.gift_svga), mContainerWrap, getWindowManager(), isSw);
mLiveRoomViewHolder.setManager(manager); mLiveRoomViewHolder.setManager(manager);
mLiveRoomViewHolder.addToParent(); mLiveRoomViewHolder.addToParent();
mLiveRoomViewHolder.subscribeActivityLifeCycle(); mLiveRoomViewHolder.subscribeActivityLifeCycle();
@ -875,13 +895,13 @@ public class LiveSwAnchorActivity extends LiveActivity implements LiveFunctionCl
MicedUserManager.get().removeAllMicUserList(); MicedUserManager.get().removeAllMicUserList();
MicUserManager.get().removeAllMicUserList(); MicUserManager.get().removeAllMicUserList();
if(mLiveRoomViewHolder!=null){ if (mLiveRoomViewHolder != null) {
//加载整蛊 //加载整蛊
mLiveRoomViewHolder.initPrankProgress(2); mLiveRoomViewHolder.initPrankProgress(2);
mLiveRoomViewHolder.sendMsgPrank(); mLiveRoomViewHolder.sendMsgPrank();
//初始化天梯数据 //初始化天梯数据
mLiveRoomViewHolder.initRankPKInfo(mLiveUid,""); mLiveRoomViewHolder.initRankPKInfo(mLiveUid, "");
} }
mLiveSwLinkMicPkPresenter.setmLiveRoomViewHolder(mLiveRoomViewHolder); mLiveSwLinkMicPkPresenter.setmLiveRoomViewHolder(mLiveRoomViewHolder);
} }
@ -975,6 +995,10 @@ public class LiveSwAnchorActivity extends LiveActivity implements LiveFunctionCl
mLiveEndViewHolder.addToParent(); mLiveEndViewHolder.addToParent();
mLiveEndViewHolder.showData(mLiveBean, mStream); mLiveEndViewHolder.showData(mLiveBean, mStream);
mLiveEndViewHolder.upData(datas.getString("votes"), datas.getString("length"), Long.parseLong(datas.getString("nums"))); mLiveEndViewHolder.upData(datas.getString("votes"), datas.getString("length"), Long.parseLong(datas.getString("nums")));
if (banEvent != null) {
mLiveEndViewHolder.showBanDownLive(banEvent);
banEvent = null;
}
} }
if (mLiveAnchorViewHolder != null) { if (mLiveAnchorViewHolder != null) {
mLiveAnchorViewHolder.release(); mLiveAnchorViewHolder.release();
@ -1240,9 +1264,9 @@ public class LiveSwAnchorActivity extends LiveActivity implements LiveFunctionCl
.param("uhead", CommonAppConfig.getInstance().getUserBean().getAvatar()) .param("uhead", CommonAppConfig.getInstance().getUserBean().getAvatar())
.param("pkname", CommonAppConfig.getInstance().getUserBean().getUserNiceName()); .param("pkname", CommonAppConfig.getInstance().getUserBean().getUserNiceName());
//判断是否是随机PK //判断是否是随机PK
if(extra){ if (extra) {
msg1.param("random_pk", "1"); msg1.param("random_pk", "1");
msg1.param("msgtype","11"); msg1.param("msgtype", "11");
if (RandomPkManager.getInstance().isRankModel()) { if (RandomPkManager.getInstance().isRankModel()) {
msg1.param("is_ladders", "https://downs.yaoulive.com/rank_top_box.png"); msg1.param("is_ladders", "https://downs.yaoulive.com/rank_top_box.png");
} }
@ -1297,7 +1321,7 @@ public class LiveSwAnchorActivity extends LiveActivity implements LiveFunctionCl
} }
} }
public void linkDrMicRemoveListUid(String uid){ public void linkDrMicRemoveListUid(String uid) {
if (mLiveAnchorViewHolder != null) { if (mLiveAnchorViewHolder != null) {
mLiveAnchorViewHolder.removeYaoqing(uid); mLiveAnchorViewHolder.removeYaoqing(uid);
} }
@ -1474,7 +1498,7 @@ public class LiveSwAnchorActivity extends LiveActivity implements LiveFunctionCl
@Override @Override
public void onUpdatePrankProgress(String prankString) { public void onUpdatePrankProgress(String prankString) {
if (mLiveRoomViewHolder != null){ if (mLiveRoomViewHolder != null) {
mLiveRoomViewHolder.refreshPrank(prankString); mLiveRoomViewHolder.refreshPrank(prankString);
} }
} }
@ -1665,7 +1689,7 @@ public class LiveSwAnchorActivity extends LiveActivity implements LiveFunctionCl
case LEAVE_DR_ROOM: case LEAVE_DR_ROOM:
if (mLiveRoomViewHolder != null) { if (mLiveRoomViewHolder != null) {
mLiveRoomViewHolder.seisShowGif(true); mLiveRoomViewHolder.seisShowGif(true);
if(DRPKing==1){ if (DRPKing == 1) {
mLiveRoomViewHolder.endDRGif(); mLiveRoomViewHolder.endDRGif();
} }
} }
@ -1680,7 +1704,7 @@ public class LiveSwAnchorActivity extends LiveActivity implements LiveFunctionCl
case LEAVE_PK_SCORE: case LEAVE_PK_SCORE:
if (mLiveSwLinkMicPkPresenter != null) { if (mLiveSwLinkMicPkPresenter != null) {
mLiveSwLinkMicPkPresenter.closeButtonGone(); mLiveSwLinkMicPkPresenter.closeButtonGone();
mLiveSwLinkMicPkPresenter.upDataPkScore(event.getPkScores(), event.getUid(), event.getTime(),true); mLiveSwLinkMicPkPresenter.upDataPkScore(event.getPkScores(), event.getUid(), event.getTime(), true);
} }
if (mLiveRoomViewHolder != null) { if (mLiveRoomViewHolder != null) {
mLiveRoomViewHolder.seisShowGif(true); mLiveRoomViewHolder.seisShowGif(true);
@ -1957,10 +1981,11 @@ public class LiveSwAnchorActivity extends LiveActivity implements LiveFunctionCl
} }
@Subscribe(threadMode = ThreadMode.MAIN) @Subscribe(threadMode = ThreadMode.MAIN)
public void onAllServerNotifyFFGGGDJANEvent(AllServerNotifyFFGGGDJANEvent event) { public void onAllServerNotifyFFGGGDJANEvent(AllServerNotifyFFGGGDJANEvent event) {
if (mLiveRoomViewHolder != null) { if (mLiveRoomViewHolder != null) {
mLiveRoomViewHolder.showAllServerNotifyFFGGGD(event,false); mLiveRoomViewHolder.showAllServerNotifyFFGGGD(event, false);
} }
} }
@ -1971,4 +1996,11 @@ public class LiveSwAnchorActivity extends LiveActivity implements LiveFunctionCl
} }
} }
private BanDownLiveEvent banEvent = null;
@Subscribe(threadMode = ThreadMode.MAIN)
public void onBanDownLiveEvent(BanDownLiveEvent event) {
banEvent = event;
}
} }

View File

@ -830,8 +830,9 @@ public class LiveGiftPopup extends AbsDialogFragment {
mBtnSendGroup.removeCallbacks(newLianSongRunnable); mBtnSendGroup.removeCallbacks(newLianSongRunnable);
getCoin(); getCoin();
if (liveGiftModel!=null){ if (liveGiftModel!=null){
int giftId=liveGiftModel.isPageGift()?liveGiftModel.getGift_id():liveGiftModel.getId();
LiveNetManager.get(mContext) LiveNetManager.get(mContext)
.getGiftNamingInfo(liveGiftModel.getId() + "", new com.yunbao.common.http.base.HttpCallback<GiftNamingInfoModel>() { .getGiftNamingInfo(giftId + "", new com.yunbao.common.http.base.HttpCallback<GiftNamingInfoModel>() {
@Override @Override
public void onSuccess(GiftNamingInfoModel data) { public void onSuccess(GiftNamingInfoModel data) {
if (TextUtils.equals(data.getNamingStatus(), "1")) { if (TextUtils.equals(data.getNamingStatus(), "1")) {

View File

@ -1255,6 +1255,7 @@ public class LiveGiftAnimPresenter {
stringBuilder.setSpan(new ForegroundColorSpan(Color.parseColor(dto.getColour())), unameIndexOf, unameIndexOf + unameSize, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); stringBuilder.setSpan(new ForegroundColorSpan(Color.parseColor(dto.getColour())), unameIndexOf, unameIndexOf + unameSize, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace();
iv_look_full_service_notice_new.setText(buttonString); iv_look_full_service_notice_new.setText(buttonString);
} }
iv_look_full_service_notice_new.setText(stringBuilder); iv_look_full_service_notice_new.setText(stringBuilder);

View File

@ -29,6 +29,7 @@ import com.yunbao.common.CommonAppConfig;
import com.yunbao.common.CommonAppContext; import com.yunbao.common.CommonAppContext;
import com.yunbao.common.Constants; import com.yunbao.common.Constants;
import com.yunbao.common.bean.AiAutomaticSpeechModel; import com.yunbao.common.bean.AiAutomaticSpeechModel;
import com.yunbao.common.bean.BanDownLiveEvent;
import com.yunbao.common.bean.FansModel; import com.yunbao.common.bean.FansModel;
import com.yunbao.common.bean.GuardMaturityDateRemindModel; import com.yunbao.common.bean.GuardMaturityDateRemindModel;
import com.yunbao.common.bean.LinkMicUserBean; import com.yunbao.common.bean.LinkMicUserBean;
@ -500,6 +501,15 @@ public class SocketSwClient {
if (action == 18) { if (action == 18) {
mListener.onLiveEnd(); mListener.onLiveEnd();
LiveEndViewHolder.upData(map.getString("votes"), map.getString("length"), map.getIntValue("nums"), map.getString("uname")); LiveEndViewHolder.upData(map.getString("votes"), map.getString("length"), map.getIntValue("nums"), map.getString("uname"));
if(map.containsKey("riskhType")){
Bus.get().post(new BanDownLiveEvent(
WordUtil.isNewZh()?map.getString("riskDescription"):map.getString("enRiskDescription"),
WordUtil.isNewZh()?map.getString("riskDescription"):map.getString("enRiskDescription"),
WordUtil.isNewZh()?map.getString("riskhType"):map.getString("enRiskhType"),
map.getString("date")
));
}
} else if (action == 19) { } else if (action == 19) {
mListener.onAnchorInvalid(); mListener.onAnchorInvalid();
} }

View File

@ -16,6 +16,7 @@ import androidx.recyclerview.widget.RecyclerView;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.yunbao.common.bean.AnchorRecommendModel; import com.yunbao.common.bean.AnchorRecommendModel;
import com.yunbao.common.bean.BanDownLiveEvent;
import com.yunbao.common.bean.IMLoginModel; import com.yunbao.common.bean.IMLoginModel;
import com.yunbao.common.bean.LiveBean; import com.yunbao.common.bean.LiveBean;
import com.yunbao.common.bean.SetAttentsModel; import com.yunbao.common.bean.SetAttentsModel;
@ -77,7 +78,7 @@ public class LiveEndViewHolder extends AbsViewHolder implements View.OnClickList
private IMLoginModel model = null; private IMLoginModel model = null;
private String live_id; private String live_id;
private String leaveStream, leaveGroupId; private String leaveStream, leaveGroupId;
private TextView banContent, banReason, banTimer; private TextView banTitle, banContent, banReason, banTimer;
private View banLayout; private View banLayout;
public LiveEndViewHolder(Context context, ViewGroup parentView, String uid) { public LiveEndViewHolder(Context context, ViewGroup parentView, String uid) {
@ -263,7 +264,8 @@ public class LiveEndViewHolder extends AbsViewHolder implements View.OnClickList
banContent = (TextView) findViewById(R.id.ban_content); banContent = (TextView) findViewById(R.id.ban_content);
banReason = (TextView) findViewById(R.id.ban_reason); banReason = (TextView) findViewById(R.id.ban_reason);
banTimer = (TextView) findViewById(R.id.ban_timer); banTimer = (TextView) findViewById(R.id.ban_timer);
banLayout=findViewById(R.id.banLayout); banTitle = (TextView) findViewById(R.id.ban_title);
banLayout = findViewById(R.id.banLayout);
findViewById(R.id.go_home_anchor) findViewById(R.id.go_home_anchor)
.setOnClickListener(new View.OnClickListener() { .setOnClickListener(new View.OnClickListener() {
@ -385,6 +387,14 @@ public class LiveEndViewHolder extends AbsViewHolder implements View.OnClickList
Bus.getOff(this); Bus.getOff(this);
} }
public void showBanDownLive(BanDownLiveEvent event) {
banTitle.setText(String.format(WordUtil.getNewString(R.string.live_end_view_ban_title), event.getReason()));
banReason.setText(String.format("%s", event.getReason()));
banContent.setText(event.getContent());
banTimer.setText(event.getTimer());
banLayout.setVisibility(View.VISIBLE);
}
/** /**
* 结束的类型 * 结束的类型
*/ */

View File

@ -944,7 +944,7 @@ public class LiveNewReadySwViewHolder extends AbsViewHolder implements View.OnCl
} }
}); });
} else { } else {
ToastUtil.show("請求中,請勿重複點擊"); ToastUtil.show(WordUtil.isNewZh()?"請求中,請勿重複點擊":"During request, please do not click repeatedly");
} }
} }

View File

@ -26,6 +26,9 @@ import com.yunbao.common.http.LiveHttpUtil;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
/**
* 直播间礼物栏包裹 fragment
*/
public class LiveParcelFragment extends BaseFragment { public class LiveParcelFragment extends BaseFragment {
private ViewPager fragmentViewpager; private ViewPager fragmentViewpager;
private int pageCount; private int pageCount;

View File

@ -17,7 +17,7 @@
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="#b3000000" android:background="#b3000000"
android:visibility="gone" android:visibility="gone"
tools:visibility="visible"> tools:visibility="gone">
<TextView <TextView
android:id="@+id/text_1" android:id="@+id/text_1"
@ -139,110 +139,6 @@
</LinearLayout> </LinearLayout>
<LinearLayout
android:id="@+id/banLayout"
android:layout_width="match_parent"
android:layout_height="180dp"
android:layout_below="@id/group"
android:visibility="gone"
android:layout_centerHorizontal="true"
android:layout_marginLeft="20dp"
android:layout_marginTop="20dp"
android:layout_marginRight="20dp"
android:orientation="vertical">
<TextView
android:id="@+id/ban_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/live_end_view_ban_title"
android:textColor="#E5E5E5"
android:textSize="14sp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="44dp"
android:layout_marginTop="10dp"
android:gravity="center"
android:background="@drawable/bg_live_end"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_marginLeft="10dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/live_end_view_ban_reason"
android:textColor="#E5E5E5"
android:textSize="14sp" />
<TextView
android:id="@+id/ban_reason"
android:layout_width="wrap_content"
android:layout_marginRight="17dp"
android:layout_height="wrap_content"
android:gravity="end"
android:text="123\n45678"
android:textColor="#E5E5E5"
android:textSize="14sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="44dp"
android:layout_marginTop="10dp"
android:gravity="center"
android:background="@drawable/bg_live_end"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_marginLeft="10dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/live_end_view_ban_content"
android:textColor="#E5E5E5"
android:textSize="14sp" />
<TextView
android:id="@+id/ban_content"
android:layout_width="wrap_content"
android:layout_marginRight="17dp"
android:layout_height="wrap_content"
android:gravity="end"
android:text="123\n45678"
android:textColor="#E5E5E5"
android:textSize="14sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="44dp"
android:layout_marginTop="10dp"
android:gravity="center"
android:background="@drawable/bg_live_end"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_marginLeft="10dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/live_end_view_ban_timer"
android:textColor="#E5E5E5"
android:textSize="14sp" />
<TextView
android:id="@+id/ban_timer"
android:layout_width="wrap_content"
android:layout_marginRight="17dp"
android:layout_height="wrap_content"
android:gravity="end"
android:text="123\n45678"
android:textColor="#E5E5E5"
android:textSize="14sp" />
</LinearLayout>
</LinearLayout>
<com.makeramen.roundedimageview.RoundedImageView <com.makeramen.roundedimageview.RoundedImageView
android:id="@+id/avatar_2" android:id="@+id/avatar_2"
@ -258,7 +154,7 @@
android:id="@+id/btn_back" android:id="@+id/btn_back"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="48dp" android:layout_height="48dp"
android:layout_below="@id/banLayout" android:layout_below="@id/group"
android:layout_marginLeft="50dp" android:layout_marginLeft="50dp"
android:layout_marginTop="50dp" android:layout_marginTop="50dp"
android:layout_marginRight="50dp" android:layout_marginRight="50dp"
@ -462,7 +358,8 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="#b3000000" android:background="#b3000000"
android:visibility="gone"> android:visibility="gone"
tools:visibility="visible">
<TextView <TextView
android:id="@+id/title" android:id="@+id/title"
@ -583,6 +480,118 @@
</RelativeLayout> </RelativeLayout>
<LinearLayout
android:id="@+id/banLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/anchor_data_show"
android:layout_centerHorizontal="true"
android:layout_marginLeft="20dp"
android:layout_marginTop="20dp"
android:layout_marginRight="20dp"
android:orientation="vertical"
android:visibility="gone"
tools:visibility="visible">
<TextView
android:id="@+id/ban_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/live_end_view_ban_title"
android:textColor="#E5E5E5"
android:textSize="14sp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:background="@drawable/bg_live_end"
android:gravity="center"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_weight="1"
android:text="@string/live_end_view_ban_reason"
android:textColor="#E5E5E5"
android:textSize="14sp" />
<TextView
android:id="@+id/ban_reason"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginRight="17dp"
android:gravity="end"
android:layout_weight="1"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:text="123\n45678"
tools:text="Pornography: Sexual behavior: Moderate pornography"
android:textColor="#E5E5E5"
android:textSize="14sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="44dp"
android:layout_marginTop="10dp"
android:background="@drawable/bg_live_end"
android:gravity="center"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_weight="1"
android:text="@string/live_end_view_ban_content"
android:textColor="#E5E5E5"
android:textSize="14sp" />
<TextView
android:id="@+id/ban_content"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="17dp"
android:gravity="end"
android:text="123\n45678"
android:textColor="#E5E5E5"
android:textSize="14sp" />
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="44dp"
android:layout_marginTop="10dp"
android:background="@drawable/bg_live_end"
android:gravity="center"
android:orientation="horizontal">
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginLeft="10dp"
android:layout_weight="1"
android:text="@string/live_end_view_ban_timer"
android:textColor="#E5E5E5"
android:textSize="14sp" />
<TextView
android:id="@+id/ban_timer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="17dp"
android:gravity="end"
android:text="123\n45678"
android:textColor="#E5E5E5"
android:textSize="14sp" />
</LinearLayout>
</LinearLayout>
<FrameLayout <FrameLayout
android:layout_width="88.13dp" android:layout_width="88.13dp"
android:layout_height="88.13dp" android:layout_height="88.13dp"