Android将图像加载到Listview中 [英] Android-Load images into Listview
问题描述
我有ListView
和Fragment
.那里有来自Web服务的Web图像,并将这些图像放入ListView
.每当我登录到应用程序时,从Web服务和应用程序初始化的图像就会变慢.下面是我要执行的步骤并克服了应用程序的延迟.
I have ListView
and Fragment
. there I'm having web images which are from web service, and put those images into ListView
. All the time when I log into my application, images initializing from web service and my app become slow.Below are the steps I want to do and overcome delay of my application.
1..当用户第一次使用该应用程序时,将从Web服务下载的所有图像都放入到手机中.
1. When user first time comes to application all the images downloading from web service and put those images inside phone.
2..用户第二次登录应用时,图像会从手机中获取.
2. Second time user log into app, images getting fetch from phone.
如何实现?请帮助我.
推荐答案
尝试使用Picasso库,可能会解决您的问题. http://square.github.io/picasso/
Try Picasso library, might solve your issue. http://square.github.io/picasso/
Picasso.with(context).load(" http://i.imgur.com/DvpvklR. png ).into(imageView);
Picasso.with(context).load("http://i.imgur.com/DvpvklR.png").into(imageView);
这篇关于Android将图像加载到Listview中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!