根据毕加索的javadocresizeDimen()
,构造函数是:
public RequestCreator resizeDimen(int targetWidthResId,
int targetHeightResId)
所以在我的代码中使用系统属性:
Picasso.with(context).load(URL)
.resizeDimen(android.R.attr.listPreferredItemHeightLarge,
android.R.attr.listPreferredItemHeightLarge)
.centerCrop()
.into(holder.Logo);
但我得到:
E/AndroidRuntime(7588): android.content.res.Resources$NotFoundException: Resource ID #0x1010386
我不明白,因为典型System.out.println(android.R.attr.listPreferredItemHeightLarge);
会在实践中返回对象的 id:
I/System.out(7588): 16843654
为什么我会在这里收到错误?