我使用a ListView来显示与这些图像相关的一些图像和标题.我从互联网上获取图像.有没有办法延迟加载图像,以便文本显示时,UI不会被锁定,图像会在下载时显示?
图像总数不固定.
我如何从Facebook获取所有用户相册.我试过这个Url https://graph.facebook.com/me/albums?access_token=xxxx
我正在使用此代码,我也提到了这个权限"user_photos".
Bundle parameters = new Bundle();
parameters.putString("format", "json");
parameters.putString("method", "user_photos");
parameters.putString(TOKEN, facebook.getAccessToken());
JSONObject response = null;
try {
response = Util.parseJson(Album_Url);
JSONArray array = obj.optJSONArray("data");
for(int i = 0; i<array.length(); i++){
JSONObject main_obj = array.getJSONObject(i);
String album = main_obj.getString("name");
}
} catch (JSONException e1) {
e1.printStackTrace();
} catch (FacebookError e1) {
e1.printStackTrace();
}
Run Code Online (Sandbox Code Playgroud)
但我在日志猫中得到这个09-12 14:27:42.990: W/System.err(12189): org.json.JSONException: Value https of type java.lang.String cannot be converted to JSONObject.
我也这样试过
try {
Bundle parameters = new …Run Code Online (Sandbox Code Playgroud)