// 获取从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
最新推荐文章于 2021-07-27 18:14:00 发布