在给定视图的情况下找出 GridView child 的位置?

Finding out the position of a GridView child given the View?

在最近引入的 RecyclerView 中,有 getChildPosition(View) 方法 returns 传递的 View 的位置(如果不是 [=20= 则为 -1 ] 说 RecyclerView).

GridView有没有类似的方法?

你可以在适配器中使用一个Map来存储位置与视图的关系

事实证明(感谢@pskink)GridView 有这种方法:getPositionForView().