fix bugs 55
This commit is contained in:
@@ -18,6 +18,7 @@ import androidx.recyclerview.widget.LinearSnapHelper;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.blankj.utilcode.util.GsonUtils;
|
||||
import com.blankj.utilcode.util.LogUtils;
|
||||
import com.xscm.moduleutil.R;
|
||||
import com.xscm.moduleutil.base.BaseMvpDialogFragment;
|
||||
import com.xscm.moduleutil.bean.GiftBean;
|
||||
@@ -254,6 +255,14 @@ public class TourClubDialogFragment extends BaseMvpDialogFragment<GiftLotteryPre
|
||||
|
||||
private void onClick(View view) {
|
||||
int id = view.getId();
|
||||
// 通过 ID 获取资源名称
|
||||
String viewName = "";
|
||||
try {
|
||||
viewName = view.getContext().getResources().getResourceEntryName(id);
|
||||
} catch (Exception e) {
|
||||
viewName = "未知View ID: " + id;
|
||||
}
|
||||
LogUtils.e("tourClubDFragment","点击了" + viewName );
|
||||
if (id == R.id.tv_jc) {
|
||||
if (giftLists != null && !giftLists.isEmpty()) {
|
||||
PrizePoolDialog prizePoolDialog = new PrizePoolDialog(getActivity());
|
||||
@@ -381,7 +390,9 @@ public class TourClubDialogFragment extends BaseMvpDialogFragment<GiftLotteryPre
|
||||
|
||||
}
|
||||
mBinding.gvFz.setIsLuckUser(false);
|
||||
giftXlhChouAdapter.setNewData(giftLists);
|
||||
if (giftXlhChouAdapter != null) {
|
||||
giftXlhChouAdapter.setNewData(giftLists);
|
||||
}
|
||||
// // 数据加载完成后启动自动滚动
|
||||
// if (giftLists != null && !giftLists.isEmpty()) {
|
||||
// mBinding.recycleView.post(() -> {
|
||||
@@ -543,10 +554,10 @@ public class TourClubDialogFragment extends BaseMvpDialogFragment<GiftLotteryPre
|
||||
scrollHelper = null;
|
||||
}
|
||||
|
||||
// 清理适配器引用
|
||||
if (giftXlhChouAdapter != null) {
|
||||
giftXlhChouAdapter = null;
|
||||
}
|
||||
// 清理适配器引用 存在一次调用 giftXlhChouAdapter.setNewData(giftLists); 中giftXlhChouAdapter = null;
|
||||
// if (giftXlhChouAdapter != null) {
|
||||
// giftXlhChouAdapter = null;
|
||||
// }
|
||||
|
||||
|
||||
if (xlhRecordDialog != null && xlhRecordDialog.isVisible()) {
|
||||
|
||||
Reference in New Issue
Block a user