修改视频帖详情游戏标签样式

This commit is contained in:
jack
2021-06-24 20:56:09 +08:00
parent 5f44252410
commit 52e6feab59
4 changed files with 281 additions and 259 deletions

View File

@ -34,6 +34,10 @@ import java.util.TimeZone;
public class GameViewUtils {
public static void setLabelList(Context context, LinearLayout labelLayout, List<TagStyleEntity> tagStyle) {
setLabelList(context, labelLayout, tagStyle, 8);
}
public static void setLabelList(Context context, LinearLayout labelLayout, List<TagStyleEntity> tagStyle, int margin) {
labelLayout.removeAllViews();
if (tagStyle == null || tagStyle.isEmpty()) {
// 没有数据的话默认不显示
@ -42,7 +46,7 @@ public class GameViewUtils {
// 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));
View view = getNewGameTagView(context, tagStyle.get(i), i == size - 1 ? 0 : DisplayUtils.dip2px(context, margin));
labelLayout.addView(view);
if (labelLayout.getChildCount() == 3) {
break;