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 6604c060d..e1f449021 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java @@ -931,6 +931,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis private TextView sud_text_name; private View sud_layout_name; + private View tricky_layout_name; private TextView sud_join; private ImageView iconSudClose; private Handler sudNameHandler = new Handler(); @@ -943,6 +944,24 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis } }; + private Runnable trickyRunnable = new Runnable() { + @Override + public void run() { + if (tricky_layout_name != null) { + tricky_layout_name.setVisibility(View.GONE); + } + } + }; + + + private void setTrickyMsg(){ + if (tricky_layout_name != null) { + tricky_layout_name.setVisibility(View.VISIBLE); + } + sudNameHandler.removeCallbacks(trickyRunnable); + sudNameHandler.postDelayed(trickyRunnable, 10000); + } + public void setSudName(String sudName, SudGameDateModel sudGameDateModel) { sud_text_name = (TextView) findViewById(R.id.sud_text_name); sud_layout_name = findViewById(R.id.sud_layout_name); @@ -2303,6 +2322,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis prank_group_turntable = (TextView) findViewById(R.id.prank_group_turntable);//文字转盘整蛊(用户端已删除,主播端为待完成整蛊按钮) prank_group_bottom_icon = (ImageView) findViewById(R.id.prank_group_bottom_icon);//收起icon prank_group_turntable_icon = (ImageView) findViewById(R.id.prank_group_turntable_icon);//转盘图标 + tricky_layout_name = findViewById(R.id.tricky_layout_name); prank_small_icon = (GifImageView) findViewById(R.id.prank_small_icon);//收起后图标 zhengguTv = findViewById(R.id.zhengguTv); try { @@ -2373,6 +2393,9 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis prank_group_turntable_icon.setOnClickListener(v -> { Bus.get().post(new LiveAudienceEvent().setType(LiveAudienceEvent.LiveAudienceType.WE_CHEAT)); }); + tricky_layout_name.setOnClickListener(v -> { + Bus.get().post(new LiveAudienceEvent().setType(LiveAudienceEvent.LiveAudienceType.WE_CHEAT)); + }); recycler_prank.setLayoutManager(new LinearLayoutManager(mContext)); @@ -2469,6 +2492,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis // prank_small_icon.setVisibility(View.GONE); zhengguTv.setVisibility(View.GONE); prank_group_turntable_icon.setVisibility(View.GONE); + tricky_layout_name.setVisibility(View.GONE); ToastUtil.show(WordUtil.isNewZh() ? "抱歉!出錯了!" : "i \\'m sorry! An error occurred"); } }); @@ -2495,8 +2519,10 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis } if (Integer.parseInt(ctString.getString("prank_turntable_status")) == 0) { prank_group_turntable_icon.setVisibility(View.GONE); + tricky_layout_name.setVisibility(View.GONE); } else { prank_group_turntable_icon.setVisibility(View.VISIBLE); + setTrickyMsg(); //ZeusKt.visible(prank_group_turntable_icon); } } else { @@ -2560,9 +2586,11 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis if (prankTurntableStatus == 1 && lt_trickery.getVisibility() == View.GONE) { if (!CommonAppConfig.getInstance().getUid().equals(mLiveUid)) { prank_group_turntable_icon.setVisibility(View.VISIBLE); + setTrickyMsg(); } } else { prank_group_turntable_icon.setVisibility(View.GONE); + tricky_layout_name.setVisibility(View.GONE); } // LogUtils.e("yqw=====>显示整蛊列表或者投票列表:"+status); if (status == 1) { @@ -5909,6 +5937,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis name = jsonObject.getString("user_nicename"); lt_trickery.setVisibility(View.VISIBLE); prank_group_turntable_icon.setVisibility(View.GONE); + tricky_layout_name.setVisibility(View.GONE); lt_trickery.setBackground(mContext.getResources().getDrawable(R.mipmap.img_buoy)); isClose = false; starTimeloud(1, time); @@ -6995,8 +7024,13 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis contentTv.setText(data.getLivePreview().getContent()); // ImgLoader.display(mContext, preview.getStyleImage(), mAnchorSayImage); if (preview.getIsShow() == 1) { - mAnchorSay.setVisibility(View.VISIBLE); - newGodSayGroup.setVisibility(View.GONE); + if(isHinde){ + mAnchorSay.setVisibility(View.GONE); + newGodSayGroup.setVisibility(View.GONE); + }else { + mAnchorSay.setVisibility(View.VISIBLE); + newGodSayGroup.setVisibility(View.GONE); + } } else { mAnchorSay.setVisibility(View.INVISIBLE); newGodSayGroup.setVisibility(View.GONE); diff --git a/live/src/main/res/drawable/bg_live_room_tricky_hint_join.xml b/live/src/main/res/drawable/bg_live_room_tricky_hint_join.xml new file mode 100644 index 000000000..08050cd92 --- /dev/null +++ b/live/src/main/res/drawable/bg_live_room_tricky_hint_join.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/live/src/main/res/layout/view_live_room.xml b/live/src/main/res/layout/view_live_room.xml index 967a20b1a..a18f4efc8 100644 --- a/live/src/main/res/layout/view_live_room.xml +++ b/live/src/main/res/layout/view_live_room.xml @@ -3119,6 +3119,64 @@ android:src="@mipmap/icon_live_notify_close1" /> + + + + + + + + + +