How do I know which view in the gridview was clicked? each view consists of textview, imageview, textview.
setOnItemClickListener defines the gridview element as one continuous

Example

The gridview consists of 5 elements, each of them consists of 3 more elements and that 15 elements I need to know which has been clicked since 15

type array [i] [j] where i-element gridview, and j-element in the element itself

{textview (title) (0,0)}, {imageview (image) (0,1)}, {textview (text) (0,2)},
{textview (title) (1,0)}, {imageview (image) (1,1)}, {textview (text) (1,2)},
{textview (title) (2,0)}, {imageview (image) (2,1)}, {textview (text) (2,2)},
{textview (title) (3,0)}, {imageview (image) (3,1)}, {textview (text) (3,2)},
{textview (title) (4,0)}, {imageview (image) (4,1)}, {textview (text) (4,2)}

How can I find out which button has been clicked?

  • one
    Put an id on them and define them. Or hang up a separate listener for each view - YuriySPb
  • I understand, but the listener perceives the whole block (view) as one solid. - user208111
  • one
    So you need the first option - a separate ID for each view and in the listener, having received the ID to find out what kind of ID it is - Yuriy SPb
  • @Yuriy SPb Thank you, I will try - user208111

0