遵循example of GridView如何在onItemClick事件中运行新的图像查询? 我可以在那次活动中投射我的BaseAdapter吗?
答案 0 :(得分:0)
在这里提出一个问题给了我灵感,呵呵......
gridview.setOnItemClickListener(new OnItemClickListener() {
public void onItemClick(AdapterView<?> parent, View v, int position, long id) {
try
{
((myCustomAdapter)parent.getAdapter()).myMethod("new_param");
((GridView)v.getParent()).invalidateViews();
}
catch (Exception e) {
System.out.println("onItemClick Excpetion = " + e);
}
}
});