diff --git a/common/src/main/java/com/yunbao/common/bean/LiveBattlePassRewardsBean.java b/common/src/main/java/com/yunbao/common/bean/LiveBattlePassRewardsBean.java index 3deed7e93..90001245c 100644 --- a/common/src/main/java/com/yunbao/common/bean/LiveBattlePassRewardsBean.java +++ b/common/src/main/java/com/yunbao/common/bean/LiveBattlePassRewardsBean.java @@ -97,6 +97,15 @@ public class LiveBattlePassRewardsBean extends BaseModel{ private String rewardName; @SerializedName("image_url") private String imageUrl; + @SerializedName("send_reward_type") + private int sendRewardType; + @SerializedName("send_gift_type") + private int sendGiftType; + @SerializedName("send_reward_needcoin") + private String sendRewardNeedcoin; + @SerializedName("send_reward_restrict_time") + private String sendRewardRestrictTime; + private int lock; private int received; @@ -159,6 +168,38 @@ public class LiveBattlePassRewardsBean extends BaseModel{ this.received = received; } + public int getSendRewardType() { + return sendRewardType; + } + + public void setSendRewardType(int sendRewardType) { + this.sendRewardType = sendRewardType; + } + + public int getSendGiftType() { + return sendGiftType; + } + + public void setSendGiftType(int sendGiftType) { + this.sendGiftType = sendGiftType; + } + + public String getSendRewardNeedcoin() { + return sendRewardNeedcoin; + } + + public void setSendRewardNeedcoin(String sendRewardNeedcoin) { + this.sendRewardNeedcoin = sendRewardNeedcoin; + } + + public String getSendRewardRestrictTime() { + return sendRewardRestrictTime; + } + + public void setSendRewardRestrictTime(String sendRewardRestrictTime) { + this.sendRewardRestrictTime = sendRewardRestrictTime; + } + @Override public String toString() { return "LiveBattlePassReward{" + diff --git a/common/src/main/java/com/yunbao/common/dialog/SudGameListPopup.java b/common/src/main/java/com/yunbao/common/dialog/SudGameListPopup.java index c844d7008..93cfd6202 100644 --- a/common/src/main/java/com/yunbao/common/dialog/SudGameListPopup.java +++ b/common/src/main/java/com/yunbao/common/dialog/SudGameListPopup.java @@ -2,6 +2,7 @@ package com.yunbao.common.dialog; import android.animation.ObjectAnimator; import android.content.Context; +import android.graphics.Color; import android.text.TextUtils; import android.util.Log; import android.view.animation.LinearInterpolator; @@ -275,6 +276,29 @@ public class SudGameListPopup extends BottomPopupView { .asCustom(new LiveSudGameHistoryPopup(getContext(), customSidebarChildModels)).show(); } }); + if (interactionID == 0) { + gameTitle.setTextColor(getYellowColor()); + } else { + gameTitle.setTextColor(getDefColor()); + } + if (mSill.equals("0,0,0")) { + sillTitle.setTextColor(getYellowColor()); + } else { + sillTitle.setTextColor(getDefColor()); + } + if ("0".equals(roomHolderType)) { + houseOwnerTitle.setTextColor(getYellowColor()); + } else { + houseOwnerTitle.setTextColor(getDefColor()); + } + } + + private int getDefColor() { + return Color.WHITE; + } + + private int getYellowColor() { + return Color.YELLOW; } @Override @@ -293,6 +317,11 @@ public class SudGameListPopup extends BottomPopupView { @Subscribe(threadMode = ThreadMode.MAIN) public void onSudGameListEvent(SudGameListEvent event) { interactionID = event.getInteractionID(); + if (interactionID == 0) { + gameTitle.setTextColor(getYellowColor()); + } else { + gameTitle.setTextColor(getDefColor()); + } if (IMLoginManager.get(getContext()).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) { gameTitle.setText(event.getTitle()); } else { @@ -325,7 +354,11 @@ public class SudGameListPopup extends BottomPopupView { } else { sillTitle.setText(mSillName.substring(0, mSillName.length() - 2)); } - + if (mSill.equals("0,0,0")) { + sillTitle.setTextColor(getYellowColor()); + } else { + sillTitle.setTextColor(getDefColor()); + } ObjectAnimator animator = ObjectAnimator.ofFloat(roomSillArrow, "rotation", 90f, 0f); animator.setDuration(500); @@ -344,6 +377,11 @@ public class SudGameListPopup extends BottomPopupView { animator.setInterpolator(new LinearInterpolator()); animator.start(); mRefreshView.initData(); + if ("0".equals(roomHolderType)) { + houseOwnerTitle.setTextColor(getYellowColor()); + } else { + houseOwnerTitle.setTextColor(getDefColor()); + } } diff --git a/common/src/main/res/drawable/background_order_dialog.xml b/common/src/main/res/drawable/background_order_dialog.xml index 51b11b8ab..922e3dae0 100644 --- a/common/src/main/res/drawable/background_order_dialog.xml +++ b/common/src/main/res/drawable/background_order_dialog.xml @@ -1,9 +1,17 @@ + - + + + + + + + \ No newline at end of file diff --git a/common/src/main/res/drawable/bg_live_sud_game_back_new2.xml b/common/src/main/res/drawable/bg_live_sud_game_back_new2.xml new file mode 100644 index 000000000..43305fa65 --- /dev/null +++ b/common/src/main/res/drawable/bg_live_sud_game_back_new2.xml @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/common/src/main/res/layout/dialog_live_sud_game.xml b/common/src/main/res/layout/dialog_live_sud_game.xml index 3dbc47e2e..338a4ed55 100644 --- a/common/src/main/res/layout/dialog_live_sud_game.xml +++ b/common/src/main/res/layout/dialog_live_sud_game.xml @@ -32,21 +32,21 @@ android:layout_width="30dp" android:layout_height="30dp" android:layout_marginEnd="14dp" - android:src="@mipmap/icon_sud_history_live" /> + android:src="@mipmap/icon_sud_history_live_new" /> () { @Override @@ -2843,12 +2845,14 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis Log.e("LiveRoomViewHolder", "closePkTwo: 隐藏PK信息" + goto_room_view.getVisibility()); mPkRankTopIcon.setVisibility(View.GONE); lt_pk_line.setVisibility(View.GONE); + pkHandler = false; pkUid = ""; goto_room_view.setVisibility(View.GONE); livePKUserListBean = new LivePKUserListBean(); mRedVal.setVisibility(View.GONE); mBlueVal.setVisibility(View.GONE); mPkRankTopIcon.setVisibility(View.GONE); + showAnchorSayAndCallAnchor(); } /** @@ -4916,7 +4920,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis hideAnchorSayAndCallAnchor(); break; case LIVE_PK_END: - showAnchorSayAndCallAnchor(); + //showAnchorSayAndCallAnchor(); break; case LIVE_FONT_SIZE: int fount = event.getNums(); @@ -5508,7 +5512,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis public void showAnchorSayAndCallAnchor() { isHinde = false; - if (mAnchorSay.getVisibility() == View.GONE && + if (mAnchorSay.getVisibility() != View.VISIBLE && sayModel != null && sayModel.getLivePreview() != null && sayModel.getLivePreview().getIsShow() == 1 ) { diff --git a/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java b/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java index 6f8dc6ea3..25f08274a 100644 --- a/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java +++ b/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java @@ -817,6 +817,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe Log.e("直播间接口调用排查", "onRemove---------------"); LiveNetManager.get(mContext).cancelLive(); liveHandler.removeCallbacks(sendFIm); + pkInfo=null; linkMicPkStartHandler.removeCallbacks(linkMicPkStartRunnable); LiveHttpUtil.cancel(LiveHttpConsts.CHECK_LIVE); LiveHttpUtil.cancel(LiveHttpConsts.ENTER_ROOM); @@ -1552,7 +1553,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe linkMicPkStartRunnable = () -> { if (mLiveRoomViewHolder != null) { Log.e("tasdsdg", liveID + "1111" + CommonAppConfig.getInstance().getUid()); - if (!liveID.equals(CommonAppConfig.getInstance().getUid())) { + if (!liveID.equals(CommonAppConfig.getInstance().getUid()) && pkInfo != null && pkInfo.containsKey("pkuid") && pkInfo.containsKey("pkuimg") && pkInfo.containsKey("pkuname")) { mLiveRoomViewHolder.setOtherInfo(mPkUid, mPkhead, mPkname); mLiveRoomViewHolder.initPkRank(mIsLadders); } @@ -1620,7 +1621,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe public void onLinkMicPkEnd(String winUid) { if (mLiveRyLinkMicPkPresenter != null) { mLiveRyLinkMicPkPresenter.onLinkMicPkEnd(winUid); - mLiveRoomViewHolder.setDelOtherInfo(); + //mLiveRoomViewHolder.setDelOtherInfo(); } } diff --git a/main/src/main/java/com/yunbao/main/activity/MainActivity.java b/main/src/main/java/com/yunbao/main/activity/MainActivity.java index 670e7d49f..4655f2172 100644 --- a/main/src/main/java/com/yunbao/main/activity/MainActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/MainActivity.java @@ -192,7 +192,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene private View floatRedPacket; - private View floatWarOrder; + private View floatWarOrder;//战令浮窗 private List startListNotifyList = new ArrayList<>(); diff --git a/main/src/main/java/com/yunbao/main/adapter/BattlePassRewardAdapter.java b/main/src/main/java/com/yunbao/main/adapter/BattlePassRewardAdapter.java index f862fb108..55d18c65c 100644 --- a/main/src/main/java/com/yunbao/main/adapter/BattlePassRewardAdapter.java +++ b/main/src/main/java/com/yunbao/main/adapter/BattlePassRewardAdapter.java @@ -12,6 +12,7 @@ import android.view.View; import android.view.ViewGroup; import android.widget.Button; import android.widget.ImageView; +import android.widget.LinearLayout; import android.widget.TextView; import androidx.annotation.NonNull; @@ -49,7 +50,7 @@ public class BattlePassRewardAdapter extends RecyclerView.Adapter> mList = new ArrayList<>(); private int userLevel; private BattlePassUserInfoBean userType; - private String quintessenceSpendMoney,enjoySpendMoney; + private String quintessenceSpendMoney, enjoySpendMoney; private OnItemClickListener onItemClickListener; public void setList(List> mList) { @@ -89,11 +90,11 @@ public class BattlePassRewardAdapter extends RecyclerView.Adapter data; @@ -137,6 +142,15 @@ public class BattlePassRewardAdapter extends RecyclerView.Adapter { + view.setVisibility(View.VISIBLE); + switch (reward.getSendGiftType()) { + case 0: + view.setImageResource(R.mipmap.diamond); + break; + case 1: + view.setImageResource(R.mipmap.gold_coin); + break; + default: + view.setVisibility(View.GONE); + } + }), tab1TopMoneyIcon, tab2TopMoneyIcon, tab3TopMoneyIcon); + getAllView(((reward, view) -> { + view.setText(String.valueOf(reward.getSendRewardNeedcoin())); + if (reward.getSendGiftType() == 999) { + view.setText(reward.getSendRewardRestrictTime() + (WordUtil.isNewZh() ? "天" : "Day")); + if (reward.getSendRewardRestrictTime().equals("0")) { + view.setText(WordUtil.isNewZh()?"永久":"Forever"); + } + } + }), tab1TopMoney, tab2TopMoney, tab3TopMoney); } private void getReward(LiveBattlePassRewardsBean.LiveBattlePassReward reward) { @@ -232,9 +267,9 @@ public class BattlePassRewardAdapter extends RecyclerView.Adapter - - + android:layout_height="match_parent"> + + + + + + + + + - \ No newline at end of file diff --git a/main/src/main/res/layout/item_battlepass_reward_type_top.xml b/main/src/main/res/layout/item_battlepass_reward_type_top.xml index 851781b05..b653ef356 100644 --- a/main/src/main/res/layout/item_battlepass_reward_type_top.xml +++ b/main/src/main/res/layout/item_battlepass_reward_type_top.xml @@ -44,9 +44,9 @@ android:layout_height="7dp" android:layout_marginBottom="70dp" android:background="@drawable/bg_text_battlepass_reward_point" + app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="@+id/reward_lv" - app:layout_constraintStart_toStartOf="@+id/reward_lv" - app:layout_constraintBottom_toBottomOf="parent" /> + app:layout_constraintStart_toStartOf="@+id/reward_lv" /> + + + + + + + + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintBottom_toBottomOf="@+id/tab_1_bg"/> + + @@ -152,23 +188,55 @@ android:id="@+id/tab_2" android:layout_width="0dp" android:layout_height="0dp" + android:layout_margin="12dp" + android:layout_marginBottom="14dp" android:src="@mipmap/ic_integral" app:layout_constraintBottom_toBottomOf="@id/tab_2_bg" - android:layout_marginBottom="14dp" - android:layout_margin="12dp" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="@id/tab_2_bg" /> + + + + + + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintBottom_toBottomOf="@+id/tab_2_bg" /> + + + + + app:layout_constraintTop_toTopOf="@id/tab_3_bg" /> + + + + + + + + + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintBottom_toBottomOf="@+id/tab_3_bg" + /> + + + +