From 986902886a56062eb2882f19392ffb15c46f14c6 Mon Sep 17 00:00:00 2001 From: 18401019693 Date: Thu, 3 Aug 2023 14:29:04 +0800 Subject: [PATCH] =?UTF-8?q?6.5.4=E7=A4=BC=E7=89=A9=E5=86=A0=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../adapter/AchievementDetailsAdapter.java | 41 +++++ .../adapter/MedalAchievementAdapter.java | 44 +++++ .../common/bean/MedalAchievementModel.java | 42 +++++ .../common/bean/UserMedalListModel.java | 76 +++++++++ .../yunbao/common/bean/UserMedalModel.java | 72 ++++++++ .../dialog/AchievementDetailsPopup.java | 93 +++++++++++ .../com/yunbao/common/http/PDLiveApi.java | 6 + .../common/http/live/LiveNetManager.java | 45 +++++ .../views/AchievementDetailsViewHolder.java | 22 +++ .../views/MedalAchievementViewHolder.java | 48 ++++++ .../background_achievement_details_list.xml | 8 + .../drawable/background_codex_item_btn.xml | 4 +- .../res/layout/item_achievement_details.xml | 12 ++ .../src/main/res/layout/item_codex_item.xml | 1 + .../res/layout/item_medal_achievement.xml | 32 ++++ .../res/layout/popup_achievement_details.xml | 155 ++++++++++++++++++ .../background_medal_achievement.png | Bin 0 -> 13977 bytes common/src/main/res/values/strings.xml | 2 + .../yunbao/live/dialog/GiftWallDialog.java | 16 +- .../live/dialog/MedalAchievementPopup.java | 94 +++++++++++ .../yunbao/live/views/LiveRoomViewHolder.java | 1 + .../drawable/background_medal_achievement.xml | 9 + .../main/res/layout/dialog_live_gift_wall.xml | 1 + .../res/layout/dialog_medal_achievement.xml | 80 +++++++++ 24 files changed, 899 insertions(+), 5 deletions(-) create mode 100644 common/src/main/java/com/yunbao/common/adapter/AchievementDetailsAdapter.java create mode 100644 common/src/main/java/com/yunbao/common/adapter/MedalAchievementAdapter.java create mode 100644 common/src/main/java/com/yunbao/common/bean/MedalAchievementModel.java create mode 100644 common/src/main/java/com/yunbao/common/bean/UserMedalListModel.java create mode 100644 common/src/main/java/com/yunbao/common/bean/UserMedalModel.java create mode 100644 common/src/main/java/com/yunbao/common/dialog/AchievementDetailsPopup.java create mode 100644 common/src/main/java/com/yunbao/common/views/AchievementDetailsViewHolder.java create mode 100644 common/src/main/java/com/yunbao/common/views/MedalAchievementViewHolder.java create mode 100644 common/src/main/res/drawable/background_achievement_details_list.xml create mode 100644 common/src/main/res/layout/item_achievement_details.xml create mode 100644 common/src/main/res/layout/item_medal_achievement.xml create mode 100644 common/src/main/res/layout/popup_achievement_details.xml create mode 100644 common/src/main/res/mipmap-xxhdpi/background_medal_achievement.png create mode 100644 live/src/main/java/com/yunbao/live/dialog/MedalAchievementPopup.java create mode 100644 live/src/main/res/drawable/background_medal_achievement.xml create mode 100644 live/src/main/res/layout/dialog_medal_achievement.xml diff --git a/common/src/main/java/com/yunbao/common/adapter/AchievementDetailsAdapter.java b/common/src/main/java/com/yunbao/common/adapter/AchievementDetailsAdapter.java new file mode 100644 index 000000000..79cebed8e --- /dev/null +++ b/common/src/main/java/com/yunbao/common/adapter/AchievementDetailsAdapter.java @@ -0,0 +1,41 @@ +package com.yunbao.common.adapter; + +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; + +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.RecyclerView; + +import com.yunbao.common.R; +import com.yunbao.common.bean.UserMedalModel; +import com.yunbao.common.views.AchievementDetailsViewHolder; + +import java.util.ArrayList; +import java.util.List; + +public class AchievementDetailsAdapter extends RecyclerView.Adapter { + private List dressInfo = new ArrayList<>(); + + public AchievementDetailsAdapter(List dressInfo) { + this.dressInfo = dressInfo; + } + + @NonNull + @Override + public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { + View herdView = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_achievement_details, parent, false); + return new AchievementDetailsViewHolder(herdView); + } + + @Override + public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) { + AchievementDetailsViewHolder achievementDetailsViewHolder = (AchievementDetailsViewHolder) holder; + achievementDetailsViewHolder.showData(dressInfo.get(position)); + } + + @Override + public int getItemCount() { + return dressInfo.size(); + } +} diff --git a/common/src/main/java/com/yunbao/common/adapter/MedalAchievementAdapter.java b/common/src/main/java/com/yunbao/common/adapter/MedalAchievementAdapter.java new file mode 100644 index 000000000..e0b43c9df --- /dev/null +++ b/common/src/main/java/com/yunbao/common/adapter/MedalAchievementAdapter.java @@ -0,0 +1,44 @@ +package com.yunbao.common.adapter; + +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; + +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.RecyclerView; + +import com.yunbao.common.R; +import com.yunbao.common.bean.UserMedalListModel; +import com.yunbao.common.views.MedalAchievementViewHolder; + +import java.util.ArrayList; +import java.util.List; + +public class MedalAchievementAdapter extends RecyclerView.Adapter { + private List medalData = new ArrayList<>(); + + @NonNull + @Override + public RecyclerView.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) { + View herdView = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_medal_achievement, parent, false); + return new MedalAchievementViewHolder(herdView); + } + + @Override + public void onBindViewHolder(@NonNull RecyclerView.ViewHolder holder, int position) { + MedalAchievementViewHolder achievementViewHolder = (MedalAchievementViewHolder) holder; + achievementViewHolder.showData(medalData.get(position)); + } + + @Override + public int getItemCount() { + return medalData.size(); + } + + public void addAllData(List mGiftWall) { + + medalData.clear(); + medalData.addAll(mGiftWall); + notifyDataSetChanged(); + } +} diff --git a/common/src/main/java/com/yunbao/common/bean/MedalAchievementModel.java b/common/src/main/java/com/yunbao/common/bean/MedalAchievementModel.java new file mode 100644 index 000000000..9a6fb6ea5 --- /dev/null +++ b/common/src/main/java/com/yunbao/common/bean/MedalAchievementModel.java @@ -0,0 +1,42 @@ +package com.yunbao.common.bean; + +import com.google.gson.annotations.SerializedName; + +import java.util.List; + +public class MedalAchievementModel extends BaseModel { + + @SerializedName("medal_total_number") + private String medalTotalNumber; + @SerializedName("medal_light_number") + private String medalLightNumber; + @SerializedName("medal_data") + private List medalData; + + public String getMedalTotalNumber() { + return medalTotalNumber; + } + + public MedalAchievementModel setMedalTotalNumber(String medalTotalNumber) { + this.medalTotalNumber = medalTotalNumber; + return this; + } + + public String getMedalLightNumber() { + return medalLightNumber; + } + + public MedalAchievementModel setMedalLightNumber(String medalLightNumber) { + this.medalLightNumber = medalLightNumber; + return this; + } + + public List getMedalData() { + return medalData; + } + + public MedalAchievementModel setMedalData(List medalData) { + this.medalData = medalData; + return this; + } +} diff --git a/common/src/main/java/com/yunbao/common/bean/UserMedalListModel.java b/common/src/main/java/com/yunbao/common/bean/UserMedalListModel.java new file mode 100644 index 000000000..13b783833 --- /dev/null +++ b/common/src/main/java/com/yunbao/common/bean/UserMedalListModel.java @@ -0,0 +1,76 @@ +package com.yunbao.common.bean; + +import com.google.gson.annotations.SerializedName; + +import java.util.ArrayList; +import java.util.List; + +public class UserMedalListModel extends BaseModel { + + @SerializedName("dress_name") + private String dressName; + @SerializedName("dress_info") + private List dressInfo = new ArrayList<>(); + @SerializedName("display_src") + private String displaySrc; + @SerializedName("dress_description") + private String dressDescription; + @SerializedName("display_src_second") + private String displaySrcSecond; + @SerializedName("dress_status")//1Hd2whd + private String dressStatus; + + public String getDressDescription() { + return dressDescription; + } + + public UserMedalListModel setDressDescription(String dressDescription) { + this.dressDescription = dressDescription; + return this; + } + + public String getDisplaySrcSecond() { + return displaySrcSecond; + } + + public UserMedalListModel setDisplaySrcSecond(String displaySrcSecond) { + this.displaySrcSecond = displaySrcSecond; + return this; + } + + public String getDressStatus() { + return dressStatus; + } + + public UserMedalListModel setDressStatus(String dressStatus) { + this.dressStatus = dressStatus; + return this; + } + + public String getDressName() { + return dressName; + } + + public UserMedalListModel setDressName(String dressName) { + this.dressName = dressName; + return this; + } + + public List getDressInfo() { + return dressInfo; + } + + public UserMedalListModel setDressInfo(List dressInfo) { + this.dressInfo = dressInfo; + return this; + } + + public String getDisplaySrc() { + return displaySrc; + } + + public UserMedalListModel setDisplaySrc(String displaySrc) { + this.displaySrc = displaySrc; + return this; + } +} diff --git a/common/src/main/java/com/yunbao/common/bean/UserMedalModel.java b/common/src/main/java/com/yunbao/common/bean/UserMedalModel.java new file mode 100644 index 000000000..4ac5dde3e --- /dev/null +++ b/common/src/main/java/com/yunbao/common/bean/UserMedalModel.java @@ -0,0 +1,72 @@ +package com.yunbao.common.bean; + +import com.google.gson.annotations.SerializedName; + +public class UserMedalModel extends BaseModel { + @SerializedName("id") + private String id; + @SerializedName("display_src") + private String displaySrc; + @SerializedName("dress_name") + private String dressName; + @SerializedName("dress_description") + private String dressDescription; + @SerializedName("sort") + private String sort; + @SerializedName("dress_status") + private String dressStatus; + + public String getId() { + return id; + } + + public UserMedalModel setId(String id) { + this.id = id; + return this; + } + + public String getDisplaySrc() { + return displaySrc; + } + + public UserMedalModel setDisplaySrc(String displaySrc) { + this.displaySrc = displaySrc; + return this; + } + + public String getDressName() { + return dressName; + } + + public UserMedalModel setDressName(String dressName) { + this.dressName = dressName; + return this; + } + + public String getDressDescription() { + return dressDescription; + } + + public UserMedalModel setDressDescription(String dressDescription) { + this.dressDescription = dressDescription; + return this; + } + + public String getSort() { + return sort; + } + + public UserMedalModel setSort(String sort) { + this.sort = sort; + return this; + } + + public String getDressStatus() { + return dressStatus; + } + + public UserMedalModel setDressStatus(String dressStatus) { + this.dressStatus = dressStatus; + return this; + } +} diff --git a/common/src/main/java/com/yunbao/common/dialog/AchievementDetailsPopup.java b/common/src/main/java/com/yunbao/common/dialog/AchievementDetailsPopup.java new file mode 100644 index 000000000..2c7fc07a3 --- /dev/null +++ b/common/src/main/java/com/yunbao/common/dialog/AchievementDetailsPopup.java @@ -0,0 +1,93 @@ +package com.yunbao.common.dialog; + + +import android.content.Context; +import android.text.TextUtils; +import android.view.View; +import android.widget.ImageView; +import android.widget.TextView; + +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.LinearLayoutManager; +import androidx.recyclerview.widget.RecyclerView; + +import com.lxj.xpopup.core.CenterPopupView; +import com.yunbao.common.R; +import com.yunbao.common.adapter.AchievementDetailsAdapter; +import com.yunbao.common.bean.UserMedalListModel; +import com.yunbao.common.glide.ImgLoader; +import com.yunbao.common.views.weight.ViewClicksAntiShake; + +public class AchievementDetailsPopup extends CenterPopupView { + private UserMedalListModel userMedalListModel; + private ImageView achievementImg; + private TextView dressName, dressDescription; + private View havaDataList, havaData; + private AchievementDetailsAdapter achievementDetailsAdapter; +private RecyclerView achievementImgList; + public AchievementDetailsPopup(@NonNull Context context, UserMedalListModel userMedalListModel) { + super(context); + this.userMedalListModel = userMedalListModel; + } + + @Override + protected int getImplLayoutId() { + return R.layout.popup_achievement_details; + } + + @Override + protected void onCreate() { + super.onCreate(); + havaDataList = findViewById(R.id.hava_data_list); + havaData = findViewById(R.id.hava_data); + if (userMedalListModel.getDressInfo().size() > 0) { + havaDataList.setVisibility(GONE); + havaData.setVisibility(VISIBLE); + achievementDetailsAdapter = new AchievementDetailsAdapter(userMedalListModel.getDressInfo()); + + achievementImg = findViewById(R.id.achievement_img2); + dressName = findViewById(R.id.dress_name2); + dressDescription = findViewById(R.id.dress_description2); + achievementImgList = findViewById(R.id.achievement_img_list); + + if (TextUtils.equals(userMedalListModel.getDressStatus(), "1")) { + ImgLoader.display(getContext(), userMedalListModel.getDisplaySrc(), achievementImg); + } else { + ImgLoader.display(getContext(), userMedalListModel.getDisplaySrcSecond(), achievementImg); + } + dressName.setText(userMedalListModel.getDressName()); + dressDescription.setText(userMedalListModel.getDressDescription()); + achievementImgList.setLayoutManager(new LinearLayoutManager(getContext(), LinearLayoutManager.HORIZONTAL, false)); + achievementImgList.setAdapter(achievementDetailsAdapter); + ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.gift_details_btn2), new ViewClicksAntiShake.ViewClicksCallBack() { + @Override + public void onViewClicks() { + dialog.dismiss(); + } + }); + + } else { + havaDataList.setVisibility(VISIBLE); + havaData.setVisibility(GONE); + + achievementImg = findViewById(R.id.achievement_img); + dressName = findViewById(R.id.dress_name); + dressDescription = findViewById(R.id.dress_description); + + if (TextUtils.equals(userMedalListModel.getDressStatus(), "1")) { + ImgLoader.display(getContext(), userMedalListModel.getDisplaySrc(), achievementImg); + } else { + ImgLoader.display(getContext(), userMedalListModel.getDisplaySrcSecond(), achievementImg); + } + dressName.setText(userMedalListModel.getDressName()); + dressDescription.setText(userMedalListModel.getDressDescription()); + ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.gift_details_btn), new ViewClicksAntiShake.ViewClicksCallBack() { + @Override + public void onViewClicks() { + dialog.dismiss(); + } + }); + } + + } +} diff --git a/common/src/main/java/com/yunbao/common/http/PDLiveApi.java b/common/src/main/java/com/yunbao/common/http/PDLiveApi.java index 904534dd3..12b2a56cf 100644 --- a/common/src/main/java/com/yunbao/common/http/PDLiveApi.java +++ b/common/src/main/java/com/yunbao/common/http/PDLiveApi.java @@ -31,6 +31,7 @@ import com.yunbao.common.bean.LiveRoomVoteModel; import com.yunbao.common.bean.LiveStetUpStatusModel; import com.yunbao.common.bean.LiveTaskModel; import com.yunbao.common.bean.LiveUserMailBoxModel; +import com.yunbao.common.bean.MedalAchievementModel; import com.yunbao.common.bean.MsgSwitchDetailModel; import com.yunbao.common.bean.NewPeopleInfo; import com.yunbao.common.bean.NobleRankHideUserListModel; @@ -49,6 +50,7 @@ import com.yunbao.common.bean.SetAttentsModel; import com.yunbao.common.bean.SlideInBannerModel; import com.yunbao.common.bean.StarChallengeStatusModel; import com.yunbao.common.bean.UserAreaBean; +import com.yunbao.common.bean.UserMedalListModel; import com.yunbao.common.bean.VipModel; import com.yunbao.common.bean.WishListGiftConfModel; import com.yunbao.common.bean.WishListModel; @@ -888,5 +890,9 @@ public interface PDLiveApi { Observable>> getGiftGuideHistory( @Query("liveuid") String liveUid ); + @GET("/api/public/?service=Gift.getUserMedalList") + Observable> getUserMedalList(); + @GET("/api/public/?service=Gift.getLiveMedalList") + Observable> getLiveMedalList(); } diff --git a/common/src/main/java/com/yunbao/common/http/live/LiveNetManager.java b/common/src/main/java/com/yunbao/common/http/live/LiveNetManager.java index c727f5adc..d51ef37be 100644 --- a/common/src/main/java/com/yunbao/common/http/live/LiveNetManager.java +++ b/common/src/main/java/com/yunbao/common/http/live/LiveNetManager.java @@ -31,6 +31,7 @@ import com.yunbao.common.bean.LiveRoomVoteModel; import com.yunbao.common.bean.LiveStetUpStatusModel; import com.yunbao.common.bean.LiveTaskModel; import com.yunbao.common.bean.LiveUserMailBoxModel; +import com.yunbao.common.bean.MedalAchievementModel; import com.yunbao.common.bean.NobleRankHideUserListModel; import com.yunbao.common.bean.NobleTrumpetModel; import com.yunbao.common.bean.PkRankBean; @@ -1954,6 +1955,50 @@ public class LiveNetManager { }).isDisposed(); } + public void getUserMedalList(HttpCallback callback) { + API.get().pdLiveApi(mContext) + .getUserMedalList() + .subscribeOn(Schedulers.io()) + .observeOn(AndroidSchedulers.mainThread()) + .subscribe(new Consumer>() { + @Override + public void accept(ResponseModel listResponseModel) throws Exception { + if (callback != null) { + callback.onSuccess(listResponseModel.getData().getInfo()); + } + } + }, new Consumer() { + @Override + public void accept(Throwable throwable) throws Exception { + if (callback != null) { + callback.onError(mContext.getString(R.string.net_error)); + } + } + }).isDisposed(); + } + + public void getLiveMedalList(HttpCallback callback) { + API.get().pdLiveApi(mContext) + .getLiveMedalList() + .subscribeOn(Schedulers.io()) + .observeOn(AndroidSchedulers.mainThread()) + .subscribe(new Consumer>() { + @Override + public void accept(ResponseModel listResponseModel) throws Exception { + if (callback != null) { + callback.onSuccess(listResponseModel.getData().getInfo()); + } + } + }, new Consumer() { + @Override + public void accept(Throwable throwable) throws Exception { + if (callback != null) { + callback.onError(mContext.getString(R.string.net_error)); + } + } + }).isDisposed(); + } + /** * 直播间取消网络请求 */ diff --git a/common/src/main/java/com/yunbao/common/views/AchievementDetailsViewHolder.java b/common/src/main/java/com/yunbao/common/views/AchievementDetailsViewHolder.java new file mode 100644 index 000000000..05c44f939 --- /dev/null +++ b/common/src/main/java/com/yunbao/common/views/AchievementDetailsViewHolder.java @@ -0,0 +1,22 @@ +package com.yunbao.common.views; + +import android.view.View; +import android.widget.ImageView; + +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.RecyclerView; + +import com.yunbao.common.R; +import com.yunbao.common.bean.UserMedalModel; +import com.yunbao.common.glide.ImgLoader; + +public class AchievementDetailsViewHolder extends RecyclerView.ViewHolder { + private ImageView achievementImg; + public AchievementDetailsViewHolder(@NonNull View itemView) { + super(itemView); + achievementImg = itemView.findViewById(R.id.achievement_img); + } + public void showData(UserMedalModel userMedalModel){ + ImgLoader.display(itemView.getContext(), userMedalModel.getDisplaySrc(), achievementImg); + } +} diff --git a/common/src/main/java/com/yunbao/common/views/MedalAchievementViewHolder.java b/common/src/main/java/com/yunbao/common/views/MedalAchievementViewHolder.java new file mode 100644 index 000000000..6c45a011c --- /dev/null +++ b/common/src/main/java/com/yunbao/common/views/MedalAchievementViewHolder.java @@ -0,0 +1,48 @@ +package com.yunbao.common.views; + +import android.graphics.Color; +import android.text.TextUtils; +import android.view.View; +import android.widget.ImageView; +import android.widget.TextView; + +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.RecyclerView; + +import com.lxj.xpopup.XPopup; +import com.yunbao.common.R; +import com.yunbao.common.bean.UserMedalListModel; +import com.yunbao.common.dialog.AchievementDetailsPopup; +import com.yunbao.common.glide.ImgLoader; +import com.yunbao.common.views.weight.ViewClicksAntiShake; + +public class MedalAchievementViewHolder extends RecyclerView.ViewHolder { + private ImageView achievementImg; + private TextView giftWall; + + public MedalAchievementViewHolder(@NonNull View itemView) { + super(itemView); + achievementImg = itemView.findViewById(R.id.achievement_img); + giftWall = itemView.findViewById(R.id.gift_wall); + } + + public void showData(UserMedalListModel userMedalListModel) { + if (TextUtils.equals(userMedalListModel.getDressStatus(), "1")) { + ImgLoader.display(itemView.getContext(), userMedalListModel.getDisplaySrc(), achievementImg); + giftWall.setTextColor(Color.parseColor("#6F43FF")); + } else { + ImgLoader.display(itemView.getContext(), userMedalListModel.getDisplaySrcSecond(), achievementImg); + giftWall.setTextColor(Color.parseColor("#53408F")); + } + giftWall.setText(userMedalListModel.getDressName()); + ViewClicksAntiShake.clicksAntiShake(itemView, new ViewClicksAntiShake.ViewClicksCallBack() { + @Override + public void onViewClicks() { + new XPopup.Builder(itemView.getContext()) + .enableDrag(false) + .asCustom(new AchievementDetailsPopup(itemView.getContext(), userMedalListModel)) + .show(); + } + }); + } +} diff --git a/common/src/main/res/drawable/background_achievement_details_list.xml b/common/src/main/res/drawable/background_achievement_details_list.xml new file mode 100644 index 000000000..a803f914b --- /dev/null +++ b/common/src/main/res/drawable/background_achievement_details_list.xml @@ -0,0 +1,8 @@ + + + + + \ No newline at end of file diff --git a/common/src/main/res/drawable/background_codex_item_btn.xml b/common/src/main/res/drawable/background_codex_item_btn.xml index 0682d347a..9769f0609 100644 --- a/common/src/main/res/drawable/background_codex_item_btn.xml +++ b/common/src/main/res/drawable/background_codex_item_btn.xml @@ -2,13 +2,13 @@ - + - + diff --git a/common/src/main/res/layout/item_achievement_details.xml b/common/src/main/res/layout/item_achievement_details.xml new file mode 100644 index 000000000..cb19261f7 --- /dev/null +++ b/common/src/main/res/layout/item_achievement_details.xml @@ -0,0 +1,12 @@ + + + + + \ No newline at end of file diff --git a/common/src/main/res/layout/item_codex_item.xml b/common/src/main/res/layout/item_codex_item.xml index 27e0f6b88..9b24732aa 100644 --- a/common/src/main/res/layout/item_codex_item.xml +++ b/common/src/main/res/layout/item_codex_item.xml @@ -26,6 +26,7 @@ android:layout_width="50dp" android:layout_height="20dp" android:layout_marginTop="6dp" + android:textSize="11sp" android:background="@drawable/background_codex_item_btn" android:gravity="center" /> \ No newline at end of file diff --git a/common/src/main/res/layout/item_medal_achievement.xml b/common/src/main/res/layout/item_medal_achievement.xml new file mode 100644 index 000000000..6f25b39d9 --- /dev/null +++ b/common/src/main/res/layout/item_medal_achievement.xml @@ -0,0 +1,32 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/common/src/main/res/layout/popup_achievement_details.xml b/common/src/main/res/layout/popup_achievement_details.xml new file mode 100644 index 000000000..9a706886d --- /dev/null +++ b/common/src/main/res/layout/popup_achievement_details.xml @@ -0,0 +1,155 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/common/src/main/res/mipmap-xxhdpi/background_medal_achievement.png b/common/src/main/res/mipmap-xxhdpi/background_medal_achievement.png new file mode 100644 index 0000000000000000000000000000000000000000..67933e568191229bcec1d98611336002b6899489 GIT binary patch literal 13977 zcmV;KHfG6*P)00001b5ch_0Itp) z=>PyA07*naRCr$PeOt3-$#GWhbNXDmr{^M#B@4g7ZxDfbCM*+r0EHbE7)w|VV*&>v zj6=iB*n%g(8Vzy?I}`x{I4sNJCWB&v2N{HUM?wDvcr!-U%xErsIo;=+O?d#}1=W_^{Fm6esXqUFCu0(&lj)t=M8kiSTP77#BW*n0^qAl~~S zTo_nDykKDOCD0AxFaP!Rj~yP#VyEmqH0Ebu zjV9Co5M5pnt?~CudbB2bYkf}t=U`3$>*68(_gDVI>W_PR4}h5FH%!biI^)nk8^~NwmHsq6?zSbE1ofM3)bV&L7a_X3f><*%>)BqE~_h+q5c`X>(#>5E4<>DJLRM29ztZUDq5L@NLo8aTHEja>d?P=i?f zhkwhzOA7J3{I03zZ@LYxm!`Ms+xjLank?^0%j?hLL$~MguP3`DpVsJE3M0Y~kAsw# zlr8_R$3pYM^m*grjRz}Z(7N6Ld3`~2aYl6hkm%w*(WARWkM7aE%Qb!J)o-l+uqBEn zh+q4;^=A%G=vR)PrPcAXL^o~`9o^gj7+QFBgXjRQz=Yt|q=4~TUP4;LjQ;*O`jEuU z*;*u&BmmaUDQrMn)ft4h~ge0%)0_#RttEZw}pgIRI8(ZtZm=g`LYh|cd4 zoxMZ!;O+GP_vkKt`sF{cZDbe3U;ga+H;!-9Cr)1^I)xT~j_3%Q_>>5nx@1ZmZ2lxu z0?h1z7KZHhfXuPb*q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^8w zi9Ho!{VvUn=ydl48C`~Dxhd*Sf;Zw}sHrQ9Cd(|dJQ3E~YPkSw=8RE8`!&`kz<-tu^%S9DD6k>(3k<(ytty(u(b3m=p+*hh2P_ z0i1v=2a5l03ACoME$tN56wz`ujZ)K&6|jQ;GCma^%GgKwtWA(HtALh~r!n*Ig zdD`Dw6%~kaArz)W+R&X7!L^pW5=ffzfYz56^jojKvHE6h$UNkOcWJ&U(lCcePi{9t!_df zMkD|9r`CVw;FA8{;SKsr2ZwZ+ycD=|2OuY#LYTx)P&h4yuif{3khNjzl?`2vA6~;F zah{^rE-x?Xe_X8Sx4-!9)&Gr*R~W?H7~F4{2lR>6iax$Npg*@dpbs4o9i>ejfIO3z zB0~I9W)CGGJQC2vmqd@&m-P1flK%I4O?M71>ARL2ZL&GBhoV|Yeu^Z}t%;u^*(|K? zi3Ao9@5w+dWcm_VK)j%1? 近期點亮 已獲得 去點亮 + 我的荣誉墙 + 成就詳情 diff --git a/live/src/main/java/com/yunbao/live/dialog/GiftWallDialog.java b/live/src/main/java/com/yunbao/live/dialog/GiftWallDialog.java index a5f06e276..5703cab6e 100644 --- a/live/src/main/java/com/yunbao/live/dialog/GiftWallDialog.java +++ b/live/src/main/java/com/yunbao/live/dialog/GiftWallDialog.java @@ -17,6 +17,7 @@ import com.makeramen.roundedimageview.RoundedImageView; import com.yunbao.common.Constants; import com.yunbao.common.dialog.AbsDialogFragment; import com.yunbao.common.event.GiftWallItemEvent; +import com.yunbao.common.event.LiveGiftDialogEvent; import com.yunbao.common.fragment.AllServiceChampionFragment; import com.yunbao.common.fragment.GiftWithoutWallFragment; import com.yunbao.common.glide.ImgLoader; @@ -28,7 +29,6 @@ import com.yunbao.common.views.weight.ViewClicksAntiShake; import com.yunbao.live.R; import com.yunbao.live.activity.LiveActivity; import com.yunbao.live.event.LiveAudienceEvent; -import com.yunbao.common.event.LiveGiftDialogEvent; import com.yunbao.live.views.GiftAlreadyWallFragment; import org.greenrobot.eventbus.Subscribe; @@ -49,6 +49,7 @@ public class GiftWallDialog extends AbsDialogFragment { private List tabView = new ArrayList<>(); private String mStream, mAnchorName, mLiveUid, mAvatarUrl; private int isAttention = 0;//是否关注 0=没关注, + private boolean isLive;//是否正在直播 @Override public void onActivityCreated(Bundle savedInstanceState) { @@ -135,7 +136,16 @@ public class GiftWallDialog extends AbsDialogFragment { public void onViewClicks() { new XPopup.Builder(getContext()) .enableDrag(false) - .asCustom(new CodexDialog(getContext(), mStream, mLiveUid,false)) + .asCustom(new CodexDialog(getContext(), mStream, mLiveUid, false)) + .show(); + } + }); + ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.medal_achievement), new ViewClicksAntiShake.ViewClicksCallBack() { + @Override + public void onViewClicks() { + new XPopup.Builder(getContext()) + .enableDrag(false) + .asCustom(new MedalAchievementPopup(getContext(), isLive)) .show(); } }); @@ -151,7 +161,7 @@ public class GiftWallDialog extends AbsDialogFragment { mAnchorName = bundle.getString("mAnchorName"); mAvatarUrl = bundle.getString("mAvatarUrl"); isAttention = bundle.getInt("isAttention"); - + isLive = bundle.getBoolean("isLive"); FragmentTransaction transaction = getChildFragmentManager().beginTransaction(); transaction.replace(R.id.context_layout_gift, GiftAlreadyWallFragment.newInstance(mStream, mLiveUid)); transaction.commit(); diff --git a/live/src/main/java/com/yunbao/live/dialog/MedalAchievementPopup.java b/live/src/main/java/com/yunbao/live/dialog/MedalAchievementPopup.java new file mode 100644 index 000000000..e14abf8a3 --- /dev/null +++ b/live/src/main/java/com/yunbao/live/dialog/MedalAchievementPopup.java @@ -0,0 +1,94 @@ +package com.yunbao.live.dialog; + +import android.content.Context; +import android.widget.TextView; + +import androidx.annotation.NonNull; +import androidx.recyclerview.widget.GridLayoutManager; +import androidx.recyclerview.widget.RecyclerView; + +import com.lxj.xpopup.core.BottomPopupView; +import com.yunbao.common.adapter.MedalAchievementAdapter; +import com.yunbao.common.bean.MedalAchievementModel; +import com.yunbao.common.http.base.HttpCallback; +import com.yunbao.common.http.live.LiveNetManager; +import com.yunbao.common.utils.ToastUtil; +import com.yunbao.live.R; + +public class MedalAchievementPopup extends BottomPopupView { + private boolean isLive; + private TextView achievementText; + private RecyclerView achievementList; + private MedalAchievementAdapter medalAchievementAdapter; + + public MedalAchievementPopup(@NonNull Context context, boolean isLive) { + super(context); + this.isLive = isLive; + } + + // 返回自定义弹窗的布局 + @Override + protected int getImplLayoutId() { + return R.layout.dialog_medal_achievement; + } + + // 执行初始化操作,比如:findView,设置点击,或者任何你弹窗内的业务逻辑 + @Override + protected void onCreate() { + super.onCreate(); + initView(); + initDate(); + } + + private void initDate() { + if (isLive) { + LiveNetManager.get(getContext()) + .getLiveMedalList(new HttpCallback() { + @Override + public void onSuccess(MedalAchievementModel data) { + StringBuffer stringBuffer = new StringBuffer(); + stringBuffer.append(data.getMedalLightNumber()) + .append("/") + .append(data.getMedalTotalNumber()); + achievementText.setText(stringBuffer.toString()); + medalAchievementAdapter.addAllData(data.getMedalData()); + } + + @Override + public void onError(String error) { + ToastUtil.show(error); + } + }); + } else { + LiveNetManager.get(getContext()) + .getUserMedalList(new HttpCallback() { + @Override + public void onSuccess(MedalAchievementModel data) { + StringBuffer stringBuffer = new StringBuffer(); + stringBuffer.append(data.getMedalLightNumber()) + .append("/") + .append(data.getMedalTotalNumber()); + achievementText.setText(stringBuffer.toString()); + medalAchievementAdapter.addAllData(data.getMedalData()); + } + + @Override + public void onError(String error) { + ToastUtil.show(error); + } + }); + } + } + + private void initView() { + achievementText = findViewById(R.id.achievement_text); + achievementList = findViewById(R.id.achievement_list); + if (isLive) { + achievementList.setLayoutManager(new GridLayoutManager(getContext(), 3, GridLayoutManager.VERTICAL, false)); + } else { + achievementList.setLayoutManager(new GridLayoutManager(getContext(), 4, GridLayoutManager.VERTICAL, false)); + } + medalAchievementAdapter = new MedalAchievementAdapter(); + achievementList.setAdapter(medalAchievementAdapter); + } +} 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 b4086d48e..39db6a2b5 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java @@ -2666,6 +2666,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis bundle.putString("mAnchorName", mAnchorName); bundle.putString("mAvatarUrl", mAvatarUrl); bundle.putInt("isAttention", isAttention); + bundle.putBoolean("isLive", mContext instanceof LiveRyAnchorActivity); giftWallDialog.setArguments(bundle); giftWallDialog.show(((AbsActivity) mContext).getSupportFragmentManager(), "GiftWallDialog"); // RouteUtil.forwardGiftWallActivity(mStream,mAnchorName,mLiveUid,mAvatarUrl,isAttention); diff --git a/live/src/main/res/drawable/background_medal_achievement.xml b/live/src/main/res/drawable/background_medal_achievement.xml new file mode 100644 index 000000000..75f3d9478 --- /dev/null +++ b/live/src/main/res/drawable/background_medal_achievement.xml @@ -0,0 +1,9 @@ + + + + + \ No newline at end of file diff --git a/live/src/main/res/layout/dialog_live_gift_wall.xml b/live/src/main/res/layout/dialog_live_gift_wall.xml index 1e9c28dee..5ae28e0f1 100644 --- a/live/src/main/res/layout/dialog_live_gift_wall.xml +++ b/live/src/main/res/layout/dialog_live_gift_wall.xml @@ -58,6 +58,7 @@ android:textSize="16sp" /> + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file