增加cardview框架,SDK版本提升到21,修改单机页面,修改游戏标签样式,修改下载进度条 圆角变直角
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
package com.gh.common.util;
|
||||
|
||||
import android.content.Context;
|
||||
import android.graphics.Color;
|
||||
import android.util.TypedValue;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.LinearLayout.LayoutParams;
|
||||
@ -56,24 +57,24 @@ public class GameViewUtils {
|
||||
LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
|
||||
lp.setMargins(0, 0, DisplayUtils.dip2px(context, 5), 0);
|
||||
TextView tag = new TextView(context);
|
||||
tag.setTextSize(TypedValue.COMPLEX_UNIT_SP, 12);
|
||||
tag.setTextSize(TypedValue.COMPLEX_UNIT_SP, 11);
|
||||
tag.setSingleLine(true);
|
||||
tag.setText(tagStr);
|
||||
if ("官方版".equals(tagStr) || "已关注".equals(tagStr)) {
|
||||
tag.setBackgroundResource(R.drawable.border_red_bg);
|
||||
tag.setTextColor(0xffbc2132);
|
||||
tag.setBackgroundResource(R.drawable.border_green_bg);
|
||||
tag.setTextColor(Color.parseColor("#05c400"));
|
||||
} else if ("已安装".equals(tagStr)) {
|
||||
tag.setBackgroundResource(R.drawable.border_red_bg);
|
||||
tag.setTextColor(Color.parseColor("#bc2132"));
|
||||
} else {
|
||||
tag.setBackgroundResource(R.drawable.border_blue_bg);
|
||||
tag.setTextColor(0xff1BA4FC);
|
||||
} else {
|
||||
tag.setBackgroundResource(R.drawable.border_green_bg);
|
||||
tag.setTextColor(0xff2ec991);
|
||||
}
|
||||
tag.setLayoutParams(lp);
|
||||
tag.setPadding(DisplayUtils.dip2px(context, 4),
|
||||
DisplayUtils.dip2px(context, 2),
|
||||
DisplayUtils.dip2px(context, 4),
|
||||
DisplayUtils.dip2px(context, 2));
|
||||
tag.setPadding(DisplayUtils.dip2px(context, 3),
|
||||
0,
|
||||
DisplayUtils.dip2px(context, 3),
|
||||
DisplayUtils.dip2px(context, 1));
|
||||
return tag;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user