测试修复首页闪屏问题2

This commit is contained in:
zlzw 2024-10-11 16:48:16 +08:00
parent a40ba0ceb1
commit 83e94b3b2e

View File

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