直播间的滚动

This commit is contained in:
18401019693 2022-08-20 15:33:41 +08:00
parent 3ae14ed506
commit 18d62e5d56
32 changed files with 4663 additions and 1015 deletions

View File

@ -0,0 +1,31 @@
package com.yunbao.common.views.weight;
import android.content.Context;
import android.util.AttributeSet;
import androidx.drawerlayout.widget.DrawerLayout;
//解决直播间冲突
public class MyDrawerLayout extends DrawerLayout {
public MyDrawerLayout(Context context) {
super(context);
}
public MyDrawerLayout(Context context, AttributeSet attrs) {
super(context, attrs);
}
public MyDrawerLayout(Context context, AttributeSet attrs, int defStyle) {
super(context, attrs, defStyle);
}
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
widthMeasureSpec = MeasureSpec.makeMeasureSpec(
MeasureSpec.getSize(widthMeasureSpec), MeasureSpec.EXACTLY);
heightMeasureSpec = MeasureSpec.makeMeasureSpec(
MeasureSpec.getSize(heightMeasureSpec), MeasureSpec.EXACTLY);
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
}
}

File diff suppressed because it is too large Load Diff

View File

@ -1109,9 +1109,7 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
mLiveContributeViewHolder.addToParent();
}
mLiveContributeViewHolder.show();
if (CommonAppConfig.LIVE_ROOM_SCROLL && !mIsAnchor) {
((LiveAudienceActivity) this).setScrollFrozen(true);
}
}
/**
@ -1124,9 +1122,7 @@ public abstract class LiveActivity extends AbsActivity implements SocketMessageL
mLiveMedalRankViewHolder.addToParent();
}
mLiveMedalRankViewHolder.show();
if (CommonAppConfig.LIVE_ROOM_SCROLL && !mIsAnchor) {
((LiveAudienceActivity) this).setScrollFrozen(true);
}
}

View File

@ -0,0 +1,63 @@
package com.yunbao.live.adapter;
import android.app.Activity;
import android.graphics.drawable.AnimationDrawable;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import com.yunbao.common.bean.AnchorRecommendItemModel;
import com.yunbao.common.glide.ImgLoader;
import com.yunbao.live.R;
import java.util.ArrayList;
import java.util.List;
public class VerticalPagerAdapter extends androidx.viewpager.widget.PagerAdapter {
List<AnchorRecommendItemModel> liveBeans = new ArrayList<>();
private Activity mContext;
private int mPosition;
public VerticalPagerAdapter(List<AnchorRecommendItemModel> liveBeans, Activity mContext) {
this.liveBeans = liveBeans;
this.mContext = mContext;
}
@Override
public int getCount() {
return liveBeans.size();
}
@Override
public boolean isViewFromObject(View view, Object object) {
return view == object;
}
@Override
public Object instantiateItem(ViewGroup container, int position) {
Log.e("LiveAudienceActivity", "VerticalPagerAdapter:" + position);
View view = LayoutInflater.from(container.getContext()).inflate(R.layout.layout_portrait_live_item, null);
// 背景
AnchorRecommendItemModel liveItemBean = liveBeans.get(position);
ImageView ivBg = view.findViewById(R.id.iv_bg);
ImgLoader.displayBlurLive(mContext, liveItemBean.getAvatar(), ivBg);
// 加载动画
ImageView ivLoading = view.findViewById(R.id.iv_loading);
AnimationDrawable frameAnimation = (AnimationDrawable) ivLoading.getBackground();
frameAnimation.start();
view.setId(position);
container.addView(view);
return view;
}
@Override
public void destroyItem(ViewGroup container, int position, Object object) {
container.removeView(container.findViewById(position));
}
}

View File

@ -18,11 +18,11 @@ import com.yunbao.common.http.HttpCallback;
import com.yunbao.common.utils.ToastUtil;
import com.yunbao.live.R;
import com.yunbao.live.activity.LiveActivity;
import com.yunbao.live.activity.LiveAudienceActivity;
import com.yunbao.live.http.LiveHttpUtil;
import java.lang.reflect.Field;
import static com.yunbao.live.activity.LiveAudienceActivity.countDownTimer;
import static com.yunbao.live.views.LiveRoomViewHolder.follow;
import static com.yunbao.live.views.LiveRoomViewHolder.mLiveUid;
@ -142,7 +142,7 @@ public class BlowkissDialog extends AbsDialogFragment {
ToastUtil.show(msg);
}
});
countDownTimer.cancel();
((LiveAudienceActivity) mContext).getCountDownTimer().cancel();
dismiss();
}
});

View File

@ -65,8 +65,8 @@ public class LiveMoreDialogFragment extends AbsDialogFragment {
} else if (((LiveAudienceActivity) mContext).pkInfo != null && ((LiveAudienceActivity) mContext).pkInfo.getIntValue("ifpk") == 0 && ((LiveAudienceActivity) mContext).anyway.equals("1") && LiveRoomViewHolder.d_pk_view.getVisibility() != View.VISIBLE) {
((LiveAudienceActivity) mContext).btnSmallScreen.setVisibility(View.VISIBLE);
((LiveAudienceActivity) mContext).mViewPager.setCurrentItem(0);
((LiveAudienceActivity) mContext).mLivePlayViewHolder.fullScreen();
LiveAudienceActivity.setCurrentItem(0);
LiveAudienceActivity.getmLivePlayViewHolder().fullScreen();
} else {
Toast.makeText(mContext, "当前模式不能全屏", Toast.LENGTH_SHORT).show();
}

View File

@ -5,8 +5,6 @@ import android.view.Gravity;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import androidx.annotation.Nullable;
@ -24,18 +22,14 @@ import com.yunbao.common.dialog.AbsDialogFragment;
import com.yunbao.common.http.CommonHttpUtil;
import com.yunbao.common.http.HttpCallback;
import com.yunbao.common.manager.IMLoginManager;
import com.yunbao.common.utils.ToastUtil;
import com.yunbao.live.R;
import com.yunbao.live.activity.LiveActivity;
import com.yunbao.live.activity.LiveAudienceActivity;
import com.yunbao.live.http.LiveHttpUtil;
import org.greenrobot.eventbus.EventBus;
import java.lang.reflect.Field;
import static com.yunbao.live.activity.LiveAudienceActivity.countDownTimer;
import static com.yunbao.live.views.LiveRoomViewHolder.follow;
import static com.yunbao.live.views.LiveRoomViewHolder.mLiveUid;
public class NewUserDialog extends AbsDialogFragment {
int gif = 0;
@ -108,7 +102,8 @@ public class NewUserDialog extends AbsDialogFragment {
JSONObject obj = old_obj.getJSONObject("reward_all");
gold.setText(obj.getString("gold"));
exp.setText(obj.getString("experience"));
}});
}
});
TextView btn_confirm = (TextView) mRootView.findViewById(R.id.btn_confirm);
@ -129,7 +124,7 @@ public class NewUserDialog extends AbsDialogFragment {
EventBus.getDefault().post("showBanner");
EventBus.getDefault().post("svga_new_user_gif");
IMLoginManager.get(mContext).setNewUserGif(true);
countDownTimer.cancel();
((LiveAudienceActivity) mContext).getCountDownTimer().cancel();
dismiss();
}
});

View File

@ -1002,8 +1002,8 @@ public class LiveLinkMicPkPresenter implements View.OnClickListener {
mLiveLinkMicPkViewHolder = new LiveLinkMicPkViewHolder(mContext, mPkContainer);
mLiveLinkMicPkViewHolder.addToParent();
mLiveLinkMicPkViewHolder.setIsAnchor(mIsAnchor);
if (LiveAudienceActivity.mLivePlayViewHolder != null) {
LiveAudienceActivity.mLivePlayViewHolder.setPkview();
if (LiveAudienceActivity.getmLivePlayViewHolder() != null) {
LiveAudienceActivity.getmLivePlayViewHolder().setPkview();
}
}
@ -1081,8 +1081,8 @@ public class LiveLinkMicPkPresenter implements View.OnClickListener {
public void run() {
try {
Thread.sleep(4000);
if (LiveAudienceActivity.mLivePlayViewHolder != null) {
LiveAudienceActivity.mLivePlayViewHolder.setPkEndview();
if ( LiveAudienceActivity.getmLivePlayViewHolder() != null) {
LiveAudienceActivity.getmLivePlayViewHolder().setPkEndview();
}
} catch (InterruptedException e) {
e.printStackTrace();

View File

@ -32,8 +32,8 @@ import com.yunbao.common.utils.StringUtil;
import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.utils.WordUtil;
import com.yunbao.live.R;
import com.yunbao.live.activity.LiveRyAnchorActivity;
import com.yunbao.live.activity.LiveAudienceActivity;
import com.yunbao.live.activity.LiveRyAnchorActivity;
import com.yunbao.live.bean.LivePKUserListBean;
import com.yunbao.live.custom.ProgressTextView;
import com.yunbao.live.interfaces.ILiveLinkMicViewHolder;
@ -53,7 +53,6 @@ import cn.rongcloud.rtc.api.RCRTCRemoteUser;
import cn.rongcloud.rtc.api.callback.IRCRTCOtherRoomEventsListener;
import cn.rongcloud.rtc.api.callback.IRCRTCResultCallback;
import cn.rongcloud.rtc.api.callback.IRCRTCResultDataCallback;
import cn.rongcloud.rtc.api.stream.RCRTCAudioInputStream;
import cn.rongcloud.rtc.api.stream.RCRTCInputStream;
import cn.rongcloud.rtc.api.stream.RCRTCVideoInputStream;
import cn.rongcloud.rtc.api.stream.RCRTCVideoStreamConfig;
@ -74,10 +73,10 @@ import static com.yunbao.common.Constants.SOCKET_LIVE_DRPK;
import static com.yunbao.live.activity.LiveRyAnchorActivity.isDRPK;
import static com.yunbao.live.views.AbsRyLivePushViewHolder.mPreView;
import static com.yunbao.live.views.AbsRyLivePushViewHolder.mPreView1;
import static com.yunbao.live.views.LivePushRyViewHolder.rcrtcLiveInfo;
import static com.yunbao.live.views.LivePushRyViewHolder.rtcRoom;
import static com.yunbao.live.views.LivePushRyViewHolder.contexts;
import static com.yunbao.live.views.LivePushRyViewHolder.dr_pk_view;
import static com.yunbao.live.views.LivePushRyViewHolder.rcrtcLiveInfo;
import static com.yunbao.live.views.LivePushRyViewHolder.rtcRoom;
//import cn.rongcloud.rtc.jni.video.RCRect;
@ -1788,8 +1787,8 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener {
mLiveLinkMicPkViewHolder = new LiveLinkMicPkViewHolder(mContext, mPkContainer);
mLiveLinkMicPkViewHolder.addToParent();
mLiveLinkMicPkViewHolder.setIsAnchor(mIsAnchor);
if (LiveAudienceActivity.mLivePlayViewHolder != null) {
LiveAudienceActivity.mLivePlayViewHolder.setPkview();
if (LiveAudienceActivity.getmLivePlayViewHolder() != null) {
LiveAudienceActivity.getmLivePlayViewHolder().setPkview();
}
}
@ -1903,8 +1902,8 @@ public class LiveRyLinkMicPkPresenter implements View.OnClickListener {
public void run() {
// try {
// Thread.sleep(4000);
if (LiveAudienceActivity.mLivePlayViewHolder != null) {
LiveAudienceActivity.mLivePlayViewHolder.setPkEndview();
if ( LiveAudienceActivity.getmLivePlayViewHolder() != null) {
LiveAudienceActivity.getmLivePlayViewHolder().setPkEndview();
}
// } catch (InterruptedException e) {
// e.printStackTrace();

View File

@ -171,7 +171,7 @@ public class SocketClient {
LiveRoomViewHolder.d_pk_view.setVisibility(View.GONE);
//創建了多人房間
} else if (action3 == 9) {
LiveAudienceActivity.mLivePlayViewHolder.setPkview();
LiveAudienceActivity.getmLivePlayViewHolder().setPkview();
}
break;
case Constants.SOCKET_ALL_SERVER_NOTIFY://全服通知

View File

@ -242,7 +242,7 @@ public class SocketRyClient {
}
LiveRoomViewHolder.UpPkBar(map.getJSONArray("userlist"), mLiveUid, map.getIntValue("drpk_time"));
if (LiveRyAnchorActivity.mLivePushViewHolder == null) {
LiveAudienceActivity.mLivePlayViewHolder.setPkview();
LiveAudienceActivity.getmLivePlayViewHolder().setPkview();
}
} else if (action3 == 5) {
@ -256,17 +256,17 @@ public class SocketRyClient {
leaveDRRoom();
isDRPK = 0;
} else {
LiveAudienceActivity.mLivePlayViewHolder.setPkEndview();
LiveAudienceActivity.getmLivePlayViewHolder().setPkEndview();
}
//創建了多人房間
} else if (action3 == 3) {
if (LiveAudienceActivity.mLivePlayViewHolder != null) {
LiveAudienceActivity.mLivePlayViewHolder.setPkview();
if ( LiveAudienceActivity.getmLivePlayViewHolder() != null) {
LiveAudienceActivity.getmLivePlayViewHolder().setPkview();
}
isDRPK = 1;
} else if (action3 == 10) {
if (!map.getString("uid").equals(CommonAppConfig.getInstance().getUid())) {
LiveAudienceActivity.mLivePlayViewHolder.setPkview();
LiveAudienceActivity.getmLivePlayViewHolder().setPkview();
}
}

View File

@ -0,0 +1,63 @@
package com.yunbao.live.views;
import android.content.Intent;
import android.content.res.Configuration;
/**
* 该类的方法对应 Activity 的方法
*/
public interface LiveActivityLifeCallback {
/**
* Activity onStart
*/
void onStart();
/**
* Activity onResume
*/
void onResume();
/**
* Activity onPause
*/
void onPause();
/**
* Activity onStop
*/
void onStop();
/**
* Activity onDestroy
*/
void onDestroy();
/**
* Activity onRestart
*/
void onRestart();
/**
* Activity onConfigurationChanged
*/
void onConfigurationChanged(Configuration newConfig);
/**
* Activity onActivityResult
*/
void onActivityResult(int requestCode, int resultCode, Intent data);
/**
* Activity onNewIntent
*/
void onNewIntent(Intent intent);
/**
* Activity onBackPressed
*/
void onBackPressed();
}

View File

@ -116,9 +116,7 @@ public class LiveAddImpressViewHolder extends AbsLivePageViewHolder {
mLinkedList.clear();
mGroup.removeAllViews();
removeFromParent();
if (CommonAppConfig.LIVE_ROOM_SCROLL && mContext != null && mContext instanceof LiveAudienceActivity) {
((LiveAudienceActivity) mContext).setScrollFrozen(false);
}
}
private void initData() {
@ -151,9 +149,7 @@ public class LiveAddImpressViewHolder extends AbsLivePageViewHolder {
line++;
mGroup.addView(linearLayout);
}
if (CommonAppConfig.LIVE_ROOM_SCROLL && mContext != null && mContext instanceof LiveAudienceActivity) {
((LiveAudienceActivity) mContext).setScrollFrozen(true);
}
}
}
});

View File

@ -109,8 +109,6 @@ public class LiveContributeViewHolder extends AbsLivePageViewHolder implements V
@Override
public void onHide() {
if (CommonAppConfig.LIVE_ROOM_SCROLL && mContext != null && mContext instanceof LiveAudienceActivity) {
((LiveAudienceActivity) mContext).setScrollFrozen(false);
}
}
}

View File

@ -108,8 +108,6 @@ public class LiveMedalRankViewHolder extends AbsLivePageViewHolder implements Vi
@Override
public void onHide() {
if (CommonAppConfig.LIVE_ROOM_SCROLL && mContext != null && mContext instanceof LiveAudienceActivity) {
((LiveAudienceActivity) mContext).setScrollFrozen(false);
}
}
}

View File

@ -0,0 +1,27 @@
package com.yunbao.live.views;
import android.view.ViewGroup;
import com.yunbao.live.bean.LiveBean;
public interface LivePlayListener extends LiveActivityLifeCallback {
/**
* 用户滑动显示该页面
*
* @param data 房间信息
*/
void onAdd(LiveBean data, int liveType, int liveTypeVal, int liveSdk);
/**
* 用户滑动移除该页面
*/
void onRemove();
/**
* @return 页面的根布局 View
*/
ViewGroup getRootView();
}

View File

@ -1,6 +1,5 @@
package com.yunbao.live.views;
import android.Manifest;
import android.app.Dialog;
import android.content.Context;
import android.media.AudioManager;
@ -14,17 +13,12 @@ import android.view.ViewGroup;
import android.view.ViewParent;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.tencent.live2.V2TXLiveDef;
import com.tencent.live2.V2TXLivePlayer;
import com.tencent.live2.impl.V2TXLivePlayerImpl;
import com.tencent.rtmp.ui.TXCloudVideoView;
import com.yunbao.common.CommonAppConfig;
import com.yunbao.common.bean.UserBean;
import com.yunbao.common.glide.ImgLoader;
import com.yunbao.common.http.HttpCallback;
import com.yunbao.common.http.HttpClient;
@ -36,8 +30,6 @@ import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.utils.WordUtil;
import com.yunbao.live.R;
import com.yunbao.live.activity.LiveActivity;
import com.yunbao.live.activity.LiveAudienceActivity;
import com.yunbao.live.presenter.LiveRyLinkMicPkPresenter;
import org.greenrobot.eventbus.EventBus;
import org.greenrobot.eventbus.Subscribe;
@ -47,8 +39,6 @@ import java.util.ArrayList;
import java.util.List;
import cn.rongcloud.rtc.api.RCRTCEngine;
import cn.rongcloud.rtc.api.RCRTCMixConfig;
import cn.rongcloud.rtc.api.RCRTCOtherRoom;
import cn.rongcloud.rtc.api.RCRTCRemoteUser;
import cn.rongcloud.rtc.api.RCRTCRoom;
import cn.rongcloud.rtc.api.RCRTCRoomConfig;
@ -57,7 +47,6 @@ import cn.rongcloud.rtc.api.callback.IRCRTCResultDataCallback;
import cn.rongcloud.rtc.api.callback.IRCRTCRoomEventsListener;
import cn.rongcloud.rtc.api.callback.IRCRTCSwitchRoleCallback;
import cn.rongcloud.rtc.api.callback.IRCRTCSwitchRoleDataCallback;
import cn.rongcloud.rtc.api.stream.RCRTCCDNInputStream;
import cn.rongcloud.rtc.api.stream.RCRTCInputStream;
import cn.rongcloud.rtc.api.stream.RCRTCLiveInfo;
import cn.rongcloud.rtc.api.stream.RCRTCOutputStream;
@ -69,20 +58,9 @@ import cn.rongcloud.rtc.base.RCRTCMediaType;
import cn.rongcloud.rtc.base.RCRTCParamsType;
import cn.rongcloud.rtc.base.RCRTCRoomType;
import cn.rongcloud.rtc.base.RTCErrorCode;
import cn.rongcloud.rtc.core.RendererCommon;
import cn.rongcloud.rtc.plugin.player.IPlayerPrepareListener;
import static cn.rongcloud.rtc.core.RendererCommon.ScalingType.SCALE_ASPECT_FILL;
import static com.lzy.okgo.utils.HttpUtils.runOnUiThread;
import static com.yunbao.common.Constants.SOCKET_LIVE_DRPK;
import static com.yunbao.live.activity.LiveActivity.mLiveRyLinkMicPkPresenter;
import static com.yunbao.live.activity.LiveRyAnchorActivity.mLivePushViewHolder;
import static com.yunbao.live.presenter.LiveRyLinkMicPkPresenter.leaveDRRoom;
import static com.yunbao.live.views.AbsRyLivePushViewHolder.mPreView;
import static com.yunbao.live.views.LivePushRyViewHolder.contexts;
import static com.yunbao.live.views.LivePushRyViewHolder.dr_pk_view;
import static com.yunbao.live.views.LivePushRyViewHolder.rcrtcLiveInfo;
import static com.yunbao.live.views.LivePushRyViewHolder.rtcRoom;
public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder {
@ -118,6 +96,7 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder {
public static int Micing = 0;
RCRTCRoom rcrtcRoom;
String purl;
public LivePlayRyViewHolder(Context context, ViewGroup parentView, int landscapes) {
super(context, parentView);
contexts = context;
@ -223,7 +202,9 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder {
public void release() {
mEnd = true;
mStarted = false;
if (mPlayer != null) {
mPlayer.stopPlay();
}
L.e(TAG, "release------->");
}
@ -483,7 +464,8 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder {
rcrtcRoom = null;
Micing = 0;
ToastUtil.show("已成功退出語音連麥");
}});
}
});
}
@Override

View File

@ -104,7 +104,6 @@ import pl.droidsonroids.gif.GifImageView;
import static com.yunbao.common.CommonAppContext.logger;
import static com.yunbao.common.CommonAppContext.mFirebaseAnalytics;
import static com.yunbao.live.activity.LiveAudienceActivity.countDownTimer;
/**
* Created by cxf on 2018/10/9.
@ -1200,8 +1199,8 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
} else if (i == R.id.btn_follow) {
follow();
if (countDownTimer != null) {
countDownTimer.cancel();
if (((LiveAudienceActivity) mContext).getCountDownTimer() != null) {
((LiveAudienceActivity) mContext).getCountDownTimer().cancel();
}
} else if (i == R.id.view_medal) {
//点击粉丝勋章, 弹窗 开通粉丝勋章
@ -1255,8 +1254,8 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
if (TextUtils.isEmpty(mLiveUid)) {
return;
}
if (countDownTimer != null) {
countDownTimer.cancel();
if (((LiveAudienceActivity) Contexts).getCountDownTimer() != null) {
((LiveAudienceActivity) Contexts).getCountDownTimer().cancel();
}
CommonHttpUtil.setAttention(mLiveUid, new CommonCallback<Integer>() {
@Override
@ -1292,7 +1291,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
dialog.findViewById(R.id.btn_confirm).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
LiveAudienceActivity.backIndex = 1;
((LiveAudienceActivity) context).setBackIndex(1);
((LiveAudienceActivity) context).onBackPressed();
follow();
}
@ -1300,7 +1299,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
dialog.findViewById(R.id.btn_cancel).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
LiveAudienceActivity.backIndex = 1;
((LiveAudienceActivity) context).setBackIndex(1);
((LiveAudienceActivity) context).onBackPressed();
}
});
@ -1318,15 +1317,15 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
if (isStayRoomfive) {
showFollowDialog(mNameText, mAvatarUrl, mContext);
} else {
LiveAudienceActivity.backIndex = 1;
((LiveAudienceActivity) mContext).setBackIndex(1);
((LiveAudienceActivity) mContext).onBackPressed();
}
} else {
LiveAudienceActivity.backIndex = 1;
((LiveAudienceActivity) mContext).setBackIndex(1);
((LiveAudienceActivity) mContext).onBackPressed();
}
} else {
LiveAudienceActivity.backIndex = 1;
((LiveAudienceActivity) mContext).setBackIndex(1);
((LiveAnchorActivity) mContext).onBackPressed();
}
} else {

View File

@ -112,8 +112,6 @@ public class LiveWebViewHolder extends AbsLivePageViewHolder implements View.OnC
@Override
public void onHide() {
if (CommonAppConfig.LIVE_ROOM_SCROLL && mContext != null && mContext instanceof LiveAudienceActivity) {
((LiveAudienceActivity) mContext).setScrollFrozen(false);
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -138,8 +138,6 @@ public class TurnTableWebViewHolder extends AbsLivePageViewHolder implements Vie
@Override
public void onHide() {
if (CommonAppConfig.LIVE_ROOM_SCROLL && mContext != null && mContext instanceof LiveAudienceActivity) {
((LiveAudienceActivity) mContext).setScrollFrozen(false);
}
}
}

View File

@ -177,8 +177,6 @@ public class WishlistWebViewHolder extends AbsLivePageViewHolder implements View
@Override
public void onHide() {
if (CommonAppConfig.LIVE_ROOM_SCROLL && mContext != null && mContext instanceof LiveAudienceActivity) {
((LiveAudienceActivity) mContext).setScrollFrozen(false);
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<animation-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:drawable="@drawable/img_loading_01"
android:duration="350" />
<item
android:drawable="@drawable/img_loading_02"
android:duration="350" />
<item
android:drawable="@drawable/img_loading_03"
android:duration="350" />
</animation-list>

View File

@ -1,10 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.drawerlayout.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
<com.yunbao.common.views.weight.MyDrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/drawer_layout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
@ -79,9 +80,8 @@
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingStart="8dp"
android:paddingEnd="8dp"
android:paddingTop="56dp"
>
android:paddingEnd="8dp">
<com.ms.banner.Banner
android:id="@+id/banner"
@ -113,4 +113,4 @@
</FrameLayout>
</androidx.drawerlayout.widget.DrawerLayout>
</com.yunbao.common.views.weight.MyDrawerLayout>

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<com.yunbao.common.views.weight.VerticalViewPager
android:id="@+id/view_pager"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:overScrollMode="never" />
</RelativeLayout>

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ImageView
android:id="@+id/iv_bg"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
android:src="@mipmap/live_bg" />
<ImageView
android:id="@+id/iv_loading"
android:layout_width="50dp"
android:layout_height="10dp"
android:layout_centerInParent="true"
android:background="@drawable/loading_animation" />
</RelativeLayout>

View File

@ -126,9 +126,10 @@ import cn.rongcloud.rtc.api.RCRTCEngine;
import io.reactivex.Observer;
import io.reactivex.disposables.Disposable;
import io.rong.imlib.RongIMClient;
import kotlin.Unit;
import static com.yunbao.common.CommonAppContext.isReady;
import kotlin.*;
@Route(path = RouteUtil.PATH_MAIN)
public class MainActivity extends AbsActivity implements MainAppBarLayoutListener {
@ -673,7 +674,6 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
public void onSuccess(int code, String msg, String[] info) {
if (info.length > 0) {
Log.e("MainActivity", info[0]);
JSONObject obj = JSON.parseObject(info[0]);
if (code == 0) {
Bundle bundle = new Bundle();
@ -683,7 +683,7 @@ public class MainActivity extends AbsActivity implements MainAppBarLayoutListene
fragment.setArguments(bundle);
fragment.show(getSupportFragmentManager(), "SigninDialog");
}
if (obj.containsKey("msg_zdy_send") && obj.containsKey("msg_zdy_send_text")) {
if (obj != null && obj.containsKey("msg_zdy_send") && obj.containsKey("msg_zdy_send_text")) {
Log.e("MainActivity333", info[0]);
NoviceInstructorManager.get(mContext).getNetNoviceInstructor(info[0]);
}