游戏列表去除默认标签(没有数据时,直接不显示)

This commit is contained in:
kehaoyuan
2020-05-28 16:06:28 +08:00
parent 50fd30d173
commit 7e737d7a46

View File

@ -36,9 +36,10 @@ public class GameViewUtils {
public static void setLabelList(Context context, LinearLayout labelLayout, List<TagStyleEntity> tagStyle) {
labelLayout.removeAllViews();
if (tagStyle == null || tagStyle.isEmpty()) {
TagStyleEntity tagEntity = new TagStyleEntity();
tagEntity.setName("官方版");
labelLayout.addView(getNewGameTagView(context, tagEntity, 0));
// 没有数据的话默认不显示
// TagStyleEntity tagEntity = new TagStyleEntity();
// tagEntity.setName("官方版");
// labelLayout.addView(getNewGameTagView(context, tagEntity, 0));
} else {
for (int i = 0, size = tagStyle.size(); i < size; i++) {
View view = getNewGameTagView(context, tagStyle.get(i), i == size - 1 ? 0 : DisplayUtils.dip2px(context, 8));