I m new to java and android. i don t understand this code
gridview.setOnItemClickListener(new OnItemClickListener() {
public void onItemClick(AdapterView<?> parent, View v, int position, long id) {
Toast.makeText(HelloGridView.this, "" + position, Toast.LENGTH_SHORT).show();
}
});
this s my guess : OnItemClickListener is an interface. we create an anonymous object from the class AdapterView. i got information that AdapterView.OnItemClickListener is an interface from AdapterView.OnItemClickListener
是正确的?