侧边栏修改,直播关播页面BUg修改
This commit is contained in:
parent
38f6f2f451
commit
1d50f8e4f5
@ -100,6 +100,7 @@ public class RouteUtil {
|
|||||||
}
|
}
|
||||||
Constants.myUrl = url + "&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&t=" + System.currentTimeMillis();
|
Constants.myUrl = url + "&uid=" + CommonAppConfig.getInstance().getUid() + "&token=" + CommonAppConfig.getInstance().getToken() + "&t=" + System.currentTimeMillis();
|
||||||
ARouter.getInstance().build(PATH_MYWEBVIEWACTIVTITY)
|
ARouter.getInstance().build(PATH_MYWEBVIEWACTIVTITY)
|
||||||
|
.withString(Constants.URL,url)
|
||||||
.navigation();
|
.navigation();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -118,7 +119,8 @@ public class RouteUtil {
|
|||||||
*/
|
*/
|
||||||
public static void forwardZhuangBanActivity(String url, boolean isFull) {
|
public static void forwardZhuangBanActivity(String url, boolean isFull) {
|
||||||
ARouter.getInstance().build(PATH_ZHUANGBANACTIVITY)
|
ARouter.getInstance().build(PATH_ZHUANGBANACTIVITY)
|
||||||
.withString("title", "")
|
.withString("url", url)
|
||||||
|
.withBoolean("isFull", isFull)
|
||||||
.navigation();
|
.navigation();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@ public class DrawerRecommendChildViewHolder extends RecyclerView.ViewHolder {
|
|||||||
IMLoginModel userInfo = IMLoginManager.get(itemView.getContext()).getUserInfo();
|
IMLoginModel userInfo = IMLoginManager.get(itemView.getContext()).getUserInfo();
|
||||||
StringBuffer htmlUrl = new StringBuffer();
|
StringBuffer htmlUrl = new StringBuffer();
|
||||||
if (model.getSrc().contains("?")) {
|
if (model.getSrc().contains("?")) {
|
||||||
htmlUrl.append(model.getSrc())
|
htmlUrl.append(CommonAppConfig.HOST).append("/").append(model.getSrc())
|
||||||
.append("&uid=")
|
.append("&uid=")
|
||||||
.append(userInfo.getId())
|
.append(userInfo.getId())
|
||||||
.append("&token=")
|
.append("&token=")
|
||||||
|
@ -52,7 +52,7 @@ public class DrawerRecommendViewHolder extends RecyclerView.ViewHolder {
|
|||||||
if (TextUtils.equals(model.getSrc(), "recharge")) {
|
if (TextUtils.equals(model.getSrc(), "recharge")) {
|
||||||
htmlUrl.append("recharge");
|
htmlUrl.append("recharge");
|
||||||
} else if (model.getSrc().contains("?")) {
|
} else if (model.getSrc().contains("?")) {
|
||||||
htmlUrl.append(model.getSrc())
|
htmlUrl.append(CommonAppConfig.HOST).append("/").append(model.getSrc())
|
||||||
.append("&uid=")
|
.append("&uid=")
|
||||||
.append(userInfo.getId())
|
.append(userInfo.getId())
|
||||||
.append("&token=")
|
.append("&token=")
|
||||||
|
@ -38,7 +38,25 @@ public class DrawerTaskChildViewHolder extends RecyclerView.ViewHolder {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void setData(CustomSidebarChildModel model, int index) {
|
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();
|
StringBuffer titleBuffer = new StringBuffer();
|
||||||
titleBuffer
|
titleBuffer
|
||||||
.append(model.getTitle())
|
.append(model.getTitle())
|
||||||
@ -70,7 +88,6 @@ public class DrawerTaskChildViewHolder extends RecyclerView.ViewHolder {
|
|||||||
public void onViewClicks() {
|
public void onViewClicks() {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if (TextUtils.equals(model.getStatus(), "2")) {
|
if (TextUtils.equals(model.getStatus(), "2")) {
|
||||||
LiveNetManager.get(itemView.getContext())
|
LiveNetManager.get(itemView.getContext())
|
||||||
.sendTaskGift(model.getFlag(), new HttpCallback<String>() {
|
.sendTaskGift(model.getFlag(), new HttpCallback<String>() {
|
||||||
|
@ -52,7 +52,7 @@ public class DrawerTaskViewHolder extends RecyclerView.ViewHolder {
|
|||||||
IMLoginModel userInfo = IMLoginManager.get(itemView.getContext()).getUserInfo();
|
IMLoginModel userInfo = IMLoginManager.get(itemView.getContext()).getUserInfo();
|
||||||
StringBuffer htmlUrl = new StringBuffer();
|
StringBuffer htmlUrl = new StringBuffer();
|
||||||
if (model.getSrc().contains("?")) {
|
if (model.getSrc().contains("?")) {
|
||||||
htmlUrl.append(model.getSrc())
|
htmlUrl.append(CommonAppConfig.HOST).append("/").append(model.getSrc())
|
||||||
.append("&uid=")
|
.append("&uid=")
|
||||||
.append(userInfo.getId())
|
.append(userInfo.getId())
|
||||||
.append("&token=")
|
.append("&token=")
|
||||||
|
@ -54,7 +54,7 @@ public class FunGamesChildViewHolder extends RecyclerView.ViewHolder {
|
|||||||
IMLoginModel userInfo = IMLoginManager.get(itemView.getContext()).getUserInfo();
|
IMLoginModel userInfo = IMLoginManager.get(itemView.getContext()).getUserInfo();
|
||||||
StringBuffer htmlUrl = new StringBuffer();
|
StringBuffer htmlUrl = new StringBuffer();
|
||||||
if (model.getSrc().contains("?")) {
|
if (model.getSrc().contains("?")) {
|
||||||
htmlUrl.append(model.getSrc())
|
htmlUrl.append(CommonAppConfig.HOST).append("/").append(model.getSrc())
|
||||||
.append("&uid=")
|
.append("&uid=")
|
||||||
.append(userInfo.getId())
|
.append(userInfo.getId())
|
||||||
.append("&token=")
|
.append("&token=")
|
||||||
|
@ -62,7 +62,7 @@ public class FunGamesViewHolder extends RecyclerView.ViewHolder {
|
|||||||
IMLoginModel userInfo = IMLoginManager.get(itemView.getContext()).getUserInfo();
|
IMLoginModel userInfo = IMLoginManager.get(itemView.getContext()).getUserInfo();
|
||||||
StringBuffer htmlUrl = new StringBuffer();
|
StringBuffer htmlUrl = new StringBuffer();
|
||||||
if (model.getSrc().contains("?")) {
|
if (model.getSrc().contains("?")) {
|
||||||
htmlUrl.append(model.getSrc())
|
htmlUrl.append(CommonAppConfig.HOST).append("/").append(model.getSrc())
|
||||||
.append("&uid=")
|
.append("&uid=")
|
||||||
.append(userInfo.getId())
|
.append(userInfo.getId())
|
||||||
.append("&token=")
|
.append("&token=")
|
||||||
|
BIN
common/src/main/res/mipmap-xxhdpi/icon_012x.png
Normal file
BIN
common/src/main/res/mipmap-xxhdpi/icon_012x.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.5 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/icon_022x.png
Normal file
BIN
common/src/main/res/mipmap-xxhdpi/icon_022x.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/icon_032x.png
Normal file
BIN
common/src/main/res/mipmap-xxhdpi/icon_032x.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/icon_042x.png
Normal file
BIN
common/src/main/res/mipmap-xxhdpi/icon_042x.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
BIN
common/src/main/res/mipmap-xxhdpi/icon_052x.png
Normal file
BIN
common/src/main/res/mipmap-xxhdpi/icon_052x.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
@ -10,9 +10,9 @@ ext {
|
|||||||
manifestPlaceholders = [
|
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",
|
txMapAppKey : "EOZBZ-ASLCU-4XPV3-BDCHZ-4E3Q7-H4BWB",
|
||||||
|
@ -640,6 +640,9 @@ public class LiveAudienceActivity extends LiveActivity {
|
|||||||
public void onLiveRoomChangeEvent(LiveRoomChangeEvent e) {
|
public void onLiveRoomChangeEvent(LiveRoomChangeEvent e) {
|
||||||
if (verticalViewPager.ismEnableScroll()) {
|
if (verticalViewPager.ismEnableScroll()) {
|
||||||
LiveBean liveBean = e.getLiveBean();
|
LiveBean liveBean = e.getLiveBean();
|
||||||
|
if (e.isLiveEnd()) {
|
||||||
|
manager.removeLiveEnd();
|
||||||
|
}
|
||||||
if (liveBean != null) {
|
if (liveBean != null) {
|
||||||
LiveHttpUtil.cancel(LiveHttpConsts.CHECK_LIVE);
|
LiveHttpUtil.cancel(LiveHttpConsts.CHECK_LIVE);
|
||||||
LiveHttpUtil.cancel(LiveHttpConsts.ENTER_ROOM);
|
LiveHttpUtil.cancel(LiveHttpConsts.ENTER_ROOM);
|
||||||
|
@ -31,6 +31,7 @@ import com.yunbao.common.activity.AbsActivity;
|
|||||||
import com.yunbao.common.bean.LiveBean;
|
import com.yunbao.common.bean.LiveBean;
|
||||||
import com.yunbao.common.event.JavascriptInterfaceEvent;
|
import com.yunbao.common.event.JavascriptInterfaceEvent;
|
||||||
import com.yunbao.common.http.HttpCallback;
|
import com.yunbao.common.http.HttpCallback;
|
||||||
|
import com.yunbao.common.utils.Bus;
|
||||||
import com.yunbao.common.utils.DpUtil;
|
import com.yunbao.common.utils.DpUtil;
|
||||||
import com.yunbao.common.utils.JavascriptInterfaceUtils;
|
import com.yunbao.common.utils.JavascriptInterfaceUtils;
|
||||||
import com.yunbao.common.utils.L;
|
import com.yunbao.common.utils.L;
|
||||||
@ -66,6 +67,7 @@ public class WebViewActivityMedal extends AbsActivity {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void main() {
|
protected void main() {
|
||||||
|
Bus.getOn(this);
|
||||||
String url = getIntent().getStringExtra(Constants.URL);
|
String url = getIntent().getStringExtra(Constants.URL);
|
||||||
L.e("H5---3>" + url);
|
L.e("H5---3>" + url);
|
||||||
LinearLayout rootView = (LinearLayout) findViewById(R.id.rootView);
|
LinearLayout rootView = (LinearLayout) findViewById(R.id.rootView);
|
||||||
@ -300,6 +302,7 @@ public class WebViewActivityMedal extends AbsActivity {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onDestroy() {
|
protected void onDestroy() {
|
||||||
|
Bus.getOff(this);
|
||||||
if (mWebView != null) {
|
if (mWebView != null) {
|
||||||
ViewGroup parent = (ViewGroup) mWebView.getParent();
|
ViewGroup parent = (ViewGroup) mWebView.getParent();
|
||||||
if (parent != null) {
|
if (parent != null) {
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package com.yunbao.live.dialog;
|
package com.yunbao.live.dialog;
|
||||||
|
|
||||||
|
import android.content.Context;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.text.SpannableStringBuilder;
|
import android.text.SpannableStringBuilder;
|
||||||
@ -52,16 +53,16 @@ public class VoiceDialog extends AbsDialogFragment {
|
|||||||
@Override
|
@Override
|
||||||
public void onStop() {
|
public void onStop() {
|
||||||
super.onStop();
|
super.onStop();
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public String sendMessage() {
|
||||||
if (mIat != null) {
|
if (mIat != null) {
|
||||||
mIat.cancel();
|
mIat.cancel();
|
||||||
mIat.destroy();
|
mIat.destroy();
|
||||||
mIat = null;
|
mIat = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public String sendMessage() {
|
|
||||||
|
|
||||||
return WordsTypeUtil.changeTraditional(builder.toString());
|
return WordsTypeUtil.changeTraditional(builder.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -88,12 +89,6 @@ public class VoiceDialog extends AbsDialogFragment {
|
|||||||
params.height = WindowManager.LayoutParams.WRAP_CONTENT;
|
params.height = WindowManager.LayoutParams.WRAP_CONTENT;
|
||||||
params.gravity = Gravity.CENTER;
|
params.gravity = Gravity.CENTER;
|
||||||
window.setAttributes(params);
|
window.setAttributes(params);
|
||||||
handler.postDelayed(new Runnable() {
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
|
|
||||||
}
|
|
||||||
}, 30000);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -111,7 +106,6 @@ public class VoiceDialog extends AbsDialogFragment {
|
|||||||
voiceChat = (TextView) findViewById(R.id.voice_chat);
|
voiceChat = (TextView) findViewById(R.id.voice_chat);
|
||||||
fingersSlide = (TextView) findViewById(R.id.fingers_slide);
|
fingersSlide = (TextView) findViewById(R.id.fingers_slide);
|
||||||
gifView = (GifImageView) findViewById(R.id.gif_view);
|
gifView = (GifImageView) findViewById(R.id.gif_view);
|
||||||
startRecognize();
|
|
||||||
iconWithdraw.setVisibility(View.GONE);
|
iconWithdraw.setVisibility(View.GONE);
|
||||||
gifView.setVisibility(View.GONE);
|
gifView.setVisibility(View.GONE);
|
||||||
voiceFluctuations.setVisibility(View.VISIBLE);
|
voiceFluctuations.setVisibility(View.VISIBLE);
|
||||||
@ -131,6 +125,7 @@ public class VoiceDialog extends AbsDialogFragment {
|
|||||||
* 上划取消
|
* 上划取消
|
||||||
*/
|
*/
|
||||||
public void withdraw() {
|
public void withdraw() {
|
||||||
|
if (mIat != null) {
|
||||||
mIat.stopListening();
|
mIat.stopListening();
|
||||||
if (!isDetached()) {
|
if (!isDetached()) {
|
||||||
voiceFluctuations.setVisibility(View.GONE);
|
voiceFluctuations.setVisibility(View.GONE);
|
||||||
@ -141,11 +136,13 @@ public class VoiceDialog extends AbsDialogFragment {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 上划取消
|
* 上划取消
|
||||||
*/
|
*/
|
||||||
public void notWithdraw() {
|
public void notWithdraw(Context context) {
|
||||||
startRecognize();
|
startRecognize(context);
|
||||||
if (!isDetached()) {
|
if (!isDetached()) {
|
||||||
if (TextUtils.isEmpty(sendMessage())) {
|
if (TextUtils.isEmpty(sendMessage())) {
|
||||||
if (gifView.getVisibility() != View.VISIBLE)
|
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) {
|
if (null == mIat) {
|
||||||
mIat = SpeechRecognizer.createRecognizer(getContext(), mInitListener);
|
mIat = SpeechRecognizer.createRecognizer(context, mInitListener);
|
||||||
}
|
}
|
||||||
if (mIat.isListening()) {
|
if (mIat.isListening()) {
|
||||||
return;
|
return;
|
||||||
|
@ -11,6 +11,16 @@ public class LiveRoomChangeEvent {
|
|||||||
private LiveBean mLiveBean;
|
private LiveBean mLiveBean;
|
||||||
private int mLiveType;//直播间的类型 普通 密码 门票 计时等
|
private int mLiveType;//直播间的类型 普通 密码 门票 计时等
|
||||||
private int mLiveTypeVal;//收费价格,计时收费每次扣费的值
|
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) {
|
public LiveRoomChangeEvent(LiveBean bean, int liveType, int liveTypeVal) {
|
||||||
mLiveBean = bean;
|
mLiveBean = bean;
|
||||||
|
@ -311,6 +311,10 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder {
|
|||||||
if (mProcessResultUtil.checkPermissions(new String[]{Manifest.permission.RECORD_AUDIO})) {
|
if (mProcessResultUtil.checkPermissions(new String[]{Manifest.permission.RECORD_AUDIO})) {
|
||||||
//按下
|
//按下
|
||||||
handler.postDelayed(mLongPressed, 500);
|
handler.postDelayed(mLongPressed, 500);
|
||||||
|
if (voiceDialog == null) {
|
||||||
|
voiceDialog = new VoiceDialog();
|
||||||
|
voiceDialog.startRecognize(mContext);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
mProcessResultUtil.requestPermissions(new String[]{Manifest.permission.RECORD_AUDIO}, new Runnable() {
|
mProcessResultUtil.requestPermissions(new String[]{Manifest.permission.RECORD_AUDIO}, new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
@ -328,7 +332,7 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder {
|
|||||||
}
|
}
|
||||||
if ((downY - moveY < 100) && (downY - moveY > 30)) {
|
if ((downY - moveY < 100) && (downY - moveY > 30)) {
|
||||||
if (voiceDialog != null && voiceDialog.isAdded())
|
if (voiceDialog != null && voiceDialog.isAdded())
|
||||||
voiceDialog.notWithdraw();
|
voiceDialog.notWithdraw(mContext);
|
||||||
}
|
}
|
||||||
} else if (event.getAction() == MotionEvent.ACTION_UP) {
|
} else if (event.getAction() == MotionEvent.ACTION_UP) {
|
||||||
//松开
|
//松开
|
||||||
@ -360,8 +364,7 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder {
|
|||||||
|
|
||||||
Vibrator vibrator = (Vibrator) mContext.getSystemService(Context.VIBRATOR_SERVICE);
|
Vibrator vibrator = (Vibrator) mContext.getSystemService(Context.VIBRATOR_SERVICE);
|
||||||
vibrator.vibrate(100);//震动时间(ms)
|
vibrator.vibrate(100);//震动时间(ms)
|
||||||
if (voiceDialog == null) {
|
|
||||||
voiceDialog = new VoiceDialog();
|
|
||||||
voiceDialog.setListener(new VoiceDialog.VoiceListener() {
|
voiceDialog.setListener(new VoiceDialog.VoiceListener() {
|
||||||
@Override
|
@Override
|
||||||
public void timeout() {
|
public void timeout() {
|
||||||
@ -381,7 +384,6 @@ public class LiveAudienceViewHolder extends AbsLiveViewHolder {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
|
||||||
voiceDialog.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "VoiceDialog");
|
voiceDialog.show(((LiveAudienceActivity) mContext).getSupportFragmentManager(), "VoiceDialog");
|
||||||
Bus.get().post(new LiveAudienceEvent()
|
Bus.get().post(new LiveAudienceEvent()
|
||||||
.setVoicePress(true)
|
.setVoicePress(true)
|
||||||
|
@ -17,6 +17,7 @@ import androidx.recyclerview.widget.RecyclerView;
|
|||||||
import com.alibaba.fastjson.JSON;
|
import com.alibaba.fastjson.JSON;
|
||||||
import com.yunbao.common.bean.AnchorRecommendModel;
|
import com.yunbao.common.bean.AnchorRecommendModel;
|
||||||
import com.yunbao.common.bean.IMLoginModel;
|
import com.yunbao.common.bean.IMLoginModel;
|
||||||
|
import com.yunbao.common.bean.LiveBean;
|
||||||
import com.yunbao.common.bean.SetAttentsModel;
|
import com.yunbao.common.bean.SetAttentsModel;
|
||||||
import com.yunbao.common.event.CloseEvent;
|
import com.yunbao.common.event.CloseEvent;
|
||||||
import com.yunbao.common.glide.ImgLoader;
|
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.LiveAudienceActivity;
|
||||||
import com.yunbao.live.activity.LiveRyAnchorActivity;
|
import com.yunbao.live.activity.LiveRyAnchorActivity;
|
||||||
import com.yunbao.live.adapter.SearchRecommendBodyAdapter;
|
import com.yunbao.live.adapter.SearchRecommendBodyAdapter;
|
||||||
import com.yunbao.common.bean.LiveBean;
|
|
||||||
import com.yunbao.live.event.JumpUserHomeEvent;
|
import com.yunbao.live.event.JumpUserHomeEvent;
|
||||||
|
import com.yunbao.live.event.LiveRoomChangeEvent;
|
||||||
import com.yunbao.live.http.LiveHttpConsts;
|
import com.yunbao.live.http.LiveHttpConsts;
|
||||||
import com.yunbao.live.http.LiveHttpUtil;
|
import com.yunbao.live.http.LiveHttpUtil;
|
||||||
import com.yunbao.live.presenter.LiveRoomCheckLivePresenter;
|
import com.yunbao.live.presenter.LiveRoomCheckLivePresenter;
|
||||||
|
|
||||||
|
import org.greenrobot.eventbus.EventBus;
|
||||||
import org.greenrobot.eventbus.Subscribe;
|
import org.greenrobot.eventbus.Subscribe;
|
||||||
import org.greenrobot.eventbus.ThreadMode;
|
import org.greenrobot.eventbus.ThreadMode;
|
||||||
|
|
||||||
@ -317,15 +319,7 @@ public class LiveEndViewHolder extends AbsViewHolder implements View.OnClickList
|
|||||||
if (liveBean == null) {
|
if (liveBean == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
LiveAudienceActivity.forward(mContext, liveBean, liveType, liveTypeVal, "", 0, liveSdk);
|
EventBus.getDefault().post(new LiveRoomChangeEvent(liveBean, liveType, liveTypeVal).setLiveEnd(true));
|
||||||
if (mContext instanceof LiveAnchorActivity) {
|
|
||||||
((LiveAnchorActivity) mContext).superBackPressed();
|
|
||||||
} else if (mContext instanceof LiveAudienceActivity) {
|
|
||||||
((LiveAudienceActivity) mContext).exitLiveRoom();
|
|
||||||
} else if (mContext instanceof LiveRyAnchorActivity) {
|
|
||||||
((LiveRyAnchorActivity) mContext).superBackPressed();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -11,7 +11,6 @@ import android.content.Intent;
|
|||||||
import android.content.res.Configuration;
|
import android.content.res.Configuration;
|
||||||
import android.os.CountDownTimer;
|
import android.os.CountDownTimer;
|
||||||
import android.os.Handler;
|
import android.os.Handler;
|
||||||
import android.os.Looper;
|
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
@ -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
|
@Override
|
||||||
public void onRemove(boolean isQuit) {
|
public void onRemove(boolean isQuit) {
|
||||||
LiveHttpUtil.cancel(LiveHttpConsts.CHECK_LIVE);
|
LiveHttpUtil.cancel(LiveHttpConsts.CHECK_LIVE);
|
||||||
@ -379,10 +408,10 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
|
|||||||
mLiveEndViewHolder.removeFromParent();
|
mLiveEndViewHolder.removeFromParent();
|
||||||
mLiveEndViewHolder.release();
|
mLiveEndViewHolder.release();
|
||||||
}
|
}
|
||||||
|
mLiveEndViewHolder = null;
|
||||||
mLiveAudienceViewHolder = null;
|
mLiveAudienceViewHolder = null;
|
||||||
mLivePlayViewHolder = null;
|
mLivePlayViewHolder = null;
|
||||||
mLiveRoomViewHolder = null;
|
mLiveRoomViewHolder = null;
|
||||||
mLiveEndViewHolder = null;
|
|
||||||
mLiveLinkMicPresenter = null;
|
mLiveLinkMicPresenter = null;
|
||||||
mLiveLinkMicAnchorPresenter = null;
|
mLiveLinkMicAnchorPresenter = null;
|
||||||
mLiveRyLinkMicPkPresenter = null;
|
mLiveRyLinkMicPkPresenter = null;
|
||||||
|
@ -215,7 +215,6 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="2dp"
|
android:layout_marginStart="2dp"
|
||||||
android:layout_marginTop="14dp"
|
android:layout_marginTop="14dp"
|
||||||
android:text=":"
|
|
||||||
android:textColor="#70ffffff"
|
android:textColor="#70ffffff"
|
||||||
android:textSize="13.33sp" />
|
android:textSize="13.33sp" />
|
||||||
|
|
||||||
@ -224,7 +223,7 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginStart="7dp"
|
android:layout_marginStart="7dp"
|
||||||
android:layout_marginTop="17dp"
|
android:layout_marginTop="14dp"
|
||||||
android:textColor="#70ffffff"
|
android:textColor="#70ffffff"
|
||||||
android:textSize="13.33sp" />
|
android:textSize="13.33sp" />
|
||||||
|
|
||||||
@ -400,6 +399,7 @@
|
|||||||
android:id="@+id/live_duration_anchor"
|
android:id="@+id/live_duration_anchor"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginTop="12dp"
|
||||||
android:text="0"
|
android:text="0"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
|
Loading…
Reference in New Issue
Block a user