From 7cea6b4f8d3f2ccc0b81fd07fcb2a9357c631244 Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Thu, 5 Jan 2023 17:28:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=A7=82=E4=BC=97=E7=AB=AF?= =?UTF-8?q?=E7=82=B9=E5=87=BB=E6=9C=AA=E5=90=AF=E7=94=A8=E6=B8=85=E6=99=B0?= =?UTF-8?q?=E5=BA=A6=E6=97=B6=E7=9A=84=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../common/views/LiveClarityCustomPopup.java | 25 ++++++++++++++++--- common/src/main/res/values-en/strings.xml | 2 ++ common/src/main/res/values/strings.xml | 2 ++ 3 files changed, 25 insertions(+), 4 deletions(-) diff --git a/common/src/main/java/com/yunbao/common/views/LiveClarityCustomPopup.java b/common/src/main/java/com/yunbao/common/views/LiveClarityCustomPopup.java index e1faf4ba3..e0abd63d7 100644 --- a/common/src/main/java/com/yunbao/common/views/LiveClarityCustomPopup.java +++ b/common/src/main/java/com/yunbao/common/views/LiveClarityCustomPopup.java @@ -15,6 +15,8 @@ import com.lxj.xpopup.XPopup; import com.lxj.xpopup.core.BottomPopupView; import com.yunbao.common.R; import com.yunbao.common.utils.DeviceUtils; +import com.yunbao.common.utils.ToastUtil; +import com.yunbao.common.utils.WordUtil; import com.yunbao.common.views.weight.ViewClicksAntiShake; import java.util.ArrayList; @@ -104,6 +106,14 @@ public class LiveClarityCustomPopup extends BottomPopupView implements View.OnCl }); //高清 ViewClicksAntiShake.clicksAntiShake(lineHd, () -> { + if(lineHd.getTag()!=null){ + if(isUser){//用户端 + ToastUtil.show(R.string.live_user_ban_hd); + }else{//主播端 + ToastUtil.show(""); + } + return; + } String memorg = formateFileSize(Long.parseLong(DeviceUtils.getMemory(getContext()))); if ((Double.parseDouble(memorg) > 7 && netAverage > 100) || isUser) { selectClarity = 1; @@ -131,7 +141,14 @@ public class LiveClarityCustomPopup extends BottomPopupView implements View.OnCl }); //超高清 ViewClicksAntiShake.clicksAntiShake(lineFhd, () -> { - + if(lineFhd.getTag()!=null){ + if(isUser){//用户端 + ToastUtil.show(R.string.live_user_ban_fhd); + }else{//主播端 + ToastUtil.show(""); + } + return; + } new XPopup.Builder(getContext()) .asCustom(new HintCustomPopup(getContext()).setCallBack(new HintCustomPopup.HintCustomCallBack() { @Override @@ -151,14 +168,14 @@ public class LiveClarityCustomPopup extends BottomPopupView implements View.OnCl }); if (banSelect == BAN_720) { - lineFhd.setEnabled(false); - lineHd.setEnabled(false); + lineFhd.setTag(false); + lineHd.setTag(false); titleHDImg.setImageAlpha(40); titleFHDImg.setImageAlpha(40); titleHDText.setAlpha(0.2f); titleFHDText.setAlpha(0.2f); } else if (banSelect == BAN_1080) { - lineFhd.setEnabled(false); + lineFhd.setTag(false); titleFHDText.setAlpha(0.2f); titleFHDImg.setImageAlpha(20); } diff --git a/common/src/main/res/values-en/strings.xml b/common/src/main/res/values-en/strings.xml index 47c22d55e..867103039 100644 --- a/common/src/main/res/values-en/strings.xml +++ b/common/src/main/res/values-en/strings.xml @@ -998,4 +998,6 @@ Limited ride And limited avatar frame Update Latest Version updating + There is no choice, the anchor is not turned on FHD live. + There is no choice, the anchor is not turned on HD live. diff --git a/common/src/main/res/values/strings.xml b/common/src/main/res/values/strings.xml index 5bc7c5f05..c5207ac34 100644 --- a/common/src/main/res/values/strings.xml +++ b/common/src/main/res/values/strings.xml @@ -1018,4 +1018,6 @@ 發現新版本,點此更新 已是最新版本 更新中 + 無法選擇,該主播未開啟超高清直播。 + 無法選擇,該主播未開啟高清直播。