onitemclicklistener widget android anonymous What does AdapterView<?> mean in the OnitemClick() Method? What is the use of other parameters in it?

1 Answers

The ? means that the datatype is unknown and it can be any type.

onitemclicklistener in adapter android
gridview.setOnItemClickListener(new OnItemClickListener() {
        public void onItemClick(AdapterView<?> parent, View v, int position, long id) {
            Toast.makeText(HelloGridView.this, "" + position, Toast.LENGTH_SHORT).show();