diff --git a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java index ae325bc80..43ea192f2 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java @@ -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() { @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 map_ekv = new HashMap(); @@ -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; diff --git a/main/src/main/java/com/yunbao/main/views/MainHomeViewHolder.java b/main/src/main/java/com/yunbao/main/views/MainHomeViewHolder.java index d731384ba..2fc9f7c2c 100644 --- a/main/src/main/java/com/yunbao/main/views/MainHomeViewHolder.java +++ b/main/src/main/java/com/yunbao/main/views/MainHomeViewHolder.java @@ -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; } - }); + });*/ } diff --git a/main/src/main/res/layout/item_battlepass_exchange.xml b/main/src/main/res/layout/item_battlepass_exchange.xml index 70e55d8cd..4ec3897ce 100644 --- a/main/src/main/res/layout/item_battlepass_exchange.xml +++ b/main/src/main/res/layout/item_battlepass_exchange.xml @@ -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" diff --git a/main/src/main/res/layout/item_battlepass_reward_type_top.xml b/main/src/main/res/layout/item_battlepass_reward_type_top.xml index f04c0d914..7afc6a5af 100644 --- a/main/src/main/res/layout/item_battlepass_reward_type_top.xml +++ b/main/src/main/res/layout/item_battlepass_reward_type_top.xml @@ -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" />