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.setClearsAfterStop(false);
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_soles.setImageResource(getSolesrRes());
if (drawable != null) {

View File

@ -44,8 +44,8 @@ public class GiftWallBean extends BaseModel {
}
public String getGift_hall_start_date() {
if(!StringUtil.isEmpty("gift_hall_start_date")){
gift_hall_start_date=gift_hall_start_date.replace("-","/");
if (!StringUtil.isEmpty("gift_hall_start_date")) {
gift_hall_start_date = gift_hall_start_date.replace("-", "/");
}
return gift_hall_start_date;
}
@ -55,8 +55,8 @@ public class GiftWallBean extends BaseModel {
}
public String getGift_hall_end_date() {
if(!StringUtil.isEmpty("gift_hall_end_date")){
gift_hall_end_date=gift_hall_end_date.replace("-","/");
if (!StringUtil.isEmpty("gift_hall_end_date")) {
gift_hall_end_date = gift_hall_end_date.replace("-", "/");
}
return gift_hall_end_date;
}
@ -134,17 +134,19 @@ public class GiftWallBean extends BaseModel {
}
public String getGift_hall_start() {
if(!StringUtil.isEmpty(gift_hall_start)){
gift_hall_start=gift_hall_start.replace("-","/");
if (!StringUtil.isEmpty(gift_hall_start)) {
gift_hall_start = gift_hall_start.replace("-", "/");
}
return gift_hall_start;
}
public String getGift_hall_end() {
if(!StringUtil.isEmpty(gift_hall_end)){
gift_hall_end=gift_hall_end.replace("-","/");
if (!StringUtil.isEmpty(gift_hall_end)) {
gift_hall_end = gift_hall_end.replace("-", "/");
}
return gift_hall_end;
}
public int getGift_id() {
return gift_id;
}
@ -230,6 +232,13 @@ public class GiftWallBean extends BaseModel {
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) {
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.GiftWallMainTab2Fragment;
import com.yunbao.common.interfaces.OnItemClickListener;
import com.yunbao.common.manager.IMLoginManager;
import com.yunbao.common.utils.DpUtil;
import com.yunbao.common.utils.ScreenDimenUtil;
import com.yunbao.common.utils.WordUtil;
@ -78,7 +79,7 @@ public class GiftWallDialog extends AbsDialogPopupWindow {
@Override
protected int getPopupHeight() {
if (isFullWindows) {
return super.getPopupHeight()-DpUtil.dp2px(10);
return super.getPopupHeight() - DpUtil.dp2px(10);
}
int screenHeight = ScreenDimenUtil.getInstance().getScreenHeight();
return (int) (screenHeight * 0.8);
@ -104,7 +105,11 @@ public class GiftWallDialog extends AbsDialogPopupWindow {
@Override
public void onItemClick(GiftWallBean bean, int position) {
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 {
mAchievement.setVisibility(View.VISIBLE);
}
@ -175,13 +180,15 @@ public class GiftWallDialog extends AbsDialogPopupWindow {
});
resetWindows();
}
private void resetWindows(){
if(isFullWindows){
private void resetWindows() {
if (isFullWindows) {
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);
}
}
@Override
protected void onCreate() {
super.onCreate();

View File

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

View File

@ -13,10 +13,12 @@ import com.yunbao.common.views.weight.ViewClicksAntiShake;
public class GiftWallMainTab1List2SpinnerDialog extends AttachPopupView {
TextView all, up, down;
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);
this.listener = listener;
this.type=type;
}
@Override
@ -36,6 +38,10 @@ public class GiftWallMainTab1List2SpinnerDialog extends AttachPopupView {
all = findViewById(R.id.spinner_all);
up = findViewById(R.id.spinner_up);
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, () -> {
listener.onItemClick(0, 0);
dismiss();

View File

@ -209,7 +209,7 @@ public class GiftWallMainTab1Fragment extends BaseFragment {
@Override
public void onViewClicks() {
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
public void onItemClick(Integer bean, int position) {
if (bean > -1) {

View File

@ -169,7 +169,7 @@ public class GiftWallMainTab2Fragment extends BaseFragment {
@Override
public void onViewClicks() {
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
public void onItemClick(Integer bean, int position) {
if (bean > -1) {
@ -181,10 +181,10 @@ public class GiftWallMainTab2Fragment extends BaseFragment {
spinnerText.setText(R.string.dialog_gift_wall_list_spinner_all);
break;
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;
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;
}
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_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_un">未冠名</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_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_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_un">Untitled</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_rename1">Weekly star attribution</string>

View File

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

View File

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