From 83e94b3b2e827bfff9ff1b8e7aacafc61e48d709 Mon Sep 17 00:00:00 2001 From: zlzw <583819556@qq.com> Date: Fri, 11 Oct 2024 16:48:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E4=BF=AE=E5=A4=8D=E9=A6=96?= =?UTF-8?q?=E9=A1=B5=E9=97=AA=E5=B1=8F=E9=97=AE=E9=A2=982?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/yunbao/main/views/MainHomeLiveViewHolder.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/main/src/main/java/com/yunbao/main/views/MainHomeLiveViewHolder.java b/main/src/main/java/com/yunbao/main/views/MainHomeLiveViewHolder.java index 9e0294bde..03ff7a811 100644 --- a/main/src/main/java/com/yunbao/main/views/MainHomeLiveViewHolder.java +++ b/main/src/main/java/com/yunbao/main/views/MainHomeLiveViewHolder.java @@ -6,6 +6,8 @@ import android.app.Dialog; import android.content.Context; import android.graphics.Outline; import android.graphics.drawable.Drawable; +import android.os.Handler; +import android.os.Looper; import android.text.TextUtils; import android.util.Log; import android.view.View; @@ -214,7 +216,7 @@ public class MainHomeLiveViewHolder extends AbsMainHomeChildViewHolder implement }); } else { pp = 0; - if(select==0){ + if (select == 0) { select = list.get(0).getId(); } MainHttpUtil.getClassLive(select, p, callback); @@ -335,7 +337,10 @@ public class MainHomeLiveViewHolder extends AbsMainHomeChildViewHolder implement mAdapter.clearData(); select = bean.getId(); typeHot = bean.getEnglish(); - mRefreshView.initData(); + new Handler(Looper.getMainLooper()) + .postDelayed(() -> { + mRefreshView.initData(); + }, 100); topAdapter.choice = position; topAdapter.notifyDataSetChanged();