调整直播间UI

修复进入直播间快速退出导致的闪退问题
This commit is contained in:
zlzw 2023-04-08 14:57:22 +08:00
parent 2b62d018b5
commit a8178c51a0
7 changed files with 28 additions and 27 deletions

View File

@ -1449,7 +1449,7 @@ public class LiveRoomViewHolder extends AbsViewHolder implements View.OnClickLis
public void onAnimationEnd(Animation animation) { public void onAnimationEnd(Animation animation) {
if (hide) { if (hide) {
mAnchorSayImage.setTag(mAnchorSay.getX()); mAnchorSayImage.setTag(mAnchorSay.getX());
mAnchorSay.setX(-DpUtil.dp2px(45)); mAnchorSay.setX(-DpUtil.dp2px(53));
mAnchorSayImage.setVisibility(View.INVISIBLE); mAnchorSayImage.setVisibility(View.INVISIBLE);
mAnchorSayText.setVisibility(View.INVISIBLE); mAnchorSayText.setVisibility(View.INVISIBLE);
mAnchorSayHide.setImageResource(R.mipmap.ic_live_anchor_say_hide); mAnchorSayHide.setImageResource(R.mipmap.ic_live_anchor_say_hide);

View File

@ -254,7 +254,7 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
loading.setVisibility(View.GONE); loading.setVisibility(View.GONE);
enterRoomLeaveHandler.post(enterRoomLeaveRunnable); enterRoomLeaveHandler.post(enterRoomLeaveRunnable);
if (topBannerRunnable != null) { if (topBannerRunnable != null) {
topBannerHandler.postDelayed(topBannerRunnable, 6000); topBannerHandler.postDelayed(topBannerRunnable, 1000);
} }
} }
}; };
@ -417,7 +417,12 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
} }
mLivePlayViewHolder.setAnchorPlayModel(anchorClarityType); mLivePlayViewHolder.setAnchorPlayModel(anchorClarityType);
//是否热度卡加成 //是否热度卡加成
liveHandler.postDelayed(() -> mLiveRoomViewHolder.getIsHot(data.getIsUseHotCard()), 700); liveHandler.postDelayed(() -> {
if(mLiveRoomViewHolder==null){
return;
}
mLiveRoomViewHolder.getIsHot(data.getIsUseHotCard());
}, 700);
//延时1秒发送 //延时1秒发送
liveHandler.postDelayed(sendFIm, 700); liveHandler.postDelayed(sendFIm, 700);
@ -1945,11 +1950,12 @@ public class PortraitLiveManager implements LivePlayListener, SocketMessageListe
} }
} }
public void wishListProgress(WishModel wishListProgress, String userNiceName,int level) { public void wishListProgress(WishModel wishListProgress, String userNiceName, int level) {
if (mLiveRoomViewHolder != null) { if (mLiveRoomViewHolder != null) {
mLiveRoomViewHolder.wishListProgress(wishListProgress, userNiceName,level); mLiveRoomViewHolder.wishListProgress(wishListProgress, userNiceName, level);
} }
} }
public void showXydComplete(XydCompleteModel model) { public void showXydComplete(XydCompleteModel model) {
if (mLiveRoomViewHolder != null) { if (mLiveRoomViewHolder != null) {
mLiveRoomViewHolder.showXydComplete(model); mLiveRoomViewHolder.showXydComplete(model);

View File

@ -41,8 +41,8 @@
<ImageView <ImageView
android:id="@+id/anchor_say_hide" android:id="@+id/anchor_say_hide"
android:layout_width="24dp" android:layout_width="16dp"
android:layout_height="24dp" android:layout_height="16dp"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@mipmap/ic_live_anchor_say_show" /> app:srcCompat="@mipmap/ic_live_anchor_say_show" />

View File

@ -315,8 +315,8 @@
<TextView <TextView
android:id="@+id/red_point" android:id="@+id/red_point"
android:layout_width="wrap_content" android:layout_width="6dp"
android:layout_height="14dp" android:layout_height="6dp"
android:layout_alignTop="@id/rt_msg" android:layout_alignTop="@id/rt_msg"
android:layout_alignRight="@id/rt_msg" android:layout_alignRight="@id/rt_msg"
android:layout_marginTop="5dp" android:layout_marginTop="5dp"

View File

@ -227,7 +227,7 @@
<FrameLayout <FrameLayout
android:id="@+id/hour_rank_layout" android:id="@+id/hour_rank_layout"
android:layout_width="wrap_content" android:layout_width="70dp"
android:layout_height="20dp" android:layout_height="20dp"
android:layout_below="@id/lin" android:layout_below="@id/lin"
android:layout_marginLeft="10dp" android:layout_marginLeft="10dp"
@ -701,9 +701,8 @@
android:layout_width="52dp" android:layout_width="52dp"
android:layout_height="76dp" android:layout_height="76dp"
android:layout_below="@+id/live_rank_pk" android:layout_below="@+id/live_rank_pk"
android:layout_alignEnd="@+id/live_rank_pk" android:layout_marginTop="20dp"
android:layout_marginLeft="5dp" android:layout_alignParentRight="true"
android:layout_marginTop="40dp"
android:layout_marginRight="5dp" android:layout_marginRight="5dp"
app:delay_time="5000" app:delay_time="5000"
app:indicator_height="8dp" app:indicator_height="8dp"
@ -1299,10 +1298,10 @@
android:layout_width="67dp" android:layout_width="67dp"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_alignBottom="@+id/live_video" android:layout_alignBottom="@+id/live_video"
android:layout_marginStart="14dp" android:layout_marginStart="5dp"
android:layout_marginBottom="50dp" android:layout_marginBottom="-30dp"
android:background="@color/white" android:background="@color/white"
android:visibility="invisible" /> android:visibility="visible" />
<ImageView <ImageView

View File

@ -1,14 +1,13 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="wrap_content" android:layout_width="52dp"
android:layout_height="wrap_content"> android:layout_height="wrap_content">
<ImageView <ImageView
android:id="@+id/imageView7" android:id="@+id/imageView7"
android:layout_width="0dp" android:layout_width="52dp"
android:layout_height="0dp" android:layout_height="52dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" app:layout_constraintTop_toTopOf="parent"
@ -16,9 +15,8 @@
<com.opensource.svgaplayer.SVGAImageView <com.opensource.svgaplayer.SVGAImageView
android:id="@+id/svga" android:id="@+id/svga"
android:layout_width="38dp" android:layout_width="32dp"
android:layout_height="38dp" android:layout_height="32dp"
android:layout_marginTop="5dp"
android:visibility="visible" android:visibility="visible"
app:autoPlay="true" app:autoPlay="true"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
@ -30,7 +28,6 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginTop="2dp" android:layout_marginTop="2dp"
android:layout_marginBottom="5dp"
android:background="@drawable/bg_live_top_banner_text" android:background="@drawable/bg_live_top_banner_text"
android:paddingStart="5dp" android:paddingStart="5dp"
android:paddingTop="2dp" android:paddingTop="2dp"
@ -39,7 +36,6 @@
android:text="@string/live_ready_anchor_call_me" android:text="@string/live_ready_anchor_call_me"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="10sp" android:textSize="10sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/svga" /> app:layout_constraintTop_toBottomOf="@+id/svga" />

View File

@ -6,7 +6,7 @@
<FrameLayout <FrameLayout
android:layout_width="52dp" android:layout_width="52dp"
android:layout_height="64dp" android:layout_height="54dp"
android:background="@mipmap/bg_xyd"> android:background="@mipmap/bg_xyd">
<ImageView <ImageView
@ -29,7 +29,7 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="bottom|center_horizontal" android:layout_gravity="bottom|center_horizontal"
android:layout_marginBottom="5dp" android:layout_marginBottom="3dp"
android:text="sjhasdjkjk" android:text="sjhasdjkjk"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="8sp" /> android:textSize="8sp" />