新增观众端点击未启用清晰度时的提示
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user