The first element (ImageView) in the Gridview is null for the mAttachInfo field

I am writing an Android application using GridView to load a list of ImageView items through an Adapter . Everything works fine, except that the first item loaded into the GridView had a null value for its mAttachInfo variable.

I think this may be because the first element is either selected or focused, which leads to the fact that mAttachInfo set to null , other elements have the correct mAttachInfo .

+6
source share

Source: https://habr.com/ru/post/888644/


All Articles