// 获取从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;
}
微信扫一扫
// 获取从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;
}
相关推荐