检查for循环中的remove,检查response的length != 0

This commit is contained in:
huangzhuanghua
2016-10-21 16:44:40 +08:00
parent 3100d6aede
commit 24238acf0e
32 changed files with 231 additions and 307 deletions

View File

@ -41,22 +41,6 @@ public class GameViewUtils {
}
}
// 获取游戏标签列表视图
public static void setLabelList(Context context, LinearLayout labelLayout, String tag) {
labelLayout.removeAllViews();
// 添加tag标签
if (tag != null && !tag.isEmpty()) {
String[] tags = tag.split(",");
for (int i = 0; i < tags.length; i++) {
if (i == tags.length - 1) {
labelLayout.addView(getGameTagView(context, tags[i], 0));
} else {
labelLayout.addView(getGameTagView(context, tags[i], DisplayUtils.dip2px(context, 5)));
}
}
}
}
public static TextView getGameTagView(Context context, String tagStr, int rightMargin) {
LinearLayout.LayoutParams lparams = new LinearLayout.LayoutParams(
LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);