Android的:从网页下载的图像,并将它们显示的GridView [英] Android: Download images from web and show them on gridview

查看:94
本文介绍了Android的:从网页下载的图像,并将它们显示的GridView的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想创建一个程序,它会从一个网页一些图像,并将其显示在一个GridView。我不知道有多少人确切地。这可能是从20到30不适做它的AsyncTask,至极香港专业教育学院媒体链接使用前和或多或少知道它是如何工作的。但我不知道至极的方式使用它这个时候。

I want to create a program that gets some images from a webpage, and shows them on a gridview. I dont know how many of them exactly. It could be from 20 to 30. Ill do it with asynctask, wich ive allready used before and more or less know how it works. But i dont know wich way use it this time.

现在,我想获得一个进度条(圈clicling),而图像的下载。而一旦它的下载,这将dissappear和图像将加载。我将使用对象的数组有适配器,填补了GridView控件。

For now, what i would like to get is a progressbar (circle clicling) while image is downloading. And once its downloaded, it would dissappear and image will load. I will use an array of objects with an adapter, to fill the gridview.

至极的方法是使用AsyncTask的?

Wich way would you use the asynctask?

在此先感谢。

推荐答案

我会建议你看看<一href="http://cdn.cs76.net/2011/spring/lectures/6/src6-dan/Threads03/src/net/cs76/lectures/Threads03/">Lecture 6 哈佛扩展CS76的。有一个 URLImageAdapter 和示例源$ C ​​$ C,做例子,你在找什么

I would suggest you check out Lecture 6 of Harvard Extension CS76. There is a URLImageAdapter and example source code that does example what you are looking for.

最好的运气

这篇关于Android的:从网页下载的图像,并将它们显示的GridView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆