How can I download ListView HTML images asynchronously?

后端 未结 1 1270
無奈伤痛
無奈伤痛 2021-01-28 02:48

As a prototype, I\'m trying to modify the android-imagedownloader demo from the Android Developers Blog to work with HTML image tags rather than hard-coded ImageViews

相关标签:
1条回答
  • 2021-01-28 02:57

    I'm going to abandon my original idea of using HTML TextView to render my images since I don't think it will be a problem to limit the layout to a single image per TextView. For those who still really want to do this, this answer should guide you to the right solution. You'd have to pass the TextView to the BitmapDownloaderTask and in onPostExecute call setText again but with the newly downloaded or "decached" image.

    It might also be necessary to force an update of the row in the ListView per Romain Guy's guidance.

    0 讨论(0)
提交回复
热议问题