Drawable[]
是否可以使用 for 循环生成一个?
数组列表:
List<String> list = new ArrayList<String>();
list.add(Environment.getExternalStorageDirectory() + "/App/posters/80348-16.jpg");
list.add(Environment.getExternalStorageDirectory() + "/App/posters/83462-8.jpg");
至
private Drawable[] mThumbIds = {
Drawable.createFromPath(Environment.getExternalStorageDirectory() + "/Treevo/posters/80348-16.jpg"), Drawable.createFromPath(Environment.getExternalStorageDirectory() + "/Treevo/posters/83462-8.jpg")
};
我的想法:
for (int i = 0; i < list.size(); i++)
{
//But what I need to do here?
}
我的目标是为GridView
.