fix 修复礼物墙测试问题

This commit is contained in:
zlzw 2024-07-18 16:39:06 +08:00
parent d3055d8fb2
commit 048c66736f
11 changed files with 49 additions and 23 deletions

View File

@ -148,7 +148,7 @@ public class GiftWallMainTab1List2Adapter extends RecyclerView.Adapter<GiftWallM
giftBg.setClearsAfterDetached(false); giftBg.setClearsAfterDetached(false);
giftBg.setClearsAfterStop(false); giftBg.setClearsAfterStop(false);
if (gift.getIlluminate_status() == 1) { if (gift.getIlluminate_status() == 1) {
gift_status.setText(String.format("%s%d", WordUtil.getNewString(R.string.dialog_gift_wall_list_spinner_up), gift.getGift_hall_send_num())); gift_status.setText(String.format("%s%s", WordUtil.getNewString(R.string.dialog_gift_wall_list_spinner_up), gift.getGift_hall_send_numForString()));
gift_status.setTextColor(Color.parseColor("#FFFFFF")); gift_status.setTextColor(Color.parseColor("#FFFFFF"));
gift_soles.setImageResource(getSolesrRes()); gift_soles.setImageResource(getSolesrRes());
if (drawable != null) { if (drawable != null) {

View File

@ -44,8 +44,8 @@ public class GiftWallBean extends BaseModel {
} }
public String getGift_hall_start_date() { public String getGift_hall_start_date() {
if(!StringUtil.isEmpty("gift_hall_start_date")){ if (!StringUtil.isEmpty("gift_hall_start_date")) {
gift_hall_start_date=gift_hall_start_date.replace("-","/"); gift_hall_start_date = gift_hall_start_date.replace("-", "/");
} }
return gift_hall_start_date; return gift_hall_start_date;
} }
@ -55,8 +55,8 @@ public class GiftWallBean extends BaseModel {
} }
public String getGift_hall_end_date() { public String getGift_hall_end_date() {
if(!StringUtil.isEmpty("gift_hall_end_date")){ if (!StringUtil.isEmpty("gift_hall_end_date")) {
gift_hall_end_date=gift_hall_end_date.replace("-","/"); gift_hall_end_date = gift_hall_end_date.replace("-", "/");
} }
return gift_hall_end_date; return gift_hall_end_date;
} }
@ -134,17 +134,19 @@ public class GiftWallBean extends BaseModel {
} }
public String getGift_hall_start() { public String getGift_hall_start() {
if(!StringUtil.isEmpty(gift_hall_start)){ if (!StringUtil.isEmpty(gift_hall_start)) {
gift_hall_start=gift_hall_start.replace("-","/"); gift_hall_start = gift_hall_start.replace("-", "/");
} }
return gift_hall_start; return gift_hall_start;
} }
public String getGift_hall_end() { public String getGift_hall_end() {
if(!StringUtil.isEmpty(gift_hall_end)){ if (!StringUtil.isEmpty(gift_hall_end)) {
gift_hall_end=gift_hall_end.replace("-","/"); gift_hall_end = gift_hall_end.replace("-", "/");
} }
return gift_hall_end; return gift_hall_end;
} }
public int getGift_id() { public int getGift_id() {
return gift_id; return gift_id;
} }
@ -230,6 +232,13 @@ public class GiftWallBean extends BaseModel {
return gift_hall_send_num; return gift_hall_send_num;
} }
public String getGift_hall_send_numForString() {
if (gift_hall_send_num > 999) {
return "999+";
}
return gift_hall_send_num + "";
}
public void setGift_hall_send_num(int gift_hall_send_num) { public void setGift_hall_send_num(int gift_hall_send_num) {
this.gift_hall_send_num = gift_hall_send_num; this.gift_hall_send_num = gift_hall_send_num;
} }

View File

@ -23,6 +23,7 @@ import com.yunbao.common.fragment.BaseFragment;
import com.yunbao.common.fragment.GiftWallMainTab1Fragment; import com.yunbao.common.fragment.GiftWallMainTab1Fragment;
import com.yunbao.common.fragment.GiftWallMainTab2Fragment; import com.yunbao.common.fragment.GiftWallMainTab2Fragment;
import com.yunbao.common.interfaces.OnItemClickListener; import com.yunbao.common.interfaces.OnItemClickListener;
import com.yunbao.common.manager.IMLoginManager;
import com.yunbao.common.utils.DpUtil; import com.yunbao.common.utils.DpUtil;
import com.yunbao.common.utils.ScreenDimenUtil; import com.yunbao.common.utils.ScreenDimenUtil;
import com.yunbao.common.utils.WordUtil; import com.yunbao.common.utils.WordUtil;
@ -78,7 +79,7 @@ public class GiftWallDialog extends AbsDialogPopupWindow {
@Override @Override
protected int getPopupHeight() { protected int getPopupHeight() {
if (isFullWindows) { if (isFullWindows) {
return super.getPopupHeight()-DpUtil.dp2px(10); return super.getPopupHeight() - DpUtil.dp2px(10);
} }
int screenHeight = ScreenDimenUtil.getInstance().getScreenHeight(); int screenHeight = ScreenDimenUtil.getInstance().getScreenHeight();
return (int) (screenHeight * 0.8); return (int) (screenHeight * 0.8);
@ -104,7 +105,11 @@ public class GiftWallDialog extends AbsDialogPopupWindow {
@Override @Override
public void onItemClick(GiftWallBean bean, int position) { public void onItemClick(GiftWallBean bean, int position) {
if (position == 1) { if (position == 1) {
mAchievement.setVisibility(View.INVISIBLE); if (toUserId.equals(IMLoginManager.get(mContext).getUserInfo().getId() + "")) {
mAchievement.setVisibility(View.VISIBLE);
} else {
mAchievement.setVisibility(View.INVISIBLE);
}
} else { } else {
mAchievement.setVisibility(View.VISIBLE); mAchievement.setVisibility(View.VISIBLE);
} }
@ -175,13 +180,15 @@ public class GiftWallDialog extends AbsDialogPopupWindow {
}); });
resetWindows(); resetWindows();
} }
private void resetWindows(){
if(isFullWindows){ private void resetWindows() {
if (isFullWindows) {
ConstraintLayout.LayoutParams params = (ConstraintLayout.LayoutParams) findViewById(R.id.v_achievement).getLayoutParams(); ConstraintLayout.LayoutParams params = (ConstraintLayout.LayoutParams) findViewById(R.id.v_achievement).getLayoutParams();
params.topMargin=DpUtil.dp2px(47); params.topMargin = DpUtil.dp2px(47);
findViewById(R.id.v_achievement).setLayoutParams(params); findViewById(R.id.v_achievement).setLayoutParams(params);
} }
} }
@Override @Override
protected void onCreate() { protected void onCreate() {
super.onCreate(); super.onCreate();

View File

@ -239,8 +239,8 @@ public class GiftWallGiftInfoDialog extends AbsDialogPopupWindow {
mIvBack.setVisibility(View.VISIBLE); mIvBack.setVisibility(View.VISIBLE);
mIvBg.setScaleType(ImageView.ScaleType.CENTER_CROP); mIvBg.setScaleType(ImageView.ScaleType.CENTER_CROP);
} else { } else {
params.width = DpUtil.dp2px(1); params.width = DpUtil.dp2px(20);
mIvBack.setVisibility(View.INVISIBLE); mIvBack.setVisibility(View.VISIBLE);
mIvBg.setScaleType(ImageView.ScaleType.FIT_XY); mIvBg.setScaleType(ImageView.ScaleType.FIT_XY);
} }
mIvBack.setLayoutParams(params); mIvBack.setLayoutParams(params);

View File

@ -13,10 +13,12 @@ import com.yunbao.common.views.weight.ViewClicksAntiShake;
public class GiftWallMainTab1List2SpinnerDialog extends AttachPopupView { public class GiftWallMainTab1List2SpinnerDialog extends AttachPopupView {
TextView all, up, down; TextView all, up, down;
OnItemClickListener<Integer> listener; OnItemClickListener<Integer> listener;
int type=0;
public GiftWallMainTab1List2SpinnerDialog(@NonNull Context context, OnItemClickListener<Integer> listener) { public GiftWallMainTab1List2SpinnerDialog(@NonNull Context context,int type, OnItemClickListener<Integer> listener) {
super(context); super(context);
this.listener = listener; this.listener = listener;
this.type=type;
} }
@Override @Override
@ -36,6 +38,10 @@ public class GiftWallMainTab1List2SpinnerDialog extends AttachPopupView {
all = findViewById(R.id.spinner_all); all = findViewById(R.id.spinner_all);
up = findViewById(R.id.spinner_up); up = findViewById(R.id.spinner_up);
down = findViewById(R.id.spinner_down); down = findViewById(R.id.spinner_down);
if(type==1){
up.setText(R.string.dialog_gift_wall_gfit_info_list_bottom_btn_one_champion_get);
down.setText(R.string.dialog_gift_wall_gfit_info_list_bottom_btn_one_champion_get_un);
}
ViewClicksAntiShake.clicksAntiShake(all, () -> { ViewClicksAntiShake.clicksAntiShake(all, () -> {
listener.onItemClick(0, 0); listener.onItemClick(0, 0);
dismiss(); dismiss();

View File

@ -209,7 +209,7 @@ public class GiftWallMainTab1Fragment extends BaseFragment {
@Override @Override
public void onViewClicks() { public void onViewClicks() {
spinnerImage.setRotation(180); spinnerImage.setRotation(180);
((XPopup.Builder) spinner.getTag()).asCustom(new GiftWallMainTab1List2SpinnerDialog(getContext(), new OnItemClickListener<Integer>() { ((XPopup.Builder) spinner.getTag()).asCustom(new GiftWallMainTab1List2SpinnerDialog(getContext(), 0, new OnItemClickListener<Integer>() {
@Override @Override
public void onItemClick(Integer bean, int position) { public void onItemClick(Integer bean, int position) {
if (bean > -1) { if (bean > -1) {

View File

@ -169,7 +169,7 @@ public class GiftWallMainTab2Fragment extends BaseFragment {
@Override @Override
public void onViewClicks() { public void onViewClicks() {
spinnerImage.setRotation(180); spinnerImage.setRotation(180);
((XPopup.Builder) spinner.getTag()).asCustom(new GiftWallMainTab1List2SpinnerDialog(getContext(), new OnItemClickListener<Integer>() { ((XPopup.Builder) spinner.getTag()).asCustom(new GiftWallMainTab1List2SpinnerDialog(getContext(),1, new OnItemClickListener<Integer>() {
@Override @Override
public void onItemClick(Integer bean, int position) { public void onItemClick(Integer bean, int position) {
if (bean > -1) { if (bean > -1) {
@ -181,10 +181,10 @@ public class GiftWallMainTab2Fragment extends BaseFragment {
spinnerText.setText(R.string.dialog_gift_wall_list_spinner_all); spinnerText.setText(R.string.dialog_gift_wall_list_spinner_all);
break; break;
case 1: case 1:
spinnerText.setText(R.string.dialog_gift_wall_list_spinner_up); spinnerText.setText(R.string.dialog_gift_wall_gfit_info_list_bottom_btn_one_champion_get);
break; break;
case 2: case 2:
spinnerText.setText(R.string.dialog_gift_wall_list_spinner_down); spinnerText.setText(R.string.dialog_gift_wall_gfit_info_list_bottom_btn_one_champion_get_un);
break; break;
} }
spinnerImage.setRotation(0); spinnerImage.setRotation(0);

View File

@ -1522,6 +1522,7 @@
<string name="dialog_gift_wall_gfit_info_list_bottom_btn_one_light_get">已點亮</string> <string name="dialog_gift_wall_gfit_info_list_bottom_btn_one_light_get">已點亮</string>
<string name="dialog_gift_wall_gfit_info_list_bottom_btn_one_star_get">已摘星</string> <string name="dialog_gift_wall_gfit_info_list_bottom_btn_one_star_get">已摘星</string>
<string name="dialog_gift_wall_gfit_info_list_bottom_btn_one_champion_get">已冠名</string> <string name="dialog_gift_wall_gfit_info_list_bottom_btn_one_champion_get">已冠名</string>
<string name="dialog_gift_wall_gfit_info_list_bottom_btn_one_champion_get_un">未冠名</string>
<string name="dialog_gift_wall_list_info_list_header_rank">排名</string> <string name="dialog_gift_wall_list_info_list_header_rank">排名</string>
<string name="dialog_gift_wall_list_info_list_header_rename">冠名歸屬</string> <string name="dialog_gift_wall_list_info_list_header_rename">冠名歸屬</string>
<string name="dialog_gift_wall_list_info_list_header_rename1">周星歸屬</string> <string name="dialog_gift_wall_list_info_list_header_rename1">周星歸屬</string>

View File

@ -1526,6 +1526,7 @@
<string name="dialog_gift_wall_gfit_info_list_bottom_btn_one_light_get">Lit up</string> <string name="dialog_gift_wall_gfit_info_list_bottom_btn_one_light_get">Lit up</string>
<string name="dialog_gift_wall_gfit_info_list_bottom_btn_one_star_get">Picked</string> <string name="dialog_gift_wall_gfit_info_list_bottom_btn_one_star_get">Picked</string>
<string name="dialog_gift_wall_gfit_info_list_bottom_btn_one_champion_get">Titled</string> <string name="dialog_gift_wall_gfit_info_list_bottom_btn_one_champion_get">Titled</string>
<string name="dialog_gift_wall_gfit_info_list_bottom_btn_one_champion_get_un">Untitled</string>
<string name="dialog_gift_wall_list_info_list_header_rank">Rank</string> <string name="dialog_gift_wall_list_info_list_header_rank">Rank</string>
<string name="dialog_gift_wall_list_info_list_header_rename">Title attribution</string> <string name="dialog_gift_wall_list_info_list_header_rename">Title attribution</string>
<string name="dialog_gift_wall_list_info_list_header_rename1">Weekly star attribution</string> <string name="dialog_gift_wall_list_info_list_header_rename1">Weekly star attribution</string>

View File

@ -184,6 +184,7 @@ public class LivePlaySwViewHolder extends LiveRoomPlayViewHolder {
} }
public void initSwEngine(String liveUid) { public void initSwEngine(String liveUid) {
dr_pk_view.setVisibility(View.GONE);
this.liveUid = liveUid; this.liveUid = liveUid;
//初始化声网SDK //初始化声网SDK
swAuManager = SWAuManager.get(); swAuManager = SWAuManager.get();
@ -630,7 +631,7 @@ public class LivePlaySwViewHolder extends LiveRoomPlayViewHolder {
mEnd = true; mEnd = true;
mStarted = false; mStarted = false;
Bus.getOff(this); Bus.getOff(this);
if(ry_view!=null){ if (ry_view != null) {
ry_view.removeAllViews(); ry_view.removeAllViews();
} }
//swAuManager.release(); //swAuManager.release();

View File

@ -44,7 +44,8 @@
android:layout_height="270dp" android:layout_height="270dp"
android:layout_marginTop="130dp" android:layout_marginTop="130dp"
android:orientation="horizontal" android:orientation="horizontal"
android:visibility="gone"> android:visibility="gone"
tools:visibility="visible">
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"