diff --git a/common/src/main/java/com/yunbao/common/bean/HotStrategyBean.java b/common/src/main/java/com/yunbao/common/bean/HotStrategyBean.java new file mode 100644 index 000000000..2a465f9ec --- /dev/null +++ b/common/src/main/java/com/yunbao/common/bean/HotStrategyBean.java @@ -0,0 +1,31 @@ +package com.yunbao.common.bean; + +public class HotStrategyBean { + private String title; + private String english_title; + private String url; + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public String getEnglish_title() { + return english_title; + } + + public void setEnglish_title(String english_title) { + this.english_title = english_title; + } + + public String getUrl() { + return url; + } + + public void setUrl(String url) { + this.url = url; + } +} diff --git a/common/src/main/java/com/yunbao/common/utils/DateFormatUtil.java b/common/src/main/java/com/yunbao/common/utils/DateFormatUtil.java index 0e3c04ae4..a01742d88 100644 --- a/common/src/main/java/com/yunbao/common/utils/DateFormatUtil.java +++ b/common/src/main/java/com/yunbao/common/utils/DateFormatUtil.java @@ -43,6 +43,18 @@ public class DateFormatUtil { return formattedDate; } + public static String getTimeLiveEndString(long time) { + Date date = new Date(time); // 创建Date对象并传入时间戳参数 + SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss"); // 设置日期格式 + String formattedDate = sdf.format(date); // 格式化日期字符串 + return formattedDate; + } + + public static String getDiffInMilliseconds(String time1, String time2) { + return String.valueOf((Long.parseLong(time1) - Long.parseLong(time2)) / (60 * 1000)); + } + + public static String getTimeStrings(long time) { Date date = new Date(time); // 创建Date对象并传入时间戳参数 SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); // 设置日期格式 @@ -105,7 +117,7 @@ public class DateFormatUtil { formatDate = formatDate(date, "yyyy/M/d"); if (showTime) { - formatDate = formatDate ;//+ " " + getTimeString(dateMillis, context); + formatDate = formatDate;//+ " " + getTimeString(dateMillis, context); } } diff --git a/common/src/main/java/com/yunbao/common/views/LiveOpenCustomPopup.java b/common/src/main/java/com/yunbao/common/views/LiveOpenCustomPopup.java index bc86b844d..5a5a28ac7 100644 --- a/common/src/main/java/com/yunbao/common/views/LiveOpenCustomPopup.java +++ b/common/src/main/java/com/yunbao/common/views/LiveOpenCustomPopup.java @@ -5,12 +5,14 @@ import android.widget.TextView; import androidx.annotation.NonNull; +import com.lxj.xpopup.core.BottomPopupView; import com.lxj.xpopup.core.CenterPopupView; import com.yunbao.common.Constants; import com.yunbao.common.R; import com.yunbao.common.bean.LiveClassBean; import com.yunbao.common.bean.LiveRoomTypeBean; import com.yunbao.common.bean.LiveStetUpStatusModel; +import com.yunbao.common.event.LiveNewWishListCloseEvent; import com.yunbao.common.http.base.HttpCallback; import com.yunbao.common.http.live.LiveNetManager; import com.yunbao.common.manager.IMLoginManager; @@ -18,7 +20,10 @@ import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.utils.WordUtil; import com.yunbao.common.views.weight.ViewClicksAntiShake; -public class LiveOpenCustomPopup extends CenterPopupView { +import org.greenrobot.eventbus.Subscribe; +import org.greenrobot.eventbus.ThreadMode; + +public class LiveOpenCustomPopup extends BottomPopupView { //清晰度 private int selectClarity; //直播类型 @@ -26,7 +31,7 @@ public class LiveOpenCustomPopup extends CenterPopupView { //房间类型 private LiveRoomTypeBean liveRoomTypeBean; - private TextView textClarity, textLiveRoomType, textLiveClass, textLiveWishlist, textRobot, textSay, textCall; + private TextView textClarity, textLiveClass, textLiveWishlist, textRobot, textSay, textCall; private int status_say, status_call; @@ -38,12 +43,6 @@ public class LiveOpenCustomPopup extends CenterPopupView { public LiveOpenCustomPopup setLiveRoomTypeBean(LiveRoomTypeBean liveRoomTypeBean) { this.liveRoomTypeBean = liveRoomTypeBean; - if (liveRoomTypeBean.getId()== Constants.LIVE_TYPE_PWD){ - textLiveRoomType.setText(WordUtil.isNewZh() ? "密碼房" : "password room"); - }else { - textLiveRoomType.setText(liveRoomTypeBean.getName()); - } - return this; } @@ -70,7 +69,6 @@ public class LiveOpenCustomPopup extends CenterPopupView { private void initView() { textClarity = findViewById(R.id.text_clarity); - textLiveRoomType = findViewById(R.id.text_live_room_type); textLiveClass = findViewById(R.id.text_live_class); textLiveWishlist = findViewById(R.id.text_live_wishlist); textRobot = findViewById(R.id.text_robot); @@ -79,13 +77,6 @@ public class LiveOpenCustomPopup extends CenterPopupView { if (classBean != null) { textLiveClass.setText(classBean.getName()); } - if (liveRoomTypeBean != null) { - if (liveRoomTypeBean.getId()== Constants.LIVE_TYPE_PWD){ - textLiveRoomType.setText(WordUtil.isNewZh() ? "密碼房" : "password room"); - }else { - textLiveRoomType.setText(liveRoomTypeBean.getName()); - } - } setSelectClarity(selectClarity); //關閉彈窗 ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.live_open_cancel), () -> dismiss()); @@ -108,12 +99,6 @@ public class LiveOpenCustomPopup extends CenterPopupView { callBack.selectClarity(selectClarity); } }); - //設置房間類型 - ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.line_live_room_type), () -> { - if (callBack != null) { - callBack.openLiveRoomType(liveRoomTypeBean); - } - }); //打開心願單 ViewClicksAntiShake.clicksAntiShake(findViewById(R.id.line_live_wishlist), () -> { if (callBack != null) { diff --git a/common/src/main/res/drawable/backgroud_live_end.xml b/common/src/main/res/drawable/backgroud_live_end.xml new file mode 100644 index 000000000..980c5148d --- /dev/null +++ b/common/src/main/res/drawable/backgroud_live_end.xml @@ -0,0 +1,8 @@ + + + + + + \ No newline at end of file diff --git a/common/src/main/res/drawable/backgroud_live_end_1.xml b/common/src/main/res/drawable/backgroud_live_end_1.xml new file mode 100644 index 000000000..f1422092b --- /dev/null +++ b/common/src/main/res/drawable/backgroud_live_end_1.xml @@ -0,0 +1,8 @@ + + + + + + \ No newline at end of file diff --git a/common/src/main/res/drawable/backgroud_live_open_lfet_new.xml b/common/src/main/res/drawable/backgroud_live_open_lfet_new.xml new file mode 100644 index 000000000..4fd9016a7 --- /dev/null +++ b/common/src/main/res/drawable/backgroud_live_open_lfet_new.xml @@ -0,0 +1,8 @@ + + + + + + \ No newline at end of file diff --git a/common/src/main/res/drawable/bg_live_end_user_level_progres.xml b/common/src/main/res/drawable/bg_live_end_user_level_progres.xml new file mode 100644 index 000000000..0da9c5976 --- /dev/null +++ b/common/src/main/res/drawable/bg_live_end_user_level_progres.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/main/src/main/res/drawable/bg_zl_user_level_progres.xml b/common/src/main/res/drawable/bg_zl_user_level_progres.xml similarity index 100% rename from main/src/main/res/drawable/bg_zl_user_level_progres.xml rename to common/src/main/res/drawable/bg_zl_user_level_progres.xml diff --git a/common/src/main/res/drawable/live_open_with.xml b/common/src/main/res/drawable/live_open_with.xml new file mode 100644 index 000000000..be9507d53 --- /dev/null +++ b/common/src/main/res/drawable/live_open_with.xml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/common/src/main/res/drawable/open_live_bg.xml b/common/src/main/res/drawable/open_live_bg.xml new file mode 100644 index 000000000..9a2162ab0 --- /dev/null +++ b/common/src/main/res/drawable/open_live_bg.xml @@ -0,0 +1,12 @@ + + + + + + + + \ No newline at end of file diff --git a/common/src/main/res/layout/view_live_open.xml b/common/src/main/res/layout/view_live_open.xml index 18c987669..d4becf826 100644 --- a/common/src/main/res/layout/view_live_open.xml +++ b/common/src/main/res/layout/view_live_open.xml @@ -1,11 +1,10 @@ - + + + - - - - - - - - - - - - @@ -99,16 +67,22 @@ android:id="@+id/line_live_class" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginStart="29dp" + android:layout_marginStart="18dp" android:layout_marginTop="20dp" - android:layout_marginEnd="29dp" + android:layout_marginEnd="16dp" android:gravity="center_vertical"> + + - - - - - - - - - - - - + @@ -210,16 +152,20 @@ android:id="@+id/line_say" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginStart="29dp" + android:layout_marginStart="18dp" android:layout_marginTop="20dp" - android:layout_marginEnd="29dp" + android:layout_marginEnd="16dp" android:gravity="center_vertical"> - + @@ -247,17 +193,17 @@ android:id="@+id/line_call" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginStart="29dp" + android:layout_marginStart="18dp" android:visibility="gone" android:layout_marginTop="20dp" - android:layout_marginEnd="29dp" + android:layout_marginEnd="16dp" android:gravity="center_vertical"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - \ No newline at end of file + \ No newline at end of file diff --git a/common/src/main/res/mipmap-xxhdpi/icon_fhd.png b/common/src/main/res/mipmap-xxhdpi/icon_fhd.png index a8c3b4224..e383aec07 100644 Binary files a/common/src/main/res/mipmap-xxhdpi/icon_fhd.png and b/common/src/main/res/mipmap-xxhdpi/icon_fhd.png differ diff --git a/common/src/main/res/mipmap-xxhdpi/icon_hd.png b/common/src/main/res/mipmap-xxhdpi/icon_hd.png index 355858316..e50dc9bbf 100644 Binary files a/common/src/main/res/mipmap-xxhdpi/icon_hd.png and b/common/src/main/res/mipmap-xxhdpi/icon_hd.png differ diff --git a/common/src/main/res/mipmap-xxhdpi/icon_live_end_report.png b/common/src/main/res/mipmap-xxhdpi/icon_live_end_report.png new file mode 100644 index 000000000..77720efb7 Binary files /dev/null and b/common/src/main/res/mipmap-xxhdpi/icon_live_end_report.png differ diff --git a/common/src/main/res/mipmap-xxhdpi/icon_live_end_tips.png b/common/src/main/res/mipmap-xxhdpi/icon_live_end_tips.png new file mode 100644 index 000000000..78943db3d Binary files /dev/null and b/common/src/main/res/mipmap-xxhdpi/icon_live_end_tips.png differ diff --git a/common/src/main/res/mipmap-xxhdpi/icon_live_open_anchor_say.png b/common/src/main/res/mipmap-xxhdpi/icon_live_open_anchor_say.png new file mode 100644 index 000000000..6f49a3a61 Binary files /dev/null and b/common/src/main/res/mipmap-xxhdpi/icon_live_open_anchor_say.png differ diff --git a/common/src/main/res/mipmap-xxhdpi/icon_live_open_clarity.png b/common/src/main/res/mipmap-xxhdpi/icon_live_open_clarity.png new file mode 100644 index 000000000..8e3f129e6 Binary files /dev/null and b/common/src/main/res/mipmap-xxhdpi/icon_live_open_clarity.png differ diff --git a/common/src/main/res/mipmap-xxhdpi/icon_live_open_live_class1.png b/common/src/main/res/mipmap-xxhdpi/icon_live_open_live_class1.png new file mode 100644 index 000000000..09a4d79db Binary files /dev/null and b/common/src/main/res/mipmap-xxhdpi/icon_live_open_live_class1.png differ diff --git a/common/src/main/res/mipmap-xxhdpi/icon_live_open_robot.png b/common/src/main/res/mipmap-xxhdpi/icon_live_open_robot.png new file mode 100644 index 000000000..673867044 Binary files /dev/null and b/common/src/main/res/mipmap-xxhdpi/icon_live_open_robot.png differ diff --git a/common/src/main/res/mipmap-xxhdpi/icon_live_open_xjd.png b/common/src/main/res/mipmap-xxhdpi/icon_live_open_xjd.png new file mode 100644 index 000000000..e031dc868 Binary files /dev/null and b/common/src/main/res/mipmap-xxhdpi/icon_live_open_xjd.png differ diff --git a/common/src/main/res/mipmap-xxhdpi/icon_live_open_xjd_tip.png b/common/src/main/res/mipmap-xxhdpi/icon_live_open_xjd_tip.png new file mode 100644 index 000000000..64c93beba Binary files /dev/null and b/common/src/main/res/mipmap-xxhdpi/icon_live_open_xjd_tip.png differ diff --git a/common/src/main/res/mipmap-xxhdpi/icon_more_open.png b/common/src/main/res/mipmap-xxhdpi/icon_more_open.png index b689fffc4..d7ebd0b84 100644 Binary files a/common/src/main/res/mipmap-xxhdpi/icon_more_open.png and b/common/src/main/res/mipmap-xxhdpi/icon_more_open.png differ diff --git a/common/src/main/res/mipmap-xxhdpi/icon_sd.png b/common/src/main/res/mipmap-xxhdpi/icon_sd.png index d81856d10..bb33cfa76 100644 Binary files a/common/src/main/res/mipmap-xxhdpi/icon_sd.png and b/common/src/main/res/mipmap-xxhdpi/icon_sd.png differ diff --git a/common/src/main/res/mipmap-xxhdpi/right_live_end.png b/common/src/main/res/mipmap-xxhdpi/right_live_end.png new file mode 100644 index 000000000..05d595b75 Binary files /dev/null and b/common/src/main/res/mipmap-xxhdpi/right_live_end.png differ diff --git a/common/src/main/res/values-en-rUS/strings.xml b/common/src/main/res/values-en-rUS/strings.xml index 51b015de3..8ee2e1502 100644 --- a/common/src/main/res/values-en-rUS/strings.xml +++ b/common/src/main/res/values-en-rUS/strings.xml @@ -1474,4 +1474,6 @@ Limited ride And limited avatar frame Include: 看直播%dmin Chat Records + Set the following functions to receive more rewards + Get Started! diff --git a/common/src/main/res/values-zh/strings.xml b/common/src/main/res/values-zh/strings.xml index c98de881c..a5bad5089 100644 --- a/common/src/main/res/values-zh/strings.xml +++ b/common/src/main/res/values-zh/strings.xml @@ -1604,5 +1604,7 @@ 違規原因: 處罰內容: 處罰時間: + 添加以下設定將有機會獲得更多收益 + 馬上開播! diff --git a/common/src/main/res/values/strings.xml b/common/src/main/res/values/strings.xml index e59cb38c7..721236e12 100644 --- a/common/src/main/res/values/strings.xml +++ b/common/src/main/res/values/strings.xml @@ -1412,5 +1412,7 @@ Limited ride And limited avatar frame Personal hal Whole site hal Honors + Set the following functions to receive more rewards + Get Started! diff --git a/live/src/main/java/com/yunbao/live/activity/LiveRyAnchorActivity.java b/live/src/main/java/com/yunbao/live/activity/LiveRyAnchorActivity.java index 1b1757d8a..1324b9270 100644 --- a/live/src/main/java/com/yunbao/live/activity/LiveRyAnchorActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/LiveRyAnchorActivity.java @@ -997,7 +997,7 @@ public class LiveRyAnchorActivity extends LiveActivity implements LiveFunctionCl mLiveEndViewHolder.subscribeActivityLifeCycle(); mLiveEndViewHolder.addToParent(); mLiveEndViewHolder.showData(mLiveBean, mStream); - mLiveEndViewHolder.upData(datas.getString("votes"), datas.getString("length"), Long.parseLong(datas.getString("nums"))); + //mLiveEndViewHolder.upData(datas.getString("votes"), datas.getString("length"), Long.parseLong(datas.getString("nums"))); } if (mLiveAnchorViewHolder != null) { mLiveAnchorViewHolder.release(); diff --git a/live/src/main/java/com/yunbao/live/activity/LiveSwAnchorActivity.java b/live/src/main/java/com/yunbao/live/activity/LiveSwAnchorActivity.java index d98283368..7343d9ae7 100644 --- a/live/src/main/java/com/yunbao/live/activity/LiveSwAnchorActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/LiveSwAnchorActivity.java @@ -977,7 +977,7 @@ public class LiveSwAnchorActivity extends LiveActivity implements LiveFunctionCl mLiveEndViewHolder.subscribeActivityLifeCycle(); mLiveEndViewHolder.addToParent(); mLiveEndViewHolder.showData(mLiveBean, mStream); - mLiveEndViewHolder.upData(datas.getString("votes"), datas.getString("length"), Long.parseLong(datas.getString("nums"))); + mLiveEndViewHolder.upData(datas.getString("votes"), datas.getString("length"), Long.parseLong(datas.getString("nums")),datas.getString("level"),datas.getString("votestotal"),datas.getString("level_up"),datas.getString("next_level_exp"),datas.getString("starttime"),datas.getString("endtime"),datas.getString("hot_strategy")); if (banEvent != null) { mLiveEndViewHolder.showBanDownLive(banEvent); banEvent = null; diff --git a/live/src/main/java/com/yunbao/live/views/LiveEndViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveEndViewHolder.java index 6b926c278..7c5bdc010 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveEndViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveEndViewHolder.java @@ -4,19 +4,28 @@ import android.app.Activity; import android.content.Context; import android.text.TextUtils; import android.util.Log; +import android.view.Gravity; +import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; import android.widget.LinearLayout; +import android.widget.ProgressBar; import android.widget.RelativeLayout; +import android.widget.ScrollView; import android.widget.TextView; +import android.widget.ViewFlipper; import androidx.recyclerview.widget.GridLayoutManager; import androidx.recyclerview.widget.RecyclerView; import com.alibaba.fastjson.JSON; +import com.yunbao.common.CommonAppConfig; +import com.yunbao.common.activity.WebViewActivity; +import com.yunbao.common.bean.AdBean; import com.yunbao.common.bean.AnchorRecommendModel; import com.yunbao.common.bean.BanDownLiveEvent; +import com.yunbao.common.bean.HotStrategyBean; import com.yunbao.common.bean.IMLoginModel; import com.yunbao.common.bean.LiveBean; import com.yunbao.common.bean.SetAttentsModel; @@ -27,6 +36,8 @@ import com.yunbao.common.http.live.LiveNetManager; import com.yunbao.common.http.main.MainNetManager; import com.yunbao.common.manager.IMLoginManager; import com.yunbao.common.utils.Bus; +import com.yunbao.common.utils.DateFormatUtil; +import com.yunbao.common.utils.DpUtil; import com.yunbao.common.utils.MicStatusManager; import com.yunbao.common.utils.RouteUtil; import com.yunbao.common.utils.StringUtil; @@ -34,11 +45,13 @@ import com.yunbao.common.utils.ToastUtil; import com.yunbao.common.utils.WordUtil; import com.yunbao.common.views.AbsViewHolder; import com.yunbao.common.views.weight.ClipPathCircleImage; +import com.yunbao.common.views.weight.ViewClicksAntiShake; import com.yunbao.live.R; import com.yunbao.live.activity.LiveAnchorActivity; import com.yunbao.live.activity.LiveAudienceActivity; import com.yunbao.live.activity.LiveRyAnchorActivity; import com.yunbao.live.activity.LiveSwAnchorActivity; +import com.yunbao.live.activity.ZhuangBanActivity; import com.yunbao.live.adapter.SearchRecommendBodyAdapter; import com.yunbao.live.event.JumpUserHomeEvent; import com.yunbao.common.event.LiveRoomChangeEvent; @@ -50,7 +63,9 @@ import org.greenrobot.eventbus.EventBus; import org.greenrobot.eventbus.Subscribe; import org.greenrobot.eventbus.ThreadMode; +import java.math.BigDecimal; import java.util.HashMap; +import java.util.List; import java.util.Map; import io.rong.imlib.IRongCoreCallback; @@ -67,9 +82,9 @@ public class LiveEndViewHolder extends AbsViewHolder implements View.OnClickList //直播类型 private static LiveOfType type; - private static TextView liveDurationUser, liveNameUser, - goHomeUser, anchorName, liveDurationAnchor, liveVotes, liveWatchNum; - private RelativeLayout userLiveEnd, anchorLiveEnd; + private static TextView liveDurationUser, liveNameUser, goHomeUser, anchorName, liveDurationAnchor, liveVotes, liveWatchNum; + private RelativeLayout userLiveEnd; + private ScrollView anchorLiveEnd; private ClipPathCircleImage clipImageUser, clipImageanchor; private LinearLayout followUser, listShow; private ImageView changeBatchUser; @@ -80,6 +95,11 @@ public class LiveEndViewHolder extends AbsViewHolder implements View.OnClickList private String leaveStream, leaveGroupId; private TextView banTitle, banContent, banReason, banTimer; private View banLayout; + private TextView count1, count2, count3, count4, count5, count6, count7, count8; + private TextView anchor_level; + private TextView my_level; + private ViewFlipper live_end_vf; + private ProgressBar level_progress; public LiveEndViewHolder(Context context, ViewGroup parentView, String uid) { super(context, parentView); @@ -110,7 +130,7 @@ public class LiveEndViewHolder extends AbsViewHolder implements View.OnClickList Bus.getOn(this); mAvatar1 = (ImageView) findViewById(R.id.avatar_1); userLiveEnd = (RelativeLayout) findViewById(R.id.user_live_end); - anchorLiveEnd = (RelativeLayout) findViewById(R.id.anchor_live_end); + anchorLiveEnd = findViewById(R.id.anchor_live_end); if (type == LiveOfType.USER) { initViewOfUser(); initDataOfUser(); @@ -131,17 +151,16 @@ public class LiveEndViewHolder extends AbsViewHolder implements View.OnClickList public void onSuccess() { try { Log.i("tx", "退出成功" + live_id); - LiveNetManager.get(mContext) - .leaveRoomNew(leaveStream, leaveGroupId, new com.yunbao.common.http.base.HttpCallback() { - @Override - public void onSuccess(String data) { + LiveNetManager.get(mContext).leaveRoomNew(leaveStream, leaveGroupId, new com.yunbao.common.http.base.HttpCallback() { + @Override + public void onSuccess(String data) { - } + } - @Override - public void onError(String error) { - } - }); + @Override + public void onError(String error) { + } + }); leaveStream = ""; leaveGroupId = ""; @@ -156,16 +175,15 @@ public class LiveEndViewHolder extends AbsViewHolder implements View.OnClickList try { Log.i("tx", "退出成功" + live_id); - LiveNetManager.get(mContext) - .leaveRoomNew(leaveStream, leaveGroupId, new com.yunbao.common.http.base.HttpCallback() { - @Override - public void onSuccess(String data) { - } + LiveNetManager.get(mContext).leaveRoomNew(leaveStream, leaveGroupId, new com.yunbao.common.http.base.HttpCallback() { + @Override + public void onSuccess(String data) { + } - @Override - public void onError(String error) { - } - }); + @Override + public void onError(String error) { + } + }); leaveStream = ""; leaveGroupId = ""; } catch (Exception e) { @@ -182,38 +200,35 @@ public class LiveEndViewHolder extends AbsViewHolder implements View.OnClickList Map map = new HashMap<>(); map.put("num", "3"); map.put("live_recommend", "sidebar"); - MainNetManager.get((Activity) mContext) - .anchorRecommend(map, new HttpCallback() { - @Override - public void onSuccess(AnchorRecommendModel data) { - if (((Activity) mContext).isFinishing()) return; - if (data.getListShow() == 1) { - listShow.setVisibility(View.VISIBLE); - } else { - listShow.setVisibility(View.GONE); - } - if (data.getUpShow() == 1) { - changeBatchUser.setVisibility(View.VISIBLE); - } else { - changeBatchUser.setVisibility(View.GONE); - } - if (data.getList().size() > 2) { - listShow.setVisibility(View.VISIBLE); - //组装搜索历史数据 - adapter.showData(data.getList()); - } else { - listShow.setVisibility(View.GONE); + MainNetManager.get((Activity) mContext).anchorRecommend(map, new HttpCallback() { + @Override + public void onSuccess(AnchorRecommendModel data) { + if (((Activity) mContext).isFinishing()) return; + if (data.getListShow() == 1) { + listShow.setVisibility(View.VISIBLE); + } else { + listShow.setVisibility(View.GONE); + } + if (data.getUpShow() == 1) { + changeBatchUser.setVisibility(View.VISIBLE); + } else { + changeBatchUser.setVisibility(View.GONE); + } + if (data.getList().size() > 2) { + listShow.setVisibility(View.VISIBLE); + //组装搜索历史数据 + adapter.showData(data.getList()); + } else { + listShow.setVisibility(View.GONE); - } + } + } - - } - - @Override - public void onError(String error) { - ToastUtil.show(WordUtil.isNewZh() ? "抱歉!出錯了!" : "i \\'m sorry! An error occurred"); - } - }); + @Override + public void onError(String error) { + ToastUtil.show(WordUtil.isNewZh() ? "抱歉!出錯了!" : "i \\'m sorry! An error occurred"); + } + }); } /** @@ -225,12 +240,11 @@ public class LiveEndViewHolder extends AbsViewHolder implements View.OnClickList liveNameUser = (TextView) findViewById(R.id.live_name_user); goHomeUser = (TextView) findViewById(R.id.go_home_user); - clipImageUser = (ClipPathCircleImage) findViewById(R.id.clip_image_user); - - followUser = (LinearLayout) findViewById(R.id.follow_user); - listShow = (LinearLayout) findViewById(R.id.list_show); - changeBatchUser = (ImageView) findViewById(R.id.change_batch_user); - likeList = (RecyclerView) findViewById(R.id.like_list); + clipImageUser = findViewById(R.id.clip_image_user); + followUser = findViewById(R.id.follow_user); + listShow = findViewById(R.id.list_show); + changeBatchUser = findViewById(R.id.change_batch_user); + likeList = findViewById(R.id.like_list); goHomeUser.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { @@ -259,28 +273,82 @@ public class LiveEndViewHolder extends AbsViewHolder implements View.OnClickList clipImageanchor = (ClipPathCircleImage) findViewById(R.id.clip_image_anchor); anchorName = (TextView) findViewById(R.id.anchor_name); liveDurationAnchor = (TextView) findViewById(R.id.live_duration_anchor); - liveVotes = (TextView) findViewById(R.id.live_votes); - liveWatchNum = (TextView) findViewById(R.id.live_watch_num); banContent = (TextView) findViewById(R.id.ban_content); banReason = (TextView) findViewById(R.id.ban_reason); banTimer = (TextView) findViewById(R.id.ban_timer); banTitle = (TextView) findViewById(R.id.ban_title); banLayout = findViewById(R.id.banLayout); + count1 = findViewById(R.id.count1); + count2 = findViewById(R.id.count2); + count3 = findViewById(R.id.count3); + count4 = findViewById(R.id.count4); + count5 = findViewById(R.id.count5); + count6 = findViewById(R.id.count6); + count7 = findViewById(R.id.count7); + count8 = findViewById(R.id.count8); + anchor_level = findViewById(R.id.anchor_level); + my_level = findViewById(R.id.my_level); + live_end_vf = findViewById(R.id.live_end_vf); + level_progress = findViewById(R.id.level_progress); + findViewById(R.id.go_home_anchor).setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + if (mContext instanceof LiveRyAnchorActivity) { + ((LiveRyAnchorActivity) mContext).superBackPressed(); + } else if (mContext instanceof LiveAudienceActivity) { + ((LiveAudienceActivity) mContext).exitLiveRoom(); + } else if (mContext instanceof LiveSwAnchorActivity) { + ((LiveSwAnchorActivity) mContext).superBackPressed(); + } + Bus.get().post(new CloseEvent()); + } + }); + my_level.setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + String url = CommonAppConfig.HOST + "/h5/Grade/index.html?" + "token=" + CommonAppConfig.getInstance().getToken() + "&uid=" + CommonAppConfig.getInstance().getUid() + "&for"; + ZhuangBanActivity.forward(mContext, url, 0); + } + }); + findViewById(R.id.go_anchor_center).setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + String url = CommonAppConfig.HOST + "/index.php?g=Appapi&m=Auth&a=authcenter"; + url += "&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&isZh=" + (WordUtil.isNewZh() ? "1" : 0); + ZhuangBanActivity.forward(mContext, url, 0); + } + }); + findViewById(R.id.close).setOnClickListener(new View.OnClickListener() { + @Override + public void onClick(View v) { + if (mContext instanceof LiveRyAnchorActivity) { + ((LiveRyAnchorActivity) mContext).superBackPressed(); + } else if (mContext instanceof LiveAudienceActivity) { + ((LiveAudienceActivity) mContext).exitLiveRoom(); + } else if (mContext instanceof LiveSwAnchorActivity) { + ((LiveSwAnchorActivity) mContext).superBackPressed(); + } + Bus.get().post(new CloseEvent()); + } + }); + LiveNetManager.get(mContext).getLiveData(CommonAppConfig.getInstance().getUid(), new HttpCallback() { + @Override + public void onSuccess(com.yunbao.common.bean.LiveDataInfoModel data) { + count1.setText(data.getTotalCoin() + ""); + count2.setText(data.getTotalGold() + ""); + count3.setText(data.getAcceptNum() + ""); + count4.setText(data.getEnterNum() + ""); + count5.setText(data.getAttentionNum() + ""); + count6.setText(data.getAttentionNumRate() + ""); + count7.setText(data.getFanGroupNum() + ""); + count8.setText(data.getFanGroupNumRate() + ""); + } - findViewById(R.id.go_home_anchor) - .setOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View v) { - if (mContext instanceof LiveRyAnchorActivity) { - ((LiveRyAnchorActivity) mContext).superBackPressed(); - } else if (mContext instanceof LiveAudienceActivity) { - ((LiveAudienceActivity) mContext).exitLiveRoom(); - } else if (mContext instanceof LiveSwAnchorActivity) { - ((LiveSwAnchorActivity) mContext).superBackPressed(); - } - Bus.get().post(new CloseEvent()); - } - }); + @Override + public void onError(String error) { + ToastUtil.show(mContext.getString(com.yunbao.common.R.string.net_error)); + } + }); } public static void upData(String votes, String length, int nums, String uname) { @@ -305,16 +373,18 @@ public class LiveEndViewHolder extends AbsViewHolder implements View.OnClickList } } - public void upData(String votes, String length, long nums) { + public void upData(String votes, String length, long nums,String level,String votestotal,String level_up,String next_level_exp,String starttime,String endtime,String hot_strategy) { Log.e("收", votes + "votes" + length + "length" + nums + "nums"); if (type == LiveOfType.USER) { if (liveDurationUser != null) { liveDurationUser.setText(length); } - } else { if (liveDurationAnchor != null) { - liveDurationAnchor.setText(length); + String timeStr = DateFormatUtil.getTimeLiveEndString(Long.parseLong(starttime))+ + "-"+DateFormatUtil.getTimeLiveEndString(Long.parseLong(endtime)) + +mContext.getResources().getString(R.string.live_end_total)+DateFormatUtil.getDiffInMilliseconds(starttime,endtime)+mContext.getResources().getString(R.string.live_end_minute); + liveDurationAnchor.setText(timeStr); } if (liveVotes != null) { liveVotes.setText(votes); @@ -322,6 +392,47 @@ public class LiveEndViewHolder extends AbsViewHolder implements View.OnClickList if (liveWatchNum != null) { liveWatchNum.setText(StringUtil.toWan(nums)); } + if(anchor_level!=null){ + long levelExp = Long.parseLong(next_level_exp); + String tips = mContext.getResources().getString(R.string.live_user_level_anchor) + +"Lv."+level+" | "+(WordUtil.isNewZh()?"差 "+levelExp+" 經驗升級":levelExp+" experience points to level up"); + anchor_level.setText(tips); + } + if(!StringUtil.isEmpty(hot_strategy)){ + List hotStrategyBeanList = JSON.parseArray(hot_strategy, HotStrategyBean.class); + for (int i = 0; i { - LiveNetManager.get(mContext) - .setAttents(String.valueOf(liveBean.getUid()), new HttpCallback() { - @Override - public void onSuccess(SetAttentsModel data) { - followUser.setVisibility(View.GONE); - } + LiveNetManager.get(mContext).setAttents(String.valueOf(liveBean.getUid()), new HttpCallback() { + @Override + public void onSuccess(SetAttentsModel data) { + followUser.setVisibility(View.GONE); + } - @Override - public void onError(String error) { - } - }); + @Override + public void onError(String error) { + } + }); }); } else { anchorName.setText(liveBean.getUserNiceName()); @@ -399,8 +509,7 @@ public class LiveEndViewHolder extends AbsViewHolder implements View.OnClickList * 结束的类型 */ public enum LiveOfType { - USER(0, "用户"), - ANCHOR(1, "主播"); + USER(0, "用户"), ANCHOR(1, "主播"); private int type = 0; private String name = ""; diff --git a/live/src/main/java/com/yunbao/live/views/LiveNewReadySwViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveNewReadySwViewHolder.java index a3000244c..fe6dba102 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveNewReadySwViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveNewReadySwViewHolder.java @@ -35,6 +35,7 @@ import com.yunbao.common.bean.LiveAnchorSayModel; import com.yunbao.common.bean.LiveClassBean; import com.yunbao.common.bean.LiveRoomTypeBean; import com.yunbao.common.bean.UserBean; +import com.yunbao.common.event.LiveNewWishListCloseEvent; import com.yunbao.common.event.LivePushRyEvent; import com.yunbao.common.glide.ImgLoader; import com.yunbao.common.http.HttpCallback; @@ -575,6 +576,12 @@ public class LiveNewReadySwViewHolder extends AbsViewHolder implements View.OnCl } } + @Subscribe(threadMode = ThreadMode.MAIN) + public void onLiveNewWishListCloseEvent(LiveNewWishListCloseEvent event) { + if (liveOpenCustomPopup != null) { + liveOpenCustomPopup.initDate(); + } + } /** * 打开心愿单窗口 diff --git a/live/src/main/res/drawable/background_anchor_live_end.xml b/live/src/main/res/drawable/background_anchor_live_end.xml index d1cddd332..b5ba6376d 100644 --- a/live/src/main/res/drawable/background_anchor_live_end.xml +++ b/live/src/main/res/drawable/background_anchor_live_end.xml @@ -2,8 +2,8 @@ - - + + \ No newline at end of file diff --git a/live/src/main/res/layout/view_live_end.xml b/live/src/main/res/layout/view_live_end.xml index 701c52c01..d5ea84f08 100644 --- a/live/src/main/res/layout/view_live_end.xml +++ b/live/src/main/res/layout/view_live_end.xml @@ -4,10 +4,12 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" + android:background="#151823" android:clickable="true"> @@ -352,274 +354,576 @@ - - - - + android:layout_height="wrap_content" + android:orientation="vertical"> - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + android:layout_marginLeft="16dp" + android:layout_marginTop="25dp" + android:layout_marginRight="16dp" + android:orientation="vertical" + android:visibility="gone" + tools:visibility="visible"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + android:id="@+id/go_anchor_center" + android:layout_width="115dp" + android:layout_height="40dp" + android:layout_gravity="center" + android:background="@drawable/backgroud_live_end" + android:gravity="center" + android:text="@string/live_end_anchor_enter" + android:textColor="#8D8D8D" + android:textSize="16sp" /> - - - - - - - - + android:minWidth="115dp" + android:layout_height="40dp" + android:paddingStart="10dp" + android:paddingEnd="10dp" + android:layout_gravity="center" + android:layout_marginLeft="37dp" + android:background="@drawable/backgroud_live_end_1" + android:gravity="center" + android:text="@string/live_back" + android:textColor="#E9E9E9" + android:textSize="16sp" /> - - - - - - - - - - - - - + \ No newline at end of file diff --git a/live/src/main/res/layout/view_live_end_hot.xml b/live/src/main/res/layout/view_live_end_hot.xml new file mode 100644 index 000000000..c76900395 --- /dev/null +++ b/live/src/main/res/layout/view_live_end_hot.xml @@ -0,0 +1,23 @@ + + + + + + \ No newline at end of file diff --git a/live/src/main/res/layout/view_new_live_ready.xml b/live/src/main/res/layout/view_new_live_ready.xml index 767e87df2..a46c97608 100644 --- a/live/src/main/res/layout/view_new_live_ready.xml +++ b/live/src/main/res/layout/view_new_live_ready.xml @@ -242,10 +242,10 @@ app:layout_constraintTop_toBottomOf="@+id/tips"> [已讀] [未讀] 發起聊天 + 主播中心 + 直播攻略 + 我的等级 + + 分鐘 diff --git a/live/src/main/res/values/strings.xml b/live/src/main/res/values/strings.xml index 68cacc9f3..b84745648 100644 --- a/live/src/main/res/values/strings.xml +++ b/live/src/main/res/values/strings.xml @@ -158,4 +158,9 @@ Quantity achieved Join Guard tasks + Live Center + Live strategy + My level + total + minute \ No newline at end of file