Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-1508] Android: Remote images in ImageView get reloaded inside a TableViewRow

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2011-04-17T01:56:21.000+0000
Affected Version/sn/a
Fix Version/sRelease 1.6.0 M01
ComponentsAndroid
Labelsandroid, defect, imageview, release-1.6.0, remote, rplist, tableview
ReporterMarshall Culpepper
AssigneeMarshall Culpepper
Created2011-04-15T02:54:41.000+0000
Updated2012-08-14T19:36:31.000+0000

Description

We need to implement a remote Image cache so images aren't unnecessarily reloaded when scrolling a TableView up/down.

Comments

  1. Don Thorp 2011-04-15

    Nathaniel please verify this. If it was fixed with 1.5.0 please change the Milestone to 1.5.0 and mark resolved. Also add a test in bug test or explain how to test in KS.

  2. Nathaniel McCallum 2011-04-15

    So the way that this works is by using Java's built-in cache support. This makes it difficult to test since the caching is done transparently. Its even more difficult because the request may actually be modified internally by Java before forwarded into the cache module. However, with a little manual work, you can verify the caching with wireshark. Just have wireshark capture packet data going out from the emulator to ensure that a request is only being sent once.

    It should also be noted that the rules for when an item may not be cached (see the various HTTP RFC) are quite complicated. This caching module errs on the side of not caching. However, generally speaking, if you don't have a Cache-Control header in your response, its probably going to be cached.

    This feature actually shipped in 1.5.0.

  3. Don Thorp 2011-04-15

    Verified on G1/1.6 and Nexus One/2.2.1 using build #e1cb22a

    Used the XML RSS test, downloaded all the images then disconnected from the network.

  4. Rick Blalock 2011-04-15

    Hi Don,
    I just tested this with the latest build from today on my Galaxy (Android 2.2). The images now show up but the table performance while scrolling is odd. Using the KS RSS XML example: You'll see the images there but when scrolling it jitter-scrolls down slowly and then rapidly scrolls to the end as if it's catching up to where it is supposed to be. Sometimes doing a slow scroll it will stay in place or just jump to where it should be making it look like a scroll didn't happen.

    I'm debugging an HD ticket that is having the issue as well. I'll get specifics from him on how his table is performing. http://developer.appcelerator.com/helpdesk/view/67491">http://developer.appcelerator.com/helpdesk/view/67491

  5. Don Thorp 2011-04-15

    Rick. Please open a new ticket wrt to performance. This ticket is specifically about not re-downloading images.

  6. Michael Belkin 2012-08-14

    I'm having this problem with 2.1.1GA and 2.2 CI. If I cache the images manually and load as a blob then it works, but if I set a remote image url for the image property on an image view it disappears and reloads every time you scroll the table.
  7. Neeraj Gupta 2012-08-14

    @Michael - Please provide a complete test case that reproduces this issues with the master build.

JSON Source