新增戰令入口

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

View File

@ -72,7 +72,11 @@
android:textColor="#0D21B2" android:textColor="#0D21B2"
android:textSize="14sp" android:textSize="14sp"
android:textStyle="bold" 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_marginStart="2dp"
android:layout_marginEnd="2dp" android:layout_marginEnd="2dp"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"

View File

@ -124,6 +124,11 @@
android:textColor="#0D21B2" android:textColor="#0D21B2"
android:textSize="14sp" android:textSize="14sp"
android:textStyle="bold" 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_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tab_1_bg" /> app:layout_constraintTop_toBottomOf="@+id/tab_1_bg" />