新增观众端点击未启用清晰度时的提示
This commit is contained in:
parent
16d02c6936
commit
7cea6b4f8d
@ -15,6 +15,8 @@ import com.lxj.xpopup.XPopup;
|
|||||||
import com.lxj.xpopup.core.BottomPopupView;
|
import com.lxj.xpopup.core.BottomPopupView;
|
||||||
import com.yunbao.common.R;
|
import com.yunbao.common.R;
|
||||||
import com.yunbao.common.utils.DeviceUtils;
|
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 com.yunbao.common.views.weight.ViewClicksAntiShake;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@ -104,6 +106,14 @@ public class LiveClarityCustomPopup extends BottomPopupView implements View.OnCl
|
|||||||
});
|
});
|
||||||
//高清
|
//高清
|
||||||
ViewClicksAntiShake.clicksAntiShake(lineHd, () -> {
|
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())));
|
String memorg = formateFileSize(Long.parseLong(DeviceUtils.getMemory(getContext())));
|
||||||
if ((Double.parseDouble(memorg) > 7 && netAverage > 100) || isUser) {
|
if ((Double.parseDouble(memorg) > 7 && netAverage > 100) || isUser) {
|
||||||
selectClarity = 1;
|
selectClarity = 1;
|
||||||
@ -131,7 +141,14 @@ public class LiveClarityCustomPopup extends BottomPopupView implements View.OnCl
|
|||||||
});
|
});
|
||||||
//超高清
|
//超高清
|
||||||
ViewClicksAntiShake.clicksAntiShake(lineFhd, () -> {
|
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())
|
new XPopup.Builder(getContext())
|
||||||
.asCustom(new HintCustomPopup(getContext()).setCallBack(new HintCustomPopup.HintCustomCallBack() {
|
.asCustom(new HintCustomPopup(getContext()).setCallBack(new HintCustomPopup.HintCustomCallBack() {
|
||||||
@Override
|
@Override
|
||||||
@ -151,14 +168,14 @@ public class LiveClarityCustomPopup extends BottomPopupView implements View.OnCl
|
|||||||
|
|
||||||
});
|
});
|
||||||
if (banSelect == BAN_720) {
|
if (banSelect == BAN_720) {
|
||||||
lineFhd.setEnabled(false);
|
lineFhd.setTag(false);
|
||||||
lineHd.setEnabled(false);
|
lineHd.setTag(false);
|
||||||
titleHDImg.setImageAlpha(40);
|
titleHDImg.setImageAlpha(40);
|
||||||
titleFHDImg.setImageAlpha(40);
|
titleFHDImg.setImageAlpha(40);
|
||||||
titleHDText.setAlpha(0.2f);
|
titleHDText.setAlpha(0.2f);
|
||||||
titleFHDText.setAlpha(0.2f);
|
titleFHDText.setAlpha(0.2f);
|
||||||
} else if (banSelect == BAN_1080) {
|
} else if (banSelect == BAN_1080) {
|
||||||
lineFhd.setEnabled(false);
|
lineFhd.setTag(false);
|
||||||
titleFHDText.setAlpha(0.2f);
|
titleFHDText.setAlpha(0.2f);
|
||||||
titleFHDImg.setImageAlpha(20);
|
titleFHDImg.setImageAlpha(20);
|
||||||
}
|
}
|
||||||
|
@ -998,4 +998,6 @@ Limited ride And limited avatar frame</string>
|
|||||||
<string name="discover_a_new_version" >Update</string>
|
<string name="discover_a_new_version" >Update</string>
|
||||||
<string name="latest_version" >Latest Version</string>
|
<string name="latest_version" >Latest Version</string>
|
||||||
<string name="updating" >updating</string>
|
<string name="updating" >updating</string>
|
||||||
|
<string name="live_user_ban_fhd" >There is no choice, the anchor is not turned on FHD live.</string>
|
||||||
|
<string name="live_user_ban_hd" >There is no choice, the anchor is not turned on HD live.</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
@ -1018,4 +1018,6 @@
|
|||||||
<string name="discover_a_new_version" >發現新版本,點此更新</string>
|
<string name="discover_a_new_version" >發現新版本,點此更新</string>
|
||||||
<string name="latest_version" >已是最新版本</string>
|
<string name="latest_version" >已是最新版本</string>
|
||||||
<string name="updating" >更新中</string>
|
<string name="updating" >更新中</string>
|
||||||
|
<string name="live_user_ban_fhd" >無法選擇,該主播未開啟超高清直播。</string>
|
||||||
|
<string name="live_user_ban_hd" >無法選擇,該主播未開啟高清直播。</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
Loading…
Reference in New Issue
Block a user