diff --git a/common/src/main/java/com/yunbao/common/views/ReplacementHintCustomPopup.java b/common/src/main/java/com/yunbao/common/views/ReplacementHintCustomPopup.java
index cc5e93da2..9b4668965 100644
--- a/common/src/main/java/com/yunbao/common/views/ReplacementHintCustomPopup.java
+++ b/common/src/main/java/com/yunbao/common/views/ReplacementHintCustomPopup.java
@@ -49,21 +49,13 @@ public class ReplacementHintCustomPopup extends CenterPopupView {
wishTab.setText(String.format("【%s】", getContext().getString(R.string.seasonal_wish)));
break;
}
- ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.live_open_cancel), new ViewClicksAntiShake.ViewClicksCallBack() {
- @Override
- public void onViewClicks() {
- if (callBack != null) {
- callBack.onReplacement(type);
- }
- dismiss();
- }
- });
- ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.live_open_ok), new ViewClicksAntiShake.ViewClicksCallBack() {
- @Override
- public void onViewClicks() {
- dismiss();
+ ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.live_open_cancel), () -> {
+ if (callBack != null) {
+ callBack.onReplacement(type);
}
+ dismiss();
});
+ ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.live_open_ok), this::dismiss);
}
public interface ReplacementHintCallBack {
diff --git a/common/src/main/res/values-zh-rHK/strings.xml b/common/src/main/res/values-zh-rHK/strings.xml
index 58c751518..6ee9349ce 100644
--- a/common/src/main/res/values-zh-rHK/strings.xml
+++ b/common/src/main/res/values-zh-rHK/strings.xml
@@ -1117,5 +1117,5 @@
語言設定
繁體中文
添加禮物、貴族、守護心願
-
+ 热度加成
diff --git a/common/src/main/res/values-zh-rTW/strings.xml b/common/src/main/res/values-zh-rTW/strings.xml
index 58c751518..6ee9349ce 100644
--- a/common/src/main/res/values-zh-rTW/strings.xml
+++ b/common/src/main/res/values-zh-rTW/strings.xml
@@ -1117,5 +1117,5 @@
語言設定
繁體中文
添加禮物、貴族、守護心願
-
+ 热度加成
diff --git a/common/src/main/res/values-zh/strings.xml b/common/src/main/res/values-zh/strings.xml
index 58c751518..6ee9349ce 100644
--- a/common/src/main/res/values-zh/strings.xml
+++ b/common/src/main/res/values-zh/strings.xml
@@ -1117,5 +1117,5 @@
語言設定
繁體中文
添加禮物、貴族、守護心願
-
+ 热度加成
diff --git a/common/src/main/res/values/strings.xml b/common/src/main/res/values/strings.xml
index 5075afad5..842d4f078 100644
--- a/common/src/main/res/values/strings.xml
+++ b/common/src/main/res/values/strings.xml
@@ -1124,5 +1124,6 @@ Limited ride And limited avatar frame
unfollow
Where is the host doing badly~\nBrother, are you sure you want to unfollow?
follow
+ Heat Add
diff --git a/live/src/main/java/com/yunbao/live/activity/LiveRyAnchorActivity.java b/live/src/main/java/com/yunbao/live/activity/LiveRyAnchorActivity.java
index 12994b1cf..0964f123f 100644
--- a/live/src/main/java/com/yunbao/live/activity/LiveRyAnchorActivity.java
+++ b/live/src/main/java/com/yunbao/live/activity/LiveRyAnchorActivity.java
@@ -1577,17 +1577,17 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl
if (mLiveRyLinkMicPkPresenter != null) {
mLiveRyLinkMicPkPresenter.leaveDRRoom();
}
- if (mLiveRoomViewHolder != null) {
- mLiveRoomViewHolder.hotAddVisibility(false);
- }
+// if (mLiveRoomViewHolder != null) {
+// mLiveRoomViewHolder.hotAddVisibility(false);
+// }
break;
case LEAVE_PK_SCORE:
if (mLiveRyLinkMicPkPresenter != null) {
mLiveRyLinkMicPkPresenter.upDataPkScore(event.getPkScores(), event.getUid(), event.getTime());
}
- if (mLiveRoomViewHolder != null) {
- mLiveRoomViewHolder.hotAddVisibility(true);
- }
+// if (mLiveRoomViewHolder != null) {
+// mLiveRoomViewHolder.hotAddVisibility(true);
+// }
break;
case PK_TIME_COUNT:
if (mLiveRoomViewHolder != null) {
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 8e406b8b4..208ac6b57 100644
--- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java
+++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java
@@ -235,8 +235,8 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
public static int isAttention = 0;//是否关注 0=没关注,
public static String mNameText;
public static String mAvatarUrl;
- public static FrameLayout ft_hot_add;
- public static ImageView img_hot_gif, newMessage, atMessage;
+ // public static FrameLayout ft_hot_add;
+ public static ImageView newMessage, atMessage;
//多人PK
static TextView time;
@@ -340,7 +340,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
//接口整合新加参数
private GuardUserModel guardUserModel;
- private ViewFlipper flipper;
+ private static ViewFlipper flipper;
private TextView mRandomPkTimer;
//全服通知
@@ -649,10 +649,10 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
private static boolean visibility = false;
- public void hotAddVisibility(boolean visibility) {
- this.visibility = visibility;
- ft_hot_add.setVisibility(visibility ? View.GONE : View.VISIBLE);
- }
+// public void hotAddVisibility(boolean visibility) {
+// this.visibility = visibility;
+// ft_hot_add.setVisibility(visibility ? View.GONE : View.VISIBLE);
+// }
public void endDRGif() {
if (dr_pk_end_gif.getVisibility() == View.GONE) {
@@ -1310,8 +1310,8 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
lt_pk_line = (RelativeLayout) findViewById(R.id.lt_pk_line);
clickAvatar();
- ft_hot_add = (FrameLayout) findViewById(R.id.ft_hot_add);
- img_hot_gif = (ImageView) findViewById(R.id.img_hot_gif);
+// ft_hot_add = (FrameLayout) findViewById(R.id.ft_hot_add);
+// img_hot_gif = (ImageView) findViewById(R.id.img_hot_gif);
findViewById(R.id.ft_hot_add).setOnClickListener(this);
ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.open_sidebar), () -> Bus.get().post(new LiveAudienceEvent()
.setType(LiveAudienceEvent.LiveAudienceType.SIDEBAR)));
@@ -1904,7 +1904,9 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
textParams.leftMargin = DpUtil.dp2px(5);
params.leftMargin = DpUtil.dp2px(5);
View hotView = LayoutInflater.from(mContext).inflate(R.layout.view_wish_list, null);
+ hotView.setTag("hotView");
View hourView = LayoutInflater.from(mContext).inflate(R.layout.view_wish_list, null);
+ hourView.setTag("hourView");
ImageView hotPic = hotView.findViewById(R.id.wish_pic);
ImageView hourPic = hourView.findViewById(R.id.wish_pic);
mHotText = hotView.findViewById(R.id.wish_index);
@@ -1922,7 +1924,9 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
flipper.addView(hotView);
flipper.addView(hourView);
flipper.startFlipping();
+
flipper.setOnClickListener(view -> {
+ ToastUtil.show(String.valueOf(flipper.getDisplayedChild()));
Bundle bundle = new Bundle();
String path = model.getHourchartH5Url();
if (!path.startsWith("/")) {
@@ -1978,23 +1982,22 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
flipper.addView(hotView);
flipper.addView(hourView);
flipper.startFlipping();
- flipper.setOnClickListener(view -> {
- Bundle bundle = new Bundle();
- String path = info.get(0).getUrl();
- if (!path.startsWith("/")) {
- path = "/" + path;
+// flipper.setOnClickListener(view -> {
+//
+// });
+ ViewClicksAntiShake.clicksAntiShake(hotView, new ViewClicksAntiShake.ViewClicksCallBack() {
+ @Override
+ public void onViewClicks() {
+ showUrlHDDialog(info.get(0).getUrl());
}
- String url = CommonAppConfig.HOST + path;
- url += "&uid=" + CommonAppConfig.getInstance().getUid() + "&token="
- + CommonAppConfig.getInstance().getToken() + "&anchorUid=" + mLiveUid;
- bundle.putString("url", url);
- bundle.putInt("height", DpUtil.dp2px(500));
- bundle.putInt("show_type", 0);
- bundle.putString("roomId", mLiveUid);
- LiveHDDialogFragment liveHDDialogFragment = new LiveHDDialogFragment();
- liveHDDialogFragment.setArguments(bundle);
- liveHDDialogFragment.show(((AbsActivity) mContext).getSupportFragmentManager(), "LiveHDDialogFragment");
});
+ ViewClicksAntiShake.clicksAntiShake(hourView, new ViewClicksAntiShake.ViewClicksCallBack() {
+ @Override
+ public void onViewClicks() {
+ showUrlHDDialog(info.get(0).getUrl());
+ }
+ });
+
}
}, Throwable::printStackTrace)
@@ -2002,6 +2005,23 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
new LoadDian9TuUtil().loadDian9TuAssets2(mContext, hourRankLayout, "rectangle_new.png", 1);
}
+ private void showUrlHDDialog(String path) {
+ Bundle bundle = new Bundle();
+ if (!path.startsWith("/")) {
+ path = "/" + path;
+ }
+ String url = CommonAppConfig.HOST + path;
+ url += "&uid=" + CommonAppConfig.getInstance().getUid() + "&token="
+ + CommonAppConfig.getInstance().getToken() + "&anchorUid=" + mLiveUid;
+ bundle.putString("url", url);
+ bundle.putInt("height", DpUtil.dp2px(500));
+ bundle.putInt("show_type", 0);
+ bundle.putString("roomId", mLiveUid);
+ LiveHDDialogFragment liveHDDialogFragment = new LiveHDDialogFragment();
+ liveHDDialogFragment.setArguments(bundle);
+ liveHDDialogFragment.show(((AbsActivity) mContext).getSupportFragmentManager(), "LiveHDDialogFragment");
+ }
+
private void initPkRankView(PkRankBean bean) {
if (pkRankVf.getTag() != null) {
@@ -3437,32 +3457,67 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
* 获取是否有热度卡加成
*/
public static void getIsHot() {
- ImgLoader.display2(Contexts, "https://downs.yaoulive.com/img_hot_gif.gif", img_hot_gif);
- LiveHttpUtil.isHotCard(mLiveUid, new HttpCallback() {
+ LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(DpUtil.dp2px(16), DpUtil.dp2px(16));
+ LinearLayout.LayoutParams textParams = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
+ textParams.leftMargin = DpUtil.dp2px(5);
+ params.leftMargin = DpUtil.dp2px(5);
+ View hotView = LayoutInflater.from(Contexts).inflate(R.layout.view_wish_list, null);
+ hotView.setTag("HeatAdd");
+ ImageView hotPic = hotView.findViewById(R.id.wish_pic);
+ TextView mHotText = hotView.findViewById(R.id.wish_index);
+ mHotText.setText(R.string.heat_add);
+ hotPic.setImageResource(R.drawable.icon_heat_2);
+ mHotText.setLayoutParams(textParams);
+ hotPic.setLayoutParams(params);
+ flipper.addView(hotView);
+ ViewClicksAntiShake.clicksAntiShake(hotView, new ViewClicksAntiShake.ViewClicksCallBack() {
@Override
- public void onSuccess(int code, String msg, String[] info) {
- if (code == 0 && info.length > 0) {
- if ("1".equals(info[0]) && !visibility) {
- ft_hot_add.setVisibility(View.VISIBLE);
- } else {
- ft_hot_add.setVisibility(View.GONE);
- }
- }
+ public void onViewClicks() {
+ ((LiveActivity) Contexts).openHotListWindow(1);
}
});
+// ImgLoader.display2(Contexts, "https://downs.yaoulive.com/img_hot_gif.gif", img_hot_gif);
+// LiveHttpUtil.isHotCard(mLiveUid, new HttpCallback() {
+// @Override
+// public void onSuccess(int code, String msg, String[] info) {
+// if (code == 0 && info.length > 0) {
+// if ("1".equals(info[0]) && !visibility) {
+// ft_hot_add.setVisibility(View.VISIBLE);
+// } else {
+// ft_hot_add.setVisibility(View.GONE);
+// }
+// }
+// }
+// });
}
/**
* 获取是否有热度卡加成
*/
public void getIsHot(String isUseHotCard) {
- ImgLoader.display2(Contexts, "https://downs.yaoulive.com/img_hot_gif.gif", img_hot_gif);
if ("1".equals(isUseHotCard) && !visibility) {
- ft_hot_add.setVisibility(View.VISIBLE);
- } else {
- ft_hot_add.setVisibility(View.GONE);
+ LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(DpUtil.dp2px(16), DpUtil.dp2px(16));
+ LinearLayout.LayoutParams textParams = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT);
+ textParams.leftMargin = DpUtil.dp2px(5);
+ params.leftMargin = DpUtil.dp2px(5);
+ View hotView = LayoutInflater.from(Contexts).inflate(R.layout.view_wish_list, null);
+ hotView.setTag("HeatAdd");
+ ImageView hotPic = hotView.findViewById(R.id.wish_pic);
+ TextView mHotText = hotView.findViewById(R.id.wish_index);
+ mHotText.setText(R.string.heat_add);
+ hotPic.setImageResource(R.drawable.icon_heat_2);
+ mHotText.setLayoutParams(textParams);
+ hotPic.setLayoutParams(params);
+ flipper.addView(hotView);
+ ViewClicksAntiShake.clicksAntiShake(hotView, new ViewClicksAntiShake.ViewClicksCallBack() {
+ @Override
+ public void onViewClicks() {
+ ((LiveActivity) Contexts).openHotListWindow(1);
+ }
+ });
}
+
}
public void resetUserListWidth(int width) {
@@ -4624,10 +4679,10 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
ImgLoader.display(mContext, preview.getStyleImage(), mAnchorSayImage);
if (preview.getIsShow() == 1) {
mAnchorSay.setVisibility(View.VISIBLE);
- }else{
+ } else {
mAnchorSay.setVisibility(View.INVISIBLE);
}
- }else{
+ } else {
mAnchorSay.setVisibility(View.INVISIBLE);
}
diff --git a/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java b/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java
index 0b212fd21..f7816103b 100644
--- a/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java
+++ b/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java
@@ -1435,9 +1435,9 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
* @param isPk
*/
public void setPkStatus(boolean isPk) {
- if (mLiveRoomViewHolder != null) {
- mLiveRoomViewHolder.hotAddVisibility(isPk);
- }
+// if (mLiveRoomViewHolder != null) {
+// mLiveRoomViewHolder.hotAddVisibility(isPk);
+// }
}
diff --git a/live/src/main/res/drawable/icon_heat_2.png b/live/src/main/res/drawable/icon_heat_2.png
new file mode 100644
index 000000000..1c6f96570
Binary files /dev/null and b/live/src/main/res/drawable/icon_heat_2.png differ
diff --git a/live/src/main/res/layout/view_live_room.xml b/live/src/main/res/layout/view_live_room.xml
index 4b173dd33..3c5c7d43c 100644
--- a/live/src/main/res/layout/view_live_room.xml
+++ b/live/src/main/res/layout/view_live_room.xml
@@ -227,7 +227,7 @@