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 7b77f93f0..e4dedb4c0 100644 --- a/live/src/main/java/com/yunbao/live/views/LivePlayRyViewHolder.java +++ b/live/src/main/java/com/yunbao/live/views/LivePlayRyViewHolder.java @@ -556,8 +556,18 @@ public class LivePlayRyViewHolder extends LiveRoomPlayViewHolder { params.addRule(RelativeLayout.ALIGN_TOP); mVideoView.requestLayout(); } + if (detailsView != null) { + mVideoView.removeView(detailsView); + detailsView = null; + } } + public void removeDetailView(){ + if (detailsView != null) { + mVideoView.removeView(detailsView); + detailsView = null; + } + } @Override public ViewGroup getSmallContainer() { 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 637b0f48c..9e47a6884 100644 --- a/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java +++ b/live/src/main/java/com/yunbao/live/views/PortraitLiveManager.java @@ -317,6 +317,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe mask.setVisibility(View.VISIBLE); mLivePlayViewHolder.clearFrame(); mLivePlayViewHolder.setLiveBean(mLiveBean); + mLivePlayViewHolder.removeDetailView(); mLivePlayViewHolder.setCover(mLiveBean.getAvatar()); mLivePlayViewHolder.setLiveBeanLandscape(mLiveBean.getLandscape()); //mLivePlayViewHolder.play(mLiveBean.getPull(), LiveRoomPlayViewHolder.PLAY_MODEL_DEF);