diff --git a/common/src/main/java/com/yunbao/common/HtmlConfig.java b/common/src/main/java/com/yunbao/common/HtmlConfig.java index 9dd772b76..321b27702 100644 --- a/common/src/main/java/com/yunbao/common/HtmlConfig.java +++ b/common/src/main/java/com/yunbao/common/HtmlConfig.java @@ -13,6 +13,7 @@ public class HtmlConfig { //注册用户协议 public static final String REG_PRIVCAY1 = CommonAppConfig.HOST + "/h5/page/index.html?id=735";//用户服务协议 public static final String REG_PRIVCAY2 = CommonAppConfig.HOST + "/h5/page/index.html?id=733";//隐私政策 + public static final String ANCHOR_AGREEMENT = CommonAppConfig.HOST + "/h5/page/index.html?id=734";//主播协议 //直播间贡献榜 public static final String LIVE_LIST = CommonAppConfig.HOST + "/index.php?g=Appapi&m=contribute&a=index&uid="; diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveHDDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/LiveHDDialogFragment.java index a1168ac27..90aa659b3 100644 --- a/live/src/main/java/com/yunbao/live/dialog/LiveHDDialogFragment.java +++ b/live/src/main/java/com/yunbao/live/dialog/LiveHDDialogFragment.java @@ -129,7 +129,7 @@ public class LiveHDDialogFragment extends AbsDialogFragment { } else { params.height = WindowManager.LayoutParams.WRAP_CONTENT; } - params.gravity = Gravity.BOTTOM; + params.gravity = Gravity.CENTER_VERTICAL; window.setAttributes(params); } @@ -190,7 +190,11 @@ public class LiveHDDialogFragment extends AbsDialogFragment { params.width = bundle.getInt("width", -1); mWebView.setLayoutParams(params); } + + + String url = bundle.getString("url"); + //url += "&anchorUid=" + mLiveUid+"&stream="+mStream+ "&isZh=" + (WordUtil.isNewZh() ? "1" : 0); if (!url.contains("anchorUid")){ url +="&anchorUid=" + mLiveUid; 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 0be3d139a..8e75a8fcd 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveNewReadySwViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveNewReadySwViewHolder.java @@ -29,6 +29,7 @@ import com.lxj.xpopup.core.BasePopupView; import com.lxj.xpopup.interfaces.XPopupCallback; import com.yunbao.common.CommonAppConfig; import com.yunbao.common.Constants; +import com.yunbao.common.HtmlConfig; import com.yunbao.common.bean.IMLoginModel; import com.yunbao.common.bean.LiveAnchorCallMeModel; import com.yunbao.common.bean.LiveAnchorSayModel; @@ -545,12 +546,7 @@ public class LiveNewReadySwViewHolder extends AbsViewHolder implements View.OnCl String ct = Locale.getDefault().getLanguage(); IMLoginModel model = IMLoginManager.get(mContext).getUserInfo(); StringBuffer url = new StringBuffer(); - url.append(CommonAppConfig.HOST); - if (TextUtils.equals(ct, "zh")) { - url.append("/index.php?g=portal&m=page&a=index&id=671"); - } else { - url.append("/index.php?g=portal&m=page&a=index&id=672"); - } + url.append(HtmlConfig.ANCHOR_AGREEMENT); url.append("&uid=") .append(model.getId()) .append("&token=") 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 a75c1ea64..d782ef053 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRoomViewHolder.java @@ -2491,6 +2491,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis mBanner2.setAutoPlay(false).setPages(mBannerList2, new CustomViewHolder()).setDelayTime(3200).setBannerStyle(BannerConfig.NOT_INDICATOR).setOnBannerClickListener(new OnBannerClickListener() { @Override public void onBannerClick(List datas, int p) { + Log.i("banner", "onBannerClick: 3" ); if (showLoadingDialog()) { return; } @@ -2536,6 +2537,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis mBanner2.setAutoPlay(true).setPages(mBannerList2, new CustomViewHolder()).setDelayTime(3200).setBannerStyle(BannerConfig.NOT_INDICATOR).setOnBannerClickListener(new OnBannerClickListener() { @Override public void onBannerClick(List datas, int p) { + Log.i("banner", "onBannerClick4: " ); if (showLoadingDialog()) { return; } @@ -2707,6 +2709,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis mBanner1.setAutoPlay(true).setPages(mBannerList1, new CustomViewHolder()).setDelayTime(3000).setBannerStyle(BannerConfig.NOT_INDICATOR).setOnBannerClickListener(new OnBannerClickListener() { @Override public void onBannerClick(List datas, int p) { + Log.i("banner", "onBannerClick: 5"); if (mBannerList1 != null) { if (p >= 0 && p < mBannerList1.size()) { BannerBean bean = mBannerList1.get(p); @@ -4986,6 +4989,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis mBanner3.setAutoPlay(true).setPages(mBannerList3, new Banner3CustomViewHolder()).setDelayTime(3000).setBannerStyle(BannerConfig.NOT_INDICATOR).setOnBannerClickListener(new OnBannerClickListener() { @Override public void onBannerClick(List datas, int p) { + Log.i("banner", "onBannerClick: 6"); if (mBannerList3 != null) { if (mBannerList3.get(p).getLink().equals("BattlePass")) { RouteUtil.forwardBattlePass(); @@ -5021,6 +5025,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis @Override public void onBannerClick(List datas, int p) { + Log.i("banner", "onBannerClick:7 " ); if (mBannerList4.get(p).getLink().equals("BattlePass") || mBannerList4.get(p).getType() == 888) { RouteUtil.forwardBattlePass(); return; @@ -6288,6 +6293,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis topBanner1.setAutoPlay(true).setPages(mTopBannerList, new TopBannerCustomViewHolder()).setDelayTime(3000).setBannerStyle(BannerConfig.NOT_INDICATOR).setOnBannerClickListener(new OnBannerClickListener() { @Override public void onBannerClick(List datas, int position) { + Log.i("banner", "onBannerClick: " + position); if (datas.size() > 0 && mTopBannerList != null && mTopBannerList.size() > 0) { if (mTopBannerList.get(position).getType() == TopBannerCustomViewHolder.TYPE_CALL_ANCHOR) { MobclickAgent.onEvent(mContext, "live_room_contact", "联系方式按钮"); @@ -6322,7 +6328,11 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis IMLoginModel userInfo = IMLoginManager.get(mContext).getUserInfo(); String type = ""; StringBuffer htmlUrl = new StringBuffer(); - htmlUrl.append(HtmlConfig.WISHLIST_URL).append(HtmlConfig.WISHLIST_URL.contains("?") ? "&uid=" : "?uid=").append(userInfo.getId()).append("&token=").append(userInfo.getToken()).append("&anchorUid=").append(mLiveUid).append("&liveUid=").append(mLiveUid).append("&t=").append(System.currentTimeMillis()).append("&g=Appapi&m=Wish&a=index").append("&isZh=").append(((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0")); + htmlUrl.append(HtmlConfig.WISHLIST_URL).append(HtmlConfig.WISHLIST_URL.contains("?") ? "&uid=" : "?uid=") + .append(userInfo.getId()).append("&token=").append(userInfo.getToken()).append("&anchorUid=") + .append(mLiveUid).append("&liveUid=").append(mLiveUid).append("&t=") + .append(System.currentTimeMillis()).append("&g=Appapi&m=Wish&a=index").append("&isZh=") + .append(((IMLoginManager.get(mContext).getLocaleLanguage() == Locale.SIMPLIFIED_CHINESE) ? "1" : "0")); if (TextUtils.equals(type, "1")) { ZhuangBanActivity.forward(mContext, htmlUrl.toString(), false, 1); } else { @@ -6340,6 +6350,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis topBanner2.setAutoPlay(true).setPages(mTopBannerList, new TopBannerCustomViewHolder(false)).setDelayTime(3000).setBannerStyle(BannerConfig.NOT_INDICATOR).setOnBannerClickListener(new OnBannerClickListener() { @Override public void onBannerClick(List datas, int position) { + Log.i("banner", "onBannerClick2: " + position); if (datas.size() > 0) { if (position >= mTopBannerList.size()) { position = 0; diff --git a/live/src/main/java/com/yunbao/live/views/LiveRyAnchorViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveRyAnchorViewHolder.java index 42e10c2af..5660a2b41 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveRyAnchorViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveRyAnchorViewHolder.java @@ -30,6 +30,7 @@ import com.ms.banner.Banner; import com.ms.banner.BannerConfig; import com.ms.banner.listener.OnBannerClickListener; import com.yunbao.common.CommonAppConfig; +import com.yunbao.common.HtmlConfig; import com.yunbao.common.bean.BannerBean; import com.yunbao.common.bean.IMLoginModel; import com.yunbao.common.bean.LiveBean; @@ -625,8 +626,8 @@ public class LiveRyAnchorViewHolder extends AbsLiveViewHolder { .append(WordUtil.isNewZh() ? "1" : 0); } else { type = bean.getShow_type(); - htmlUrl.append(bean.getLink()) - .append(bean.getLink().contains("?") ? "&uid=" : "?uid=") + htmlUrl.append(HtmlConfig.WISHLIST_URL) + .append(HtmlConfig.WISHLIST_URL.contains("?") ? "&uid=" : "?uid=") .append(userInfo.getId()) .append("&token=") .append(userInfo.getToken()) diff --git a/live/src/main/res/drawable/chat_shen_cn.png b/live/src/main/res/drawable/chat_shen_cn.png new file mode 100644 index 000000000..87c4aeb78 Binary files /dev/null and b/live/src/main/res/drawable/chat_shen_cn.png differ diff --git a/live/src/main/res/drawable/chat_shen_en.png b/live/src/main/res/drawable/chat_shen_en.png new file mode 100644 index 000000000..29e06e1db Binary files /dev/null and b/live/src/main/res/drawable/chat_shen_en.png differ diff --git a/live/src/main/res/drawable/chat_wang_cn.png b/live/src/main/res/drawable/chat_wang_cn.png new file mode 100644 index 000000000..66b9afe14 Binary files /dev/null and b/live/src/main/res/drawable/chat_wang_cn.png differ diff --git a/live/src/main/res/drawable/chat_wang_en.png b/live/src/main/res/drawable/chat_wang_en.png new file mode 100644 index 000000000..f1da1b215 Binary files /dev/null and b/live/src/main/res/drawable/chat_wang_en.png differ diff --git a/live/src/main/res/drawable/chat_xing_cn.png b/live/src/main/res/drawable/chat_xing_cn.png new file mode 100644 index 000000000..52f818898 Binary files /dev/null and b/live/src/main/res/drawable/chat_xing_cn.png differ diff --git a/live/src/main/res/drawable/chat_xing_en.png b/live/src/main/res/drawable/chat_xing_en.png new file mode 100644 index 000000000..1d03df2a7 Binary files /dev/null and b/live/src/main/res/drawable/chat_xing_en.png differ 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 211e8aae1..f53ea2631 100644 --- a/main/src/main/java/com/yunbao/main/activity/MainActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/MainActivity.java @@ -54,6 +54,7 @@ import com.tencent.imsdk.v2.V2TIMSDKConfig; import com.tencent.imsdk.v2.V2TIMSDKListener; import com.tencent.imsdk.v2.V2TIMUserFullInfo; import com.yunbao.common.utils.AppManager; +import com.yunbao.common.utils.Bus; import com.yunbao.common.utils.MobclickAgent; import com.yunbao.common.CommonAppConfig; import com.yunbao.common.Constants; @@ -115,7 +116,9 @@ import com.yunbao.common.utils.WordUtil; import com.yunbao.common.views.APKUpdateCustomPopup; import com.yunbao.common.views.AbsMainViewHolder; import com.yunbao.common.views.floatingview.APPEasyFloat; +import com.yunbao.common.views.weight.ViewClicksAntiShake; import com.yunbao.live.activity.LiveAudienceActivity; +import com.yunbao.live.event.LiveAudienceEvent; import com.yunbao.live.utils.LiveStorge; import com.yunbao.main.R; import com.yunbao.main.adapter.FullAdToBannerTransition; @@ -881,6 +884,9 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene if (i == R.id.btn_start) { showStartDialog(); MobclickAgent.onEvent(mContext, "broadcast", "开播按钮"); +// ViewClicksAntiShake.clicksAntiShake(v, () -> { +// +// }); } else if (i == R.id.btn_search) { SearchActivity.forward(mContext); @@ -924,10 +930,12 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene } }); } - } + + + /** * 检查版本更新 */ diff --git a/main/src/main/java/com/yunbao/main/activity/UserHomeActivity.java b/main/src/main/java/com/yunbao/main/activity/UserHomeActivity.java index e4776463c..10dd06cbd 100644 --- a/main/src/main/java/com/yunbao/main/activity/UserHomeActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/UserHomeActivity.java @@ -822,8 +822,10 @@ public class UserHomeActivity extends AbsActivity { @Override public void onItemClick(String text, int tag) { if (tag == 0) { + RouteUtil.forwardLiveReportActivity(String.valueOf(userInfo.getUserHomeTopInfo().getUser_id())); } else if (tag == 1) { + CommonHttpUtil.noInterest(String.valueOf(userInfo.getUserHomeTopInfo().getUser_id()), new com.yunbao.common.http.HttpCallback() { @Override public void onSuccess(int code, String msg, String[] info) { diff --git a/main/src/main/java/com/yunbao/main/views/MainHomeViewHolder2.java b/main/src/main/java/com/yunbao/main/views/MainHomeViewHolder2.java index 1be5fae49..664064c23 100644 --- a/main/src/main/java/com/yunbao/main/views/MainHomeViewHolder2.java +++ b/main/src/main/java/com/yunbao/main/views/MainHomeViewHolder2.java @@ -1,5 +1,6 @@ package com.yunbao.main.views; +import android.Manifest; import android.animation.ObjectAnimator; import android.app.Activity; import android.app.Dialog; @@ -7,6 +8,7 @@ import android.content.Context; import android.graphics.Outline; import android.graphics.drawable.Drawable; +import android.os.Build; import android.os.Handler; import android.os.Looper; import android.text.TextUtils; @@ -499,6 +501,8 @@ public class MainHomeViewHolder2 extends AbsMainHomeChildViewHolder implements O } + + @Override public CommonRefreshView.DataHelper getDataHelper() { return new CommonRefreshView.DataHelper() { @@ -549,7 +553,7 @@ public class MainHomeViewHolder2 extends AbsMainHomeChildViewHolder implements O if (info.length > 0) { JSONObject obj = JSON.parseObject(info[0]); - mBannerList = JSON.parseArray(obj.getString("slide"), BannerBean.class); + mBannerList = JSON.parseArray(obj.getString("slide_pic"), BannerBean.class); if (!obj.containsKey("list")) { return new_data; } diff --git a/main/src/main/res/layout/view_main_home2.xml b/main/src/main/res/layout/view_main_home2.xml index 44952e684..c9b5d5b2c 100644 --- a/main/src/main/res/layout/view_main_home2.xml +++ b/main/src/main/res/layout/view_main_home2.xml @@ -63,13 +63,19 @@