The detection of the getView () call is complete.

I searched for any callback method that is called when the last getView () completed execution, or I can say that the whole element in the AdapterView is drawn / laid out.

I found that there is no specific api android method that acts as a callback method.

Please guys help me find a way. How can we detect a call to the last getView () for a specific list of data sources.

+4
source share
2 answers

No last getView ()

When you scroll through the list, getView is called for each item that becomes visible. EVEN when he was already on the screen.

So, if you want to know if each item in the ListView visible, you need to calculate for yourself :).

0
source

This is because it is always called. It happens that getView() is called every time you scroll through the ListView . When an item is placed outside the ListView (not visible to the user), it is passed as a converted view ( convertView ) to getView() to fill it with data, which will be a new item that will be loaded from the other side of the scroll. You also cannot predict this action, since the number of visible elements in the ListView will vary depending on the screen size. You can override getView() and check at what point you need to activate the action.

0
source

All Articles