新增戰令入口

調整戰令UI顯示不全問題
This commit is contained in:
zlzw 2024-01-05 17:29:15 +08:00
parent 6cdc648ea9
commit b175e42ee1
4 changed files with 38 additions and 9 deletions

View File

@ -1945,6 +1945,10 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
IMLoginModel userInfo = IMLoginManager.get(mContext).getUserInfo();
BannerBean bean = mBannerList2.get(p);
String type = "";
if (bean.getLink().equals("BattlePass")) {
RouteUtil.forwardBattlePass();
return;
}
StringBuffer htmlUrl = new StringBuffer();
//判断是否是星级活动
if (bean.isStart()) {
@ -2014,6 +2018,10 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
if (p >= 0 && p < mBannerList2.size()) {
IMLoginModel userInfo = IMLoginManager.get(mContext).getUserInfo();
BannerBean bean = mBannerList2.get(p);
if (bean.getLink().equals("BattlePass")) {
RouteUtil.forwardBattlePass();
return;
}
String type = "";
StringBuffer htmlUrl = new StringBuffer();
//判断是否是星级活动
@ -2205,6 +2213,10 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
BannerBean bean = mBannerList1.get(p);
if (bean != null) {
String link = bean.getLink();
if (link.equals("BattlePass")) {
RouteUtil.forwardBattlePass();
return;
}
if (link.equals("sc")) {
String url;
if (!"".equals(bean.getmIntoUrl()) && bean.getmIntoUrl() != null) {
@ -2479,7 +2491,8 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
mBlueVal.setLayoutParams(blueValLayoutParams);
}
}
public void initRankPKInfo(String mLiveUid){
public void initRankPKInfo(String mLiveUid) {
LiveNetManager.get(mContext)
.getRandomPk(mLiveUid, pkUid, new com.yunbao.common.http.base.HttpCallback<PkRankBean>() {
@Override
@ -4379,6 +4392,10 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
@Override
public void onBannerClick(List datas, int p) {
if (mBannerList3 != null) {
if (mBannerList3.get(p).getLink().equals("BattlePass")) {
RouteUtil.forwardBattlePass();
return;
}
if (mBannerList3.get(p).getLink().equals("0")) {
if (p == 0) {
((LiveAudienceActivity) mContext).openGiftWindow("" + bean1.getId(), "1");
@ -4414,6 +4431,10 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
@Override
public void onBannerClick(List datas, int p) {
if (mBannerList4.get(p).getLink().equals("BattlePass") || mBannerList4.get(p).getType() == 888) {
RouteUtil.forwardBattlePass();
return;
}
if (TextUtils.equals("特惠首冲", mBannerList4.get(p).getName())) {
Map<String, String> map_ekv = new HashMap<String, String>();
@ -4425,7 +4446,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
if (showLoadingDialog()) {
return;
}
if (bean.getActivityId() == -1) {//-1写死跳活动弹窗
if (bean.getActivityId() == -1) {//-1写死跳活动弹窗
Bus.get().post(new LiveAudienceEvent()
.setActivity(true)
.setType(LiveAudienceEvent.LiveAudienceType.BOTTOM_COLLECTION));
@ -5104,7 +5125,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
countdownHandler.post(countdownRunnable);
}
}
Log.e("多人Pk", "upDataPkScore mPkTimeCount:" +mPkTimeCount);
Log.e("多人Pk", "upDataPkScore mPkTimeCount:" + mPkTimeCount);
for (int i = 0; i < pkScores.size(); i++) {
JSONObject score = pkScores.getJSONObject(i);
String userNiceName = score.getString("user_nicename");
@ -5195,10 +5216,10 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
public void run() {
mPkTimeCount--;
if (mPkTimeCount > 0) {//
Log.e("多人Pk", "countdownRunnable mPkTimeCount:" +mPkTimeCount);
Log.e("多人Pk", "countdownRunnable mPkTimeCount:" + mPkTimeCount);
String s1 = StringUtil.getDurationText(mPkTimeCount * 1000);
textTime.setText(String.format(mContext.getString(R.string.pk_time), s1));
Log.e("多人Pk", "countdownRunnable s1:" +s1);
Log.e("多人Pk", "countdownRunnable s1:" + s1);
countdownHandler.postAtTime(countdownRunnable, getNextSecondTime());
} else {
mPkTimeCount = 0;

View File

@ -43,13 +43,12 @@ public class MainHomeViewHolder extends AbsMainHomeParentViewHolder {
ImgLoader.display(mContext, "https://downs.yaoulive.com/gif_trophy.gif", img_trophy);
img_trophy.setOnLongClickListener(new View.OnLongClickListener() {
/* img_trophy.setOnLongClickListener(new View.OnLongClickListener() {
@Override
public boolean onLongClick(View view) {
RouteUtil.forwardBattlePass();
return true;
}
});
});*/
}

View File

@ -72,7 +72,11 @@
android:textColor="#0D21B2"
android:textSize="14sp"
android:textStyle="bold"
android:maxLines="1"
android:maxLines="2"
app:autoSizeMaxTextSize="14sp"
app:autoSizeMinTextSize="5sp"
app:autoSizeStepGranularity="1sp"
app:autoSizeTextType="uniform"
android:layout_marginStart="2dp"
android:layout_marginEnd="2dp"
app:layout_constraintEnd_toEndOf="parent"

View File

@ -124,6 +124,11 @@
android:textColor="#0D21B2"
android:textSize="14sp"
android:textStyle="bold"
android:maxLines="2"
app:autoSizeMaxTextSize="14sp"
app:autoSizeMinTextSize="5sp"
app:autoSizeStepGranularity="1sp"
app:autoSizeTextType="uniform"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tab_1_bg" />