private ExpiryInfoView(Context paramContext, String paramString)
{
super(paramContext);
RelativeLayout.LayoutParams localLayoutParams1 = new RelativeLayout.LayoutParams(-1, -1);
setBackgroundColor(-1);
setLayoutParams(localLayoutParams1);
RelativeLayout.LayoutParams localLayoutParams2 = new RelativeLayout.LayoutParams(-1, (int)TypedValue.applyDimension(1, 3.0F, getResources().getDisplayMetrics()));
localLayoutParams2.addRule(10, -1);
ImageView localImageView = new ImageView(paramContext);
localImageView.setLayoutParams(localLayoutParams2);
int[] arrayOfInt = { -16777216, 0 };
localImageView.setBackgroundDrawable(new GradientDrawable(GradientDrawable.Orientation.TOP_BOTTOM, arrayOfInt));
addView(localImageView);
int i = (int)TypedValue.applyDimension(1, 20.0F, getResources().getDisplayMetrics());
RelativeLayout.LayoutParams localLayoutParams3 = new RelativeLayout.LayoutParams(-1, -2);
localLayoutParams3.addRule(13, -1);
localLayoutParams3.setMargins(i, i, i, i);
TextView localTextView = new TextView(paramContext);
localTextView.setGravity(17);
localTextView.setLayoutParams(localLayoutParams3);
localTextView.setText(paramString);
localTextView.setTextColor(-16777216);
addView(localTextView);
}
ExpiryInfoView.java 文件源码
java
阅读 16
收藏 0
点赞 0
评论 0
项目:QuizUpWinner
作者:
评论列表
文章目录