diff --git a/live/src/main/res/drawable/loading_00000.png b/common/src/main/res/drawable/loading_00000.png
similarity index 100%
rename from live/src/main/res/drawable/loading_00000.png
rename to common/src/main/res/drawable/loading_00000.png
diff --git a/live/src/main/res/drawable/loading_00001.png b/common/src/main/res/drawable/loading_00001.png
similarity index 100%
rename from live/src/main/res/drawable/loading_00001.png
rename to common/src/main/res/drawable/loading_00001.png
diff --git a/live/src/main/res/drawable/loading_00002.png b/common/src/main/res/drawable/loading_00002.png
similarity index 100%
rename from live/src/main/res/drawable/loading_00002.png
rename to common/src/main/res/drawable/loading_00002.png
diff --git a/live/src/main/res/drawable/loading_00003.png b/common/src/main/res/drawable/loading_00003.png
similarity index 100%
rename from live/src/main/res/drawable/loading_00003.png
rename to common/src/main/res/drawable/loading_00003.png
diff --git a/live/src/main/res/drawable/loading_00004.png b/common/src/main/res/drawable/loading_00004.png
similarity index 100%
rename from live/src/main/res/drawable/loading_00004.png
rename to common/src/main/res/drawable/loading_00004.png
diff --git a/live/src/main/res/drawable/loading_00005.png b/common/src/main/res/drawable/loading_00005.png
similarity index 100%
rename from live/src/main/res/drawable/loading_00005.png
rename to common/src/main/res/drawable/loading_00005.png
diff --git a/live/src/main/res/drawable/loading_00006.png b/common/src/main/res/drawable/loading_00006.png
similarity index 100%
rename from live/src/main/res/drawable/loading_00006.png
rename to common/src/main/res/drawable/loading_00006.png
diff --git a/live/src/main/res/drawable/loading_00007.png b/common/src/main/res/drawable/loading_00007.png
similarity index 100%
rename from live/src/main/res/drawable/loading_00007.png
rename to common/src/main/res/drawable/loading_00007.png
diff --git a/live/src/main/res/drawable/loading_00008.png b/common/src/main/res/drawable/loading_00008.png
similarity index 100%
rename from live/src/main/res/drawable/loading_00008.png
rename to common/src/main/res/drawable/loading_00008.png
diff --git a/live/src/main/res/drawable/loading_00009.png b/common/src/main/res/drawable/loading_00009.png
similarity index 100%
rename from live/src/main/res/drawable/loading_00009.png
rename to common/src/main/res/drawable/loading_00009.png
diff --git a/live/src/main/res/drawable/loading_00010.png b/common/src/main/res/drawable/loading_00010.png
similarity index 100%
rename from live/src/main/res/drawable/loading_00010.png
rename to common/src/main/res/drawable/loading_00010.png
diff --git a/live/src/main/res/drawable/loading_00011.png b/common/src/main/res/drawable/loading_00011.png
similarity index 100%
rename from live/src/main/res/drawable/loading_00011.png
rename to common/src/main/res/drawable/loading_00011.png
diff --git a/live/src/main/res/drawable/loading_00012.png b/common/src/main/res/drawable/loading_00012.png
similarity index 100%
rename from live/src/main/res/drawable/loading_00012.png
rename to common/src/main/res/drawable/loading_00012.png
diff --git a/live/src/main/res/drawable/loading_00013.png b/common/src/main/res/drawable/loading_00013.png
similarity index 100%
rename from live/src/main/res/drawable/loading_00013.png
rename to common/src/main/res/drawable/loading_00013.png
diff --git a/live/src/main/res/drawable/loading_00014.png b/common/src/main/res/drawable/loading_00014.png
similarity index 100%
rename from live/src/main/res/drawable/loading_00014.png
rename to common/src/main/res/drawable/loading_00014.png
diff --git a/live/src/main/res/drawable/loading_00015.png b/common/src/main/res/drawable/loading_00015.png
similarity index 100%
rename from live/src/main/res/drawable/loading_00015.png
rename to common/src/main/res/drawable/loading_00015.png
diff --git a/common/src/main/res/drawable/loading_animation.xml b/common/src/main/res/drawable/loading_animation.xml
new file mode 100644
index 000000000..4a98f36b8
--- /dev/null
+++ b/common/src/main/res/drawable/loading_animation.xml
@@ -0,0 +1,54 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/live/src/main/java/com/yunbao/live/adapter/VerticalPagerAdapter.java b/live/src/main/java/com/yunbao/live/adapter/VerticalPagerAdapter.java
index 6edabd64f..e7e24200a 100644
--- a/live/src/main/java/com/yunbao/live/adapter/VerticalPagerAdapter.java
+++ b/live/src/main/java/com/yunbao/live/adapter/VerticalPagerAdapter.java
@@ -55,7 +55,6 @@ public class VerticalPagerAdapter extends androidx.viewpager.widget.PagerAdapter
ImageView ivLoading = view.findViewById(R.id.iv_loading);
AnimationDrawable frameAnimation = (AnimationDrawable) ivLoading.getBackground();
frameAnimation.start();
-// ImgLoader.displayGif(mContext, R.drawable.live_loading, ivLoading);
view.setId(position);
container.addView(view);
return view;
@@ -63,6 +62,7 @@ public class VerticalPagerAdapter extends androidx.viewpager.widget.PagerAdapter
@Override
public void destroyItem(ViewGroup container, int position, Object object) {
- container.removeView(container.findViewById(position));
+
+// container.removeView(container.findViewById(position));
}
}
diff --git a/live/src/main/java/com/yunbao/live/dialog/LiveMicAnchorDialogFragment.java b/live/src/main/java/com/yunbao/live/dialog/LiveMicAnchorDialogFragment.java
index 2f504339a..237aec02a 100644
--- a/live/src/main/java/com/yunbao/live/dialog/LiveMicAnchorDialogFragment.java
+++ b/live/src/main/java/com/yunbao/live/dialog/LiveMicAnchorDialogFragment.java
@@ -271,6 +271,7 @@ public class LiveMicAnchorDialogFragment extends AbsDialogFragment implements Vi
bean.setType(AnchorUserMicInfoAdapter.TYPE_MIC_INVITE);
data.add(bean);
}
+ mRefreshView.setNotLoadMore();
} else {
data = JSON.parseArray(obj.getString("userlist"), MicUserBean.class);
for (MicUserBean bean : data) {
diff --git a/live/src/main/java/com/yunbao/live/views/LivePlayRyViewHolder.java b/live/src/main/java/com/yunbao/live/views/LivePlayRyViewHolder.java
index ac4f8f9f0..4a761c69d 100644
--- a/live/src/main/java/com/yunbao/live/views/LivePlayRyViewHolder.java
+++ b/live/src/main/java/com/yunbao/live/views/LivePlayRyViewHolder.java
@@ -32,6 +32,7 @@ import com.tencent.live2.V2TXLivePlayer;
import com.tencent.live2.V2TXLivePlayerObserver;
import com.tencent.live2.impl.V2TXLivePlayerImpl;
import com.tencent.rtmp.ui.TXCloudVideoView;
+import com.yunbao.common.glide.ImgLoader;
import com.yunbao.common.http.HttpCallback;
import com.yunbao.common.http.HttpClient;
import com.yunbao.common.utils.DialogUitl;
@@ -164,13 +165,14 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder {
public void hideCover() {
// if (mCover != null) {
// if (mCover.getVisibility()==View.VISIBLE){
-// new Handler().postDelayed(new Runnable() {
-// @Override
-// public void run() {
-// mCover.setVisibility(View.GONE);
-// mLoading2.setVisibility(View.GONE);
-// }
-// },200);
+//// new Handler().postDelayed(new Runnable() {
+//// @Override
+//// public void run() {
+////
+//// }
+//// },200);
+// mCover.setVisibility(View.GONE);
+// mLoading2.setVisibility(View.GONE);
// }
//
//
@@ -248,7 +250,8 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder {
.postDelayed(() -> {
mPlayer.stopPlay();
int val = mPlayer.startPlay(purl);
- // ToastUtil.show("强制播放" + val);
+ // ToastUtil.show("强制播放" + val);
+ Log.i(TAG, "强制播放: " + val);
}, 100);
}
}
@@ -705,6 +708,7 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder {
mPlayer.startPlay(purl);
}
ry_view.removeAllViews();
+ ry_view.getLayoutParams().height = ViewGroup.LayoutParams.WRAP_CONTENT;
onPrepared();
rcrtcRoom = null;
MicStatusManager.getInstance().clear();
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 49358a932..05706b47e 100644
--- a/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java
+++ b/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java
@@ -6,6 +6,7 @@ import android.app.Activity;
import android.app.Dialog;
import android.content.Intent;
import android.content.res.Configuration;
+import android.graphics.drawable.AnimationDrawable;
import android.os.CountDownTimer;
import android.os.Handler;
import android.text.TextUtils;
@@ -59,7 +60,6 @@ import com.yunbao.common.utils.ToastUtil;
import com.yunbao.common.utils.WordUtil;
import com.yunbao.common.utils.formatBigNum;
import com.yunbao.common.views.weight.LiveFloatView;
-import com.yunbao.common.views.weight.LiveLoadingViewHolder;
import com.yunbao.live.R;
import com.yunbao.live.activity.LiveActivity;
import com.yunbao.live.activity.LiveAudienceActivity;
@@ -125,7 +125,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
private ImageView btnSmallScreen;
private Intent mIntent;
//直播间背景
- private ImageView liveBack;
+ private ImageView liveBack, ivBg, ivLoading;
private View mask;
//侧滑布局
@@ -183,6 +183,8 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
private boolean isEnterRoom = false;
private boolean kick = false;
+ private View loading;
+
public PortraitLiveManager setQuitF(boolean quitF) {
isQuitF = quitF;
return this;
@@ -204,6 +206,9 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
playContainer = mRootContainer.findViewById(R.id.play_container);
mViewPager = mRootContainer.findViewById(R.id.viewPager);
btnSmallScreen = mRootContainer.findViewById(R.id.btn_small_screen);
+ loading = mRootContainer.findViewById(R.id.loading);
+ ivBg = mRootContainer.findViewById(R.id.iv_bg);
+ ivLoading = mRootContainer.findViewById(R.id.iv_loading);
mSecondPage = (ViewGroup) LayoutInflater.from(mContext).inflate(R.layout.view_audience_page, mViewPager, false);
mContainerWrap = mSecondPage.findViewById(R.id.container_wrap);
mContainer = mSecondPage.findViewById(R.id.container);
@@ -253,6 +258,10 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
.setParametersModel(openParametersModel
.setmLiveType(mLiveType)
.setmLiveTypeVal(mLiveTypeVal)));
+ loading.setVisibility(View.VISIBLE);
+ ImgLoader.displayBlurLive(mContext, mLiveBean.getAvatar(), ivBg);
+ AnimationDrawable frameAnimation = (AnimationDrawable) ivLoading.getBackground();
+ frameAnimation.start();
if (mLivePlayViewHolder == null) {
mLivePlayViewHolder = new LivePlayRyViewHolder(mContext, playContainer, 1);
mLiveRoomViewHolder = new LiveRoomViewHolder(false, 1, mContext, mContainer, mSecondPage.findViewById(R.id.gift_gif), mSecondPage.findViewById(R.id.gift_svga), mContainerWrap, mContext.getWindowManager());
@@ -279,8 +288,9 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
LivePlayRyViewHolder.leave.setVisibility(View.GONE);
}
//直播间背景
+
ImgLoader.displayBlurLive(mContext, mLiveBean.getAvatar(), liveBack, 400, 600);
- //ImageLoadUtils.loadUrlToBlur(mContext,mLiveBean.getAvatar(),400,600,liveBack);
+
mask.setVisibility(View.VISIBLE);
mLivePlayViewHolder.setLiveBean(mLiveBean);
mLivePlayViewHolder.setCover(mLiveBean.getAvatar());
@@ -333,12 +343,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
public void onSuccess(EnterRoomNewModel data) {
mLivePlayViewHolder.setLiveBeanLandscape(data.getLiveInfo().getLandscape());
//是否热度卡加成
- liveHandler.postDelayed(new Runnable() {
- @Override
- public void run() {
- mLiveRoomViewHolder.getIsHot(data.getIsUseHotCard());
- }
- }, 700);
+ liveHandler.postDelayed(() -> mLiveRoomViewHolder.getIsHot(data.getIsUseHotCard()), 700);
isEnterRoom = true;
//延时1秒发送
@@ -547,6 +552,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
mLiveRoomViewHolder.showPrizePoolLevel(String.valueOf(giftPrizePoolLevel));
}
}
+ liveHandler.postDelayed(() -> loading.setVisibility(View.GONE),700);
}
@@ -874,7 +880,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
@Override
public void onCancel() {
- // ((LiveAudienceActivity) mContext).setEnableScroll(true);
+ // ((LiveAudienceActivity) mContext).setEnableScroll(true);
}
});
diff --git a/live/src/main/res/layout/activity_live_audience.xml b/live/src/main/res/layout/activity_live_audience.xml
index dbdb835bb..352e09a8e 100644
--- a/live/src/main/res/layout/activity_live_audience.xml
+++ b/live/src/main/res/layout/activity_live_audience.xml
@@ -1,6 +1,5 @@
@@ -53,6 +52,9 @@
android:visibility="gone" />
+
\ No newline at end of file