diff --git a/live/src/main/java/com/yunbao/live/adapter/PrankAdapter.java b/live/src/main/java/com/yunbao/live/adapter/PrankAdapter.java index c6421f3a7..22fe4598f 100644 --- a/live/src/main/java/com/yunbao/live/adapter/PrankAdapter.java +++ b/live/src/main/java/com/yunbao/live/adapter/PrankAdapter.java @@ -71,7 +71,12 @@ public class PrankAdapter extends RecyclerView.Adapter if(viewHolder instanceof MyViewHolder){ MyViewHolder holder = (MyViewHolder) viewHolder; holder.itemView.setOnClickListener(v-> onItemClickListener.onItemClick(v,data.getGift_id())); - holder.prank_item_subscript.setText(String.valueOf(data.getCompleted_num())); + int completedNum = data.getCompleted_num(); + if (completedNum>99){ + holder.prank_item_subscript.setText("99+"); + }else { + holder.prank_item_subscript.setText(String.valueOf(data.getCompleted_num())); + } holder.prank_item_prank_name.setText(data.getPrank_content()); holder.prank_item_gift_name.setText(WordUtil.isNewZh() ? data.getGift_name() : data.getGift_name_en()); holder.prank_item_now_progress.setText(String.valueOf(data.getSend_num())); 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 0c622695b..ce0cc5831 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java @@ -1717,13 +1717,19 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis } if(prankAnisShow){ prankAdapter.showAnView(completedList,prankAnisShow); - prank_group_turntable.setText(WordUtil.isNewZh()?"整蠱進度":"progress"); + prank_group_turntable.setText(R.string.prank_progress); prank_group_title.setText(WordUtil.isNewZh()?"待完成整蠱":"To do"); - + if (!completedList.isEmpty()){ + limitItem(1,Math.min(completedList.size(), 4)); + }else { + recycler_prank.setVisibility(View.GONE); + } }else{ prankAdapter.showAnView(prankAndComboList,prankAnisShow); prank_group_turntable.setText(WordUtil.isNewZh()?"待完成整蠱":"To do"); prank_group_title.setText(WordUtil.isNewZh()?"整蠱進度":"To do"); + recycler_prank.setVisibility(View.VISIBLE); + limitItem(1,Math.min(prankAndComboList.size(), 4)); } }); diff --git a/live/src/main/res/layout/item_prank_progress.xml b/live/src/main/res/layout/item_prank_progress.xml index eb97fc70b..ed81e4fa7 100644 --- a/live/src/main/res/layout/item_prank_progress.xml +++ b/live/src/main/res/layout/item_prank_progress.xml @@ -10,12 +10,12 @@ diff --git a/live/src/main/res/layout/view_live_room.xml b/live/src/main/res/layout/view_live_room.xml index d0bd9e291..52cce3093 100644 --- a/live/src/main/res/layout/view_live_room.xml +++ b/live/src/main/res/layout/view_live_room.xml @@ -1502,14 +1502,6 @@ android:background="@color/white" android:visibility="invisible" /> - - + + +