M
M
Max Pleshkov2016-07-19 21:27:23
Android
Max Pleshkov, 2016-07-19 21:27:23

Updating data inside Horizontalgridview?

Hello!
Broken head... I use horizontal gridview for the application. I put layouts with images in it through an adapter. I download these images from the internet using AsyncTask . In the onPostExecute method, I want to update the images (consider the image has loaded and it's time to display it). BUT!
Nothing happens if we use gridView.invalidate() .
If you use adapter.notifyDataSetChanged() , then the images are updated but the scroll position is reset to zero, to the beginning. And that's not what I need.
I'm trying to save the scroll position before the update and restore it after - here I can't get the horizontal gridviewtake scroll position, always = 0
Who knows how to work with horizontal gridview , because it's a bit different from regular gridview .
Tell me how to update the data inside without resetting the scroll to 0
Thank you in advance!

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question