package com.yimeng.mygame; import android.content.Context; import android.view.Gravity; import android.widget.FrameLayout; import android.widget.TextView; public class Card extends FrameLayout { private TextView lable; public Card(Context context) { super(context); lable = new TextView(getContext()); lable.setTextSize(35); lable.setTextColor(0xffffffff); lable.setBackgroundColor(0x33ffffff);// 33表示不透明度,00 表示完全透明,ff 表示完全不透明 lable.setGravity(Gravity.CENTER); LayoutParams lp = new LayoutParams(-1, -1); lp.setMargins(10, 10, 0, 0); // lp.setMargins(left, top, right, bottom) addView(lable, lp); setNum(0); } private int num = 0; public int getNum() { return num; } public void setNum(int num) { this.num = num; if (num <= 0) { lable.setText(""); } else { lable.setText(num + ""); } } public boolean equals(Card c) { return getNum() == c.getNum(); } }

bshshah LV1
6月20日
rrrrrrrrrr LV1
2023年9月27日
zhuimengren LV4
2022年5月30日
anneli LV1
2022年2月24日
15162681641 LV1
2021年12月7日
KCBERG LV4
2021年12月1日
马化腾他爸爸 LV1
2021年10月27日
张飞45465 LV1
2021年10月16日
LHKHUVHC LV1
2021年7月30日
rayon6666 LV1
2021年7月2日

bshshah LV1
6月20日
7456321 LV1
2024年4月22日
yerwiu LV10
2024年1月6日
微信网友_6793785677565952 LV1
2023年12月25日
rrrrrrrrrr LV1
2023年9月27日
yyyyyyzh LV8
2023年6月11日
200171 LV9
2023年6月1日
齐吊大神 LV6
2023年4月25日
微信网友_6399771178995712
2023年3月22日
暂无贡献等级
gaoxianhua LV2
2022年8月31日