翔如菲菲

其实天很蓝,阴云总会散;其实海不宽,此岸连彼岸.

导航

2012年11月1日 #

【转】Android 之 远程图片获取和本地缓存

摘要: 概述 对于客户端——服务器端应用,从远程获取图片算是经常要用的一个功能,而图片资源往往会消耗比较大的流量,对应用来说,如果处理不好这个问题,那会让用户很崩溃,不知不觉手机流量就用完了,等用户发现是你的应用消耗掉了他手机流量的话,那么可想而知你的应用将面临什么样的命运。 另外一个问题就是加载速度,如果应用中图片加载速度很慢的话,那么用户同样会等到崩溃。 那么如何处理好图片资源的获取和管理呢? 异步... 阅读全文

posted @ 2012-11-01 18:02 翔如飞飞 阅读(252) 评论(0) 推荐(0) 编辑

AsyncTask

摘要: It’s very common to start a background thread to perform some task and thenupdate the UI when finished. You could just use a thread to perform these tasksand then use the Activity.runOnUiThread method to display that data to the user. But whathappens if you need to display progress? Posting runnable 阅读全文

posted @ 2012-11-01 16:31 翔如飞飞 阅读(160) 评论(0) 推荐(0) 编辑