0

我有这样的事情:
view = gridView.getChildAt(position)

gridView 中的所有元素都是存储在可绘制文件夹中的可绘制对象
现在我的问题:
如何将视图传递给 imageView 或如何从视图中获取 resourceId?

4

1 回答 1

0

This tutorial should have everything you need, the only difference is, that you need to pass in the item at gridView.getChildAt(position) rather then all the items in the gridView as in this tutorial

you would want to do something like

 imageView.setImageResource(gridView.getChildAt(position))

but without seeing your code i cannot put up the correct answer, but looking at the tutorial that i have added, you would add code like above to get want you want

于 2012-05-30T14:03:26.710 回答