// 获取从adbox_1到adbox_64的图片
private int getPicId() {
int randomNum = new Random().nextInt(64) + 1;
int notFoundResId = getResources().getIdentifier("adbox_" + randomNum, "mipmap", getContext().getPackageName());
return notFoundResId;
}
根据id名称获取id
阅读 97
2023-03-16
// 获取从adbox_1到adbox_64的图片
private int getPicId() {
int randomNum = new Random().nextInt(64) + 1;
int notFoundResId = getResources().getIdentifier("adbox_" + randomNum, "mipmap", getContext().getPackageName());
return notFoundResId;
}
相关推荐
精彩评论(0)