I have a GridView with 81 buttons on it. I want to add clicklistener to this gridview but it is not available. I have added the OnItemClickListener but it is not working and
If you want to get text that clicked item you can use this
gridView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView> adapterView, View view, int i, long l) {
String item = ((TextView)view.findViewById(R.id.ID_OF_TEXTVIEW)).getText().toString();
Toast.makeText(showMissions.this, "" + item, Toast.LENGTH_SHORT).show();
}
});