fix 修复礼物墙测试问题
This commit is contained in:
parent
d3055d8fb2
commit
048c66736f
@ -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) {
|
||||
|
@ -139,12 +139,14 @@ public class GiftWallBean extends BaseModel {
|
||||
}
|
||||
return gift_hall_start;
|
||||
}
|
||||
|
||||
public String getGift_hall_end() {
|
||||
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;
|
||||
}
|
||||
|
@ -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;
|
||||
@ -104,7 +105,11 @@ public class GiftWallDialog extends AbsDialogPopupWindow {
|
||||
@Override
|
||||
public void onItemClick(GiftWallBean bean, int position) {
|
||||
if (position == 1) {
|
||||
if (toUserId.equals(IMLoginManager.get(mContext).getUserInfo().getId() + "")) {
|
||||
mAchievement.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
mAchievement.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
} else {
|
||||
mAchievement.setVisibility(View.VISIBLE);
|
||||
}
|
||||
@ -175,6 +180,7 @@ public class GiftWallDialog extends AbsDialogPopupWindow {
|
||||
});
|
||||
resetWindows();
|
||||
}
|
||||
|
||||
private void resetWindows() {
|
||||
if (isFullWindows) {
|
||||
ConstraintLayout.LayoutParams params = (ConstraintLayout.LayoutParams) findViewById(R.id.v_achievement).getLayoutParams();
|
||||
@ -182,6 +188,7 @@ public class GiftWallDialog extends AbsDialogPopupWindow {
|
||||
findViewById(R.id.v_achievement).setLayoutParams(params);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate() {
|
||||
super.onCreate();
|
||||
|
@ -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);
|
||||
|
@ -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();
|
||||
|
@ -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) {
|
||||
|
@ -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);
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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();
|
||||
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user