diff --git a/app/src/main/java/com/gh/common/util/GameViewUtils.java b/app/src/main/java/com/gh/common/util/GameViewUtils.java index 35ba08bbc2..70df1a507f 100644 --- a/app/src/main/java/com/gh/common/util/GameViewUtils.java +++ b/app/src/main/java/com/gh/common/util/GameViewUtils.java @@ -56,7 +56,12 @@ public class GameViewUtils { } else { AppExecutor.getLightWeightIoExecutor().execute(() -> { TextView tv = getNewGameTagView(context, tagEntity, marginRight); - AppExecutor.getUiExecutor().execute(() -> labelLayout.addView(tv)); + AppExecutor.getUiExecutor().execute(() -> { + // 快速刷新列表会出现重复标签被添加到布局中的问题,这里在实际执行代码前再检查一次数量 + if (labelLayout.getChildCount() >= tagEntityList.size()) return; + + labelLayout.addView(tv); + }); }); }