java,从doule保留固定位数小数到字符串。
String
.format("%.6f",cur
);
通过字符串格式名字,查找到对应控件的id。
为了批量构造字符串,然后找到对应的控件。
int id
= getResources().getIdentifier(cc
,"id",getPackageName());
if(id
> 0){
btn
[i
] = (Button
)findViewById(id
);
btn
[i
].setOnClickListener(ln
);
}
button不可以设计颜色背景,只能通过图形或者整个app的主题设计。要用图片需要用imagebutton。但是用imagebutron,就无法输入text
转载请注明原文地址: https://lol.8miu.com/read-15083.html