Hello
I am sorry if this has been answered but I could not find any related post.
What my application does is listing some images from internet after selecting an item from a list and every item has its own images.
The application works as expected until I go back to select another item to show its images I get outofbounds error . I think the problem is because of some http job from the last item like if it was delayed till I got back and chose another item.
Now can I abort current jobs so they do not get finished at wrong time?
And if there is any other better way to fix this issue please help me
And thanks in advance
Thanks a lot .
No I was trying to accomplish a similar result by clearing an array of bitmaps
And I checked with IsPaused() before calling the function that sets images to imageviews.
I will check ImageDownloader as soon as possible .
Thanks again
Hello again.
I used ImageDownloader and it was really great but now I noticed it has this issue although it shouldn't but anyway the problem happens when I enter one category and quickly get back to the first Activity and the choose another category.
When I do this the old images get downloaded instead of the new ones .
How can I fix this?
I am sorry I am developing it for someone else but I will try to make it clearer
I have main activity with some categories when I click one of them I start the second activity and pass links to ImageDownloader to show them on the second activity
If I for example chose category "A" then I pressed back button which will call "ActivityIsPaused" and chose category "B" I would get "A" images.
I hope it is clear now
When I get back to main activity and then to the second download sub of Imagedownloader gets executed twice
But if replace CallSubDelayed2 with CallSub2 , images never gets downloaded
I don't think that DoEvents is related to this issue. If it is simple to reproduce then you can send me your project to erel@basic4ppc.com and I'll try it.
I think my problem happens because the ImageDownloader finds the same imageviews
B4X:
Dim imv as ImageView
Seems to have always the same android.widget.ImageView{42b9f158... reference
When image gets downloaded and the user is back to the second activity, ImageDownloader find the same key of imagviews,links and sets their bitmaps