diff --git a/common/src/main/java/com/yunbao/common/utils/RouteUtil.java b/common/src/main/java/com/yunbao/common/utils/RouteUtil.java index 738227174..9af0bfdd2 100644 --- a/common/src/main/java/com/yunbao/common/utils/RouteUtil.java +++ b/common/src/main/java/com/yunbao/common/utils/RouteUtil.java @@ -100,6 +100,7 @@ public class RouteUtil { } Constants.myUrl = url + "&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&t=" + System.currentTimeMillis(); ARouter.getInstance().build(PATH_MYWEBVIEWACTIVTITY) + .withString(Constants.URL,url) .navigation(); } @@ -118,7 +119,8 @@ public class RouteUtil { */ public static void forwardZhuangBanActivity(String url, boolean isFull) { ARouter.getInstance().build(PATH_ZHUANGBANACTIVITY) - .withString("title", "") + .withString("url", url) + .withBoolean("isFull", isFull) .navigation(); } diff --git a/common/src/main/java/com/yunbao/common/views/DrawerRecommendChildViewHolder.java b/common/src/main/java/com/yunbao/common/views/DrawerRecommendChildViewHolder.java index 165bdcba6..147ec1713 100644 --- a/common/src/main/java/com/yunbao/common/views/DrawerRecommendChildViewHolder.java +++ b/common/src/main/java/com/yunbao/common/views/DrawerRecommendChildViewHolder.java @@ -44,7 +44,7 @@ public class DrawerRecommendChildViewHolder extends RecyclerView.ViewHolder { IMLoginModel userInfo = IMLoginManager.get(itemView.getContext()).getUserInfo(); StringBuffer htmlUrl = new StringBuffer(); if (model.getSrc().contains("?")) { - htmlUrl.append(model.getSrc()) + htmlUrl.append(CommonAppConfig.HOST).append("/").append(model.getSrc()) .append("&uid=") .append(userInfo.getId()) .append("&token=") diff --git a/common/src/main/java/com/yunbao/common/views/DrawerRecommendViewHolder.java b/common/src/main/java/com/yunbao/common/views/DrawerRecommendViewHolder.java index b5aecd681..38d2389e4 100644 --- a/common/src/main/java/com/yunbao/common/views/DrawerRecommendViewHolder.java +++ b/common/src/main/java/com/yunbao/common/views/DrawerRecommendViewHolder.java @@ -52,7 +52,7 @@ public class DrawerRecommendViewHolder extends RecyclerView.ViewHolder { if (TextUtils.equals(model.getSrc(), "recharge")) { htmlUrl.append("recharge"); } else if (model.getSrc().contains("?")) { - htmlUrl.append(model.getSrc()) + htmlUrl.append(CommonAppConfig.HOST).append("/").append(model.getSrc()) .append("&uid=") .append(userInfo.getId()) .append("&token=") diff --git a/common/src/main/java/com/yunbao/common/views/DrawerTaskChildViewHolder.java b/common/src/main/java/com/yunbao/common/views/DrawerTaskChildViewHolder.java index a41e297c2..f8aa7ee0f 100644 --- a/common/src/main/java/com/yunbao/common/views/DrawerTaskChildViewHolder.java +++ b/common/src/main/java/com/yunbao/common/views/DrawerTaskChildViewHolder.java @@ -38,7 +38,25 @@ public class DrawerTaskChildViewHolder extends RecyclerView.ViewHolder { } public void setData(CustomSidebarChildModel model, int index) { - ImgLoader.display2(itemView.getContext(), model.getIcon(), icon); + int iconImg = R.mipmap.icon_012x; + switch (model.getFlag()) { + case "send_coin_gift": + iconImg = R.mipmap.icon_012x; + break; + case "send_gold_gift": + iconImg = R.mipmap.icon_022x; + break; + case "attention": + iconImg = R.mipmap.icon_032x; + break; + case "bullet_screen": + iconImg = R.mipmap.icon_042x; + break; + case "illumine": + iconImg = R.mipmap.icon_052x; + break; + } + ImgLoader.display(itemView.getContext(), iconImg, icon); StringBuffer titleBuffer = new StringBuffer(); titleBuffer .append(model.getTitle()) @@ -70,7 +88,6 @@ public class DrawerTaskChildViewHolder extends RecyclerView.ViewHolder { public void onViewClicks() { - if (TextUtils.equals(model.getStatus(), "2")) { LiveNetManager.get(itemView.getContext()) .sendTaskGift(model.getFlag(), new HttpCallback() { @@ -86,7 +103,7 @@ public class DrawerTaskChildViewHolder extends RecyclerView.ViewHolder { ToastUtil.show(error); } }); - }else { + } else { Bus.get().post(new CustomDrawerPopupEvent() .setDisMiss(true)); } diff --git a/common/src/main/java/com/yunbao/common/views/DrawerTaskViewHolder.java b/common/src/main/java/com/yunbao/common/views/DrawerTaskViewHolder.java index 72218f3e6..d34fe9c1e 100644 --- a/common/src/main/java/com/yunbao/common/views/DrawerTaskViewHolder.java +++ b/common/src/main/java/com/yunbao/common/views/DrawerTaskViewHolder.java @@ -52,7 +52,7 @@ public class DrawerTaskViewHolder extends RecyclerView.ViewHolder { IMLoginModel userInfo = IMLoginManager.get(itemView.getContext()).getUserInfo(); StringBuffer htmlUrl = new StringBuffer(); if (model.getSrc().contains("?")) { - htmlUrl.append(model.getSrc()) + htmlUrl.append(CommonAppConfig.HOST).append("/").append(model.getSrc()) .append("&uid=") .append(userInfo.getId()) .append("&token=") diff --git a/common/src/main/java/com/yunbao/common/views/FunGamesChildViewHolder.java b/common/src/main/java/com/yunbao/common/views/FunGamesChildViewHolder.java index 2848413b3..e7bef052d 100644 --- a/common/src/main/java/com/yunbao/common/views/FunGamesChildViewHolder.java +++ b/common/src/main/java/com/yunbao/common/views/FunGamesChildViewHolder.java @@ -54,7 +54,7 @@ public class FunGamesChildViewHolder extends RecyclerView.ViewHolder { IMLoginModel userInfo = IMLoginManager.get(itemView.getContext()).getUserInfo(); StringBuffer htmlUrl = new StringBuffer(); if (model.getSrc().contains("?")) { - htmlUrl.append(model.getSrc()) + htmlUrl.append(CommonAppConfig.HOST).append("/").append(model.getSrc()) .append("&uid=") .append(userInfo.getId()) .append("&token=") diff --git a/common/src/main/java/com/yunbao/common/views/FunGamesViewHolder.java b/common/src/main/java/com/yunbao/common/views/FunGamesViewHolder.java index 5da9ada68..9534274c4 100644 --- a/common/src/main/java/com/yunbao/common/views/FunGamesViewHolder.java +++ b/common/src/main/java/com/yunbao/common/views/FunGamesViewHolder.java @@ -62,7 +62,7 @@ public class FunGamesViewHolder extends RecyclerView.ViewHolder { IMLoginModel userInfo = IMLoginManager.get(itemView.getContext()).getUserInfo(); StringBuffer htmlUrl = new StringBuffer(); if (model.getSrc().contains("?")) { - htmlUrl.append(model.getSrc()) + htmlUrl.append(CommonAppConfig.HOST).append("/").append(model.getSrc()) .append("&uid=") .append(userInfo.getId()) .append("&token=") diff --git a/common/src/main/res/mipmap-xxhdpi/icon_012x.png b/common/src/main/res/mipmap-xxhdpi/icon_012x.png new file mode 100644 index 000000000..fc2d70872 Binary files /dev/null and b/common/src/main/res/mipmap-xxhdpi/icon_012x.png differ diff --git a/common/src/main/res/mipmap-xxhdpi/icon_022x.png b/common/src/main/res/mipmap-xxhdpi/icon_022x.png new file mode 100644 index 000000000..5289e73fd Binary files /dev/null and b/common/src/main/res/mipmap-xxhdpi/icon_022x.png differ diff --git a/common/src/main/res/mipmap-xxhdpi/icon_032x.png b/common/src/main/res/mipmap-xxhdpi/icon_032x.png new file mode 100644 index 000000000..2d6ab9a33 Binary files /dev/null and b/common/src/main/res/mipmap-xxhdpi/icon_032x.png differ diff --git a/common/src/main/res/mipmap-xxhdpi/icon_042x.png b/common/src/main/res/mipmap-xxhdpi/icon_042x.png new file mode 100644 index 000000000..13c80e682 Binary files /dev/null and b/common/src/main/res/mipmap-xxhdpi/icon_042x.png differ diff --git a/common/src/main/res/mipmap-xxhdpi/icon_052x.png b/common/src/main/res/mipmap-xxhdpi/icon_052x.png new file mode 100644 index 000000000..211307e2f Binary files /dev/null and b/common/src/main/res/mipmap-xxhdpi/icon_052x.png differ diff --git a/config.gradle b/config.gradle index 74c89ff01..8affa5db3 100644 --- a/config.gradle +++ b/config.gradle @@ -10,9 +10,9 @@ ext { manifestPlaceholders = [ //正式 -// serverHost : "https://napi.yaoulive.com", + serverHost : "https://napi.yaoulive.com", //測試 - serverHost : "https://ceshi.yaoulive.com", +// serverHost : "https://ceshi.yaoulive.com", //腾讯地图 txMapAppKey : "EOZBZ-ASLCU-4XPV3-BDCHZ-4E3Q7-H4BWB", diff --git a/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java b/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java index 9cbb3efce..d30ad0c41 100644 --- a/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java +++ b/live/src/main/java/com/yunbao/live/activity/LiveAudienceActivity.java @@ -640,6 +640,9 @@ public class LiveAudienceActivity extends LiveActivity { public void onLiveRoomChangeEvent(LiveRoomChangeEvent e) { if (verticalViewPager.ismEnableScroll()) { LiveBean liveBean = e.getLiveBean(); + if (e.isLiveEnd()) { + manager.removeLiveEnd(); + } if (liveBean != null) { LiveHttpUtil.cancel(LiveHttpConsts.CHECK_LIVE); LiveHttpUtil.cancel(LiveHttpConsts.ENTER_ROOM); @@ -756,7 +759,7 @@ public class LiveAudienceActivity extends LiveActivity { public void showerHtml(String htmlUrl, boolean screen) { if (TextUtils.equals(htmlUrl, "recharge")) { RouteUtil.forwardMyCoin(mContext); - }else { + } else { if (!screen) { ZhuangBanActivity.forward(mContext, htmlUrl, false); } else { diff --git a/live/src/main/java/com/yunbao/live/activity/WebViewActivityMedal.java b/live/src/main/java/com/yunbao/live/activity/WebViewActivityMedal.java index 802dc0332..e92136c1e 100644 --- a/live/src/main/java/com/yunbao/live/activity/WebViewActivityMedal.java +++ b/live/src/main/java/com/yunbao/live/activity/WebViewActivityMedal.java @@ -31,6 +31,7 @@ import com.yunbao.common.activity.AbsActivity; import com.yunbao.common.bean.LiveBean; import com.yunbao.common.event.JavascriptInterfaceEvent; import com.yunbao.common.http.HttpCallback; +import com.yunbao.common.utils.Bus; import com.yunbao.common.utils.DpUtil; import com.yunbao.common.utils.JavascriptInterfaceUtils; import com.yunbao.common.utils.L; @@ -66,6 +67,7 @@ public class WebViewActivityMedal extends AbsActivity { @Override protected void main() { + Bus.getOn(this); String url = getIntent().getStringExtra(Constants.URL); L.e("H5---3>" + url); LinearLayout rootView = (LinearLayout) findViewById(R.id.rootView); @@ -300,6 +302,7 @@ public class WebViewActivityMedal extends AbsActivity { @Override protected void onDestroy() { + Bus.getOff(this); if (mWebView != null) { ViewGroup parent = (ViewGroup) mWebView.getParent(); if (parent != null) { diff --git a/live/src/main/java/com/yunbao/live/dialog/VoiceDialog.java b/live/src/main/java/com/yunbao/live/dialog/VoiceDialog.java index db1611661..5c934814c 100644 --- a/live/src/main/java/com/yunbao/live/dialog/VoiceDialog.java +++ b/live/src/main/java/com/yunbao/live/dialog/VoiceDialog.java @@ -1,5 +1,6 @@ package com.yunbao.live.dialog; +import android.content.Context; import android.os.Bundle; import android.os.Handler; import android.text.SpannableStringBuilder; @@ -52,16 +53,16 @@ public class VoiceDialog extends AbsDialogFragment { @Override public void onStop() { super.onStop(); + + + } + + public String sendMessage() { if (mIat != null) { mIat.cancel(); mIat.destroy(); mIat = null; } - - } - - public String sendMessage() { - return WordsTypeUtil.changeTraditional(builder.toString()); } @@ -88,12 +89,6 @@ public class VoiceDialog extends AbsDialogFragment { params.height = WindowManager.LayoutParams.WRAP_CONTENT; params.gravity = Gravity.CENTER; window.setAttributes(params); - handler.postDelayed(new Runnable() { - @Override - public void run() { - - } - }, 30000); } @Override @@ -111,7 +106,6 @@ public class VoiceDialog extends AbsDialogFragment { voiceChat = (TextView) findViewById(R.id.voice_chat); fingersSlide = (TextView) findViewById(R.id.fingers_slide); gifView = (GifImageView) findViewById(R.id.gif_view); - startRecognize(); iconWithdraw.setVisibility(View.GONE); gifView.setVisibility(View.GONE); voiceFluctuations.setVisibility(View.VISIBLE); @@ -131,21 +125,24 @@ public class VoiceDialog extends AbsDialogFragment { * 上划取消 */ public void withdraw() { - mIat.stopListening(); - if (!isDetached()) { - voiceFluctuations.setVisibility(View.GONE); - gifView.setVisibility(View.GONE); - iconWithdraw.setVisibility(View.VISIBLE); - fingersSlide.setText(getString(R.string.release_cancel_send)); - isSend = false; + if (mIat != null) { + mIat.stopListening(); + if (!isDetached()) { + voiceFluctuations.setVisibility(View.GONE); + gifView.setVisibility(View.GONE); + iconWithdraw.setVisibility(View.VISIBLE); + fingersSlide.setText(getString(R.string.release_cancel_send)); + isSend = false; + } } + } /** * 上划取消 */ - public void notWithdraw() { - startRecognize(); + public void notWithdraw(Context context) { + startRecognize(context); if (!isDetached()) { if (TextUtils.isEmpty(sendMessage())) { if (gifView.getVisibility() != View.VISIBLE) @@ -227,9 +224,9 @@ public class VoiceDialog extends AbsDialogFragment { /** * 开始识别 */ - public void startRecognize() { + public void startRecognize(Context context) { if (null == mIat) { - mIat = SpeechRecognizer.createRecognizer(getContext(), mInitListener); + mIat = SpeechRecognizer.createRecognizer(context, mInitListener); } if (mIat.isListening()) { return; diff --git a/live/src/main/java/com/yunbao/live/event/LiveRoomChangeEvent.java b/live/src/main/java/com/yunbao/live/event/LiveRoomChangeEvent.java index 987045cba..fcdc291ac 100644 --- a/live/src/main/java/com/yunbao/live/event/LiveRoomChangeEvent.java +++ b/live/src/main/java/com/yunbao/live/event/LiveRoomChangeEvent.java @@ -11,6 +11,16 @@ public class LiveRoomChangeEvent { private LiveBean mLiveBean; private int mLiveType;//直播间的类型 普通 密码 门票 计时等 private int mLiveTypeVal;//收费价格,计时收费每次扣费的值 + private boolean isLiveEnd = false; + + public boolean isLiveEnd() { + return isLiveEnd; + } + + public LiveRoomChangeEvent setLiveEnd(boolean liveEnd) { + isLiveEnd = liveEnd; + return this; + } public LiveRoomChangeEvent(LiveBean bean, int liveType, int liveTypeVal) { mLiveBean = bean; diff --git a/live/src/main/java/com/yunbao/live/views/LiveAudienceViewHolder.java b/live/src/main/java/com/yunbao/live/views/LiveAudienceViewHolder.java index 60e3303fc..f8e36d404 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveAudienceViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveAudienceViewHolder.java @@ -311,6 +311,10 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder { if (mProcessResultUtil.checkPermissions(new String[]{Manifest.permission.RECORD_AUDIO})) { //按下 handler.postDelayed(mLongPressed, 500); + if (voiceDialog == null) { + voiceDialog = new VoiceDialog(); + voiceDialog.startRecognize(mContext); + } } else { mProcessResultUtil.requestPermissions(new String[]{Manifest.permission.RECORD_AUDIO}, new Runnable() { @Override @@ -328,7 +332,7 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder { } if ((downY - moveY < 100) && (downY - moveY > 30)) { if (voiceDialog != null && voiceDialog.isAdded()) - voiceDialog.notWithdraw(); + voiceDialog.notWithdraw(mContext); } } else if (event.getAction() == MotionEvent.ACTION_UP) { //松开 @@ -360,28 +364,26 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder { Vibrator vibrator = (Vibrator) mContext.getSystemService(Context.VIBRATOR_SERVICE); vibrator.vibrate(100);//震动时间(ms) - if (voiceDialog == null) { - voiceDialog = new VoiceDialog(); - voiceDialog.setListener(new VoiceDialog.VoiceListener() { - @Override - public void timeout() { - //松开 - handler.removeCallbacks(mLongPressed); - Bus.get().post(new LiveAudienceEvent() - .setVoicePress(false) - .setType(LiveAudienceEvent.LiveAudienceType.VOICE_PRESS)); - if (voiceDialog != null) { - if (voiceDialog.isSend() && !TextUtils.isEmpty(voiceDialog.sendMessage())) { - ((LiveActivity) mContext).sendChatMessage(voiceDialog.sendMessage(), null, null); - } + voiceDialog.setListener(new VoiceDialog.VoiceListener() { + @Override + public void timeout() { + //松开 + handler.removeCallbacks(mLongPressed); + Bus.get().post(new LiveAudienceEvent() + .setVoicePress(false) + .setType(LiveAudienceEvent.LiveAudienceType.VOICE_PRESS)); - voiceDialog.dismiss(); - voiceDialog = null; + if (voiceDialog != null) { + if (voiceDialog.isSend() && !TextUtils.isEmpty(voiceDialog.sendMessage())) { + ((LiveActivity) mContext).sendChatMessage(voiceDialog.sendMessage(), null, null); } + + voiceDialog.dismiss(); + voiceDialog = null; } - }); - } + } + }); voiceDialog.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "VoiceDialog"); Bus.get().post(new LiveAudienceEvent() .setVoicePress(true) @@ -409,7 +411,7 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder { handler.postDelayed(runnable = new Runnable() { @Override public void run() { - if(!liveUid.equals(mLiveUid)){ + if (!liveUid.equals(mLiveUid)) { return; } if (isattention == 0) { @@ -421,7 +423,7 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder { LiveChatBean lvBean2 = new LiveChatBean(); lvBean2.setType(-2); LiveRoomViewHolder.insertChat(lvBean2, 1); - Log.i("chatMgs", liveUid+"|"+mLiveUid); + Log.i("chatMgs", liveUid + "|" + mLiveUid); } }, 10000);//3秒后执行Runnable中的run方法 } 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 8bf0729b3..0ee9fb147 100644 --- a/live/src/main/java/com/yunbao/live/views/LiveEndViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LiveEndViewHolder.java @@ -17,6 +17,7 @@ import androidx.recyclerview.widget.RecyclerView; import com.alibaba.fastjson.JSON; import com.yunbao.common.bean.AnchorRecommendModel; import com.yunbao.common.bean.IMLoginModel; +import com.yunbao.common.bean.LiveBean; import com.yunbao.common.bean.SetAttentsModel; import com.yunbao.common.event.CloseEvent; import com.yunbao.common.glide.ImgLoader; @@ -34,12 +35,13 @@ import com.yunbao.live.activity.LiveAnchorActivity; import com.yunbao.live.activity.LiveAudienceActivity; import com.yunbao.live.activity.LiveRyAnchorActivity; import com.yunbao.live.adapter.SearchRecommendBodyAdapter; -import com.yunbao.common.bean.LiveBean; import com.yunbao.live.event.JumpUserHomeEvent; +import com.yunbao.live.event.LiveRoomChangeEvent; import com.yunbao.live.http.LiveHttpConsts; import com.yunbao.live.http.LiveHttpUtil; import com.yunbao.live.presenter.LiveRoomCheckLivePresenter; +import org.greenrobot.eventbus.EventBus; import org.greenrobot.eventbus.Subscribe; import org.greenrobot.eventbus.ThreadMode; @@ -317,15 +319,7 @@ public class LiveEndViewHolder extends AbsViewHolder implements View.OnClickList if (liveBean == null) { return; } - LiveAudienceActivity.forward(mContext, liveBean, liveType, liveTypeVal, "", 0, liveSdk); - if (mContext instanceof LiveAnchorActivity) { - ((LiveAnchorActivity) mContext).superBackPressed(); - } else if (mContext instanceof LiveAudienceActivity) { - ((LiveAudienceActivity) mContext).exitLiveRoom(); - } else if (mContext instanceof LiveRyAnchorActivity) { - ((LiveRyAnchorActivity) mContext).superBackPressed(); - - } + EventBus.getDefault().post(new LiveRoomChangeEvent(liveBean, liveType, liveTypeVal).setLiveEnd(true)); } }); 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 ccd5fb86e..50b4e3759 100644 --- a/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java +++ b/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java @@ -11,7 +11,6 @@ import android.content.Intent; import android.content.res.Configuration; import android.os.CountDownTimer; import android.os.Handler; -import android.os.Looper; import android.text.TextUtils; import android.util.Log; import android.view.LayoutInflater; @@ -258,7 +257,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe mLiveAudienceViewHolder.addToParent(); mLiveRoomViewHolder.addToParent(); mLiveAudienceViewHolder.subscribeActivityLifeCycle(); - }else{ + } else { mLivePlayViewHolder.setLiveBeanLandscape(mLiveBean.getLandscape()); mLiveLinkMicPresenter.setLiveSdk(mLiveSDK); mLiveLinkMicAnchorPresenter.setLiveSdk(mLiveSDK); @@ -321,6 +320,36 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe } + public void removeLiveEnd() { + if (mLiveAudienceViewHolder != null) { + mLiveAudienceViewHolder.removeFromParent(); + mLiveAudienceViewHolder.removeCallbacks(); + mLiveAudienceViewHolder.release(); + } + //结束播放 + if (mLivePlayViewHolder != null) { + mLivePlayViewHolder.removeFromParent(); + mLivePlayViewHolder.stopPlay(); + mLivePlayViewHolder.release(); + } + if (mLiveRoomViewHolder != null) { + mLiveRoomViewHolder.removeFromParent(); + mLiveRoomViewHolder.clearData(); + mLiveRoomViewHolder.countDownTimerTrickery = null; + } + if (mLiveEndViewHolder != null) { + mLiveEndViewHolder.removeFromParent(); + mLiveEndViewHolder.release(); + } + mLiveEndViewHolder = null; + mLiveAudienceViewHolder = null; + mLivePlayViewHolder = null; + mLiveRoomViewHolder = null; + mLiveLinkMicPresenter = null; + mLiveLinkMicAnchorPresenter = null; + mLiveRyLinkMicPkPresenter = null; + } + @Override public void onRemove(boolean isQuit) { LiveHttpUtil.cancel(LiveHttpConsts.CHECK_LIVE); @@ -379,13 +408,13 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe mLiveEndViewHolder.removeFromParent(); mLiveEndViewHolder.release(); } + mLiveEndViewHolder = null; mLiveAudienceViewHolder = null; mLivePlayViewHolder = null; mLiveRoomViewHolder = null; - mLiveEndViewHolder = null; - mLiveLinkMicPresenter=null; - mLiveLinkMicAnchorPresenter=null; - mLiveRyLinkMicPkPresenter=null; + mLiveLinkMicPresenter = null; + mLiveLinkMicAnchorPresenter = null; + mLiveRyLinkMicPkPresenter = null; if (PermissionUtils.checkPermission(mContext) && !kick) { LiveFloatView.getInstance() .cacheLiveData(mLiveBean, mLiveType, mLiveSDK, mLiveTypeVal) @@ -929,7 +958,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe } @Override - public void onLinkMicPkStart(String pkUid, String pkhead, String pkname,String isLadders) { + public void onLinkMicPkStart(String pkUid, String pkhead, String pkname, String isLadders) { if (mLiveRyLinkMicPkPresenter != null && mLiveRoomViewHolder != null) { mLiveRyLinkMicPkPresenter.onLinkMicPkStart(pkUid, 1); Handler handler = new Handler(); diff --git a/live/src/main/res/layout/view_live_end.xml b/live/src/main/res/layout/view_live_end.xml index 5e5a188ab..aaf9be7c0 100644 --- a/live/src/main/res/layout/view_live_end.xml +++ b/live/src/main/res/layout/view_live_end.xml @@ -215,7 +215,6 @@ android:layout_height="wrap_content" android:layout_marginStart="2dp" android:layout_marginTop="14dp" - android:text=":" android:textColor="#70ffffff" android:textSize="13.33sp" /> @@ -224,7 +223,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginStart="7dp" - android:layout_marginTop="17dp" + android:layout_marginTop="14dp" android:textColor="#70ffffff" android:textSize="13.33sp" /> @@ -400,6 +399,7 @@ android:id="@+id/live_duration_anchor" android:layout_width="wrap_content" android:layout_height="wrap_content" + android:layout_marginTop="12dp" android:text="0" android:textColor="@color/white" android:textSize="16sp"