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();