调整多人PK分数UI层top

调整部分equals反转
This commit is contained in:
zlzw 2024-09-25 11:17:34 +08:00
parent 5a19c0e1a5
commit f738a9202b
2 changed files with 11 additions and 9 deletions

View File

@ -6551,7 +6551,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
mRoot.removeView(detailsView);
}
L.eSw("upDataPkScore(JSONArray pkScores, int time) {detailsView=null");
detailsView = LayoutInflater.from(mContext).inflate(R.layout.view_live_pk_details, null);
detailsView = LayoutInflater.from(mContext).inflate(R.layout.view_live_pk_details, mParentView, false);
timeTitle = detailsView.findViewById(R.id.time_title);
textTime = detailsView.findViewById(R.id.text_time);
linearGrade1 = detailsView.findViewById(R.id.lin_pk1);
@ -6586,7 +6586,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams) detailsView.getLayoutParams();
params.height = vHeight;
params.width = mScreenWdith;
params.topMargin = DpUtil.dp2px(128);
params.topMargin = ((int) mContext.getResources().getDimension(R.dimen.live_top) - DpUtil.dp2px(15));
params.addRule(RelativeLayout.ALIGN_TOP);
detailsView.setLayoutParams(params);
}
@ -6721,7 +6721,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
RelativeLayout.LayoutParams params = (RelativeLayout.LayoutParams) detailsView.getLayoutParams();
params.height = vHeight;
params.width = mScreenWdith;
params.topMargin = DpUtil.dp2px(105);
params.topMargin = ((int) mContext.getResources().getDimension(R.dimen.live_top) - DpUtil.dp2px(15));
params.addRule(RelativeLayout.ALIGN_TOP);
detailsView.setLayoutParams(params);
}

View File

@ -27,6 +27,7 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.blankj.utilcode.util.GsonUtils;
import com.blankj.utilcode.util.LogUtils;
import com.lzf.easyfloat.EasyFloat;
import com.lzf.easyfloat.permission.PermissionUtils;
import com.lzf.easyfloat.utils.LifecycleUtils;
@ -693,7 +694,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
//初始化天梯赛信息
mLiveRoomViewHolder.initRankPKInfo(String.valueOf(data.getLiveInfo().getUid()), pkUid);
anyway = "1";
if (!TextUtils.isEmpty(pkUid) && !"0".equals(pkUid) && anyway.equals("0")) {
if (!TextUtils.isEmpty(pkUid) && !"0".equals(pkUid) && "0".equals(anyway)) {
if (mLiveSDK != Constants.LIVE_SDK_TX) {
String pkPull = pkInfo.getString("pkpull");
if (!TextUtils.isEmpty(pkPull) && mLiveLinkMicAnchorPresenter != null) {
@ -760,7 +761,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
mLiveRyLinkMicPkPresenter.onEnterRoomPkStart(pkUid, pkInfo.getLongValue("pk_gift_liveuid"), pkInfo.getLongValue("pk_gift_pkuid"), pkInfo.getIntValue("pk_time"), livePKUserListBean);
}
isShowPrank = false;
} else if (!pkInfo.getString("end_pk_time").equals("0")) {
} else if (!"0".equals(pkInfo.getString("end_pk_time"))) {
if (mLiveRoomViewHolder != null) {
mLiveRoomViewHolder.pkHandler = true;
mLiveRoomViewHolder.pkUid = pkUid;
@ -907,19 +908,19 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
}
//初始化整蠱列表
mLiveRoomViewHolder.initPrankProgress(isShowPrank?1:2);
mLiveRoomViewHolder.setComAll(data.getEnterRoomInfo().getIsComAll().equals("1"));
mLiveRoomViewHolder.setComAll("1".equals(data.getEnterRoomInfo().getIsComAll()));
L.e("getIsFirstEntry:"+data.getEnterRoomInfo().getIsFirstEntry());
L.e("getIsNewUser:"+data.getEnterRoomInfo().getIsNewUser());
L.e("getIsattention:"+data.getEnterRoomInfo().getIsattention());
if(data.getEnterRoomInfo().getIsNewUser().equals("1")){
if("1".equals(data.getEnterRoomInfo().getIsNewUser())){
//检测是否是首次观看该直播间
if(data.getEnterRoomInfo().getIsFirstEntry().equals("1")){
if("1".equals(data.getEnterRoomInfo().getIsFirstEntry())){
mLiveRoomViewHolder.firstLookLiveNotify();
}
//判断是否有免费礼物
if(data.getNewPeopleTask().getTask().getSendgift().equals("0")){
if("0".equals(data.getNewPeopleTask().getTask().getSendgift())){
mLiveRoomViewHolder.firstLook5MinLiveNotify();
}
//观看200秒之后推送活动入口im消息
@ -931,6 +932,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
@Override
public void onError(String error) {
ToastUtil.show(WordUtil.isNewZh() ? "抱歉!出錯了!" : "i \\'m sorry! An error occurred");
LogUtils.e(error);
//直播间上部轮播新人特惠趣味游戏幸运天使 轮播接口
mLiveRoomViewHolder.showLiveRoomActivityBanner();
}